File: bug_5706.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (26 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From Coq.ssr Require Import ssreflect.
From Coq Require Import RelationClasses Relation_Definitions Setoid.

Parameter P : nat -> Prop.
Parameter f : nat -> nat.
Parameter foo_eq : forall x, P 0 -> P 1 -> x = f x.

Axiom p0 : P 0.
Axiom p1 : P 1.

Goal 0 = f 0.
Proof.
  rewrite -(foo_eq 0); [ exact: p0 | exact: p1 | reflexivity ].
Abort.


Parameter R : relation nat.
Parameter R_equivalence : Equivalence R.
#[global] Existing Instance R_equivalence.

Parameter foo_R : forall x, P 0 -> P 1 -> R x (f x).

Goal R 0 (f 0).
Proof.
  rewrite -(foo_R 0); [ exact: p0 | exact: p1 | apply: Equivalence_Reflexive ].
Abort.