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 27 28 29 30 31 32 33 34
|
Record T : Type := Build_T { f : unit; g := pair f f; }.
Definition t : T := {| f := tt; |}.
Goal match t return unit with Build_T f g => f end = tt.
Proof.
cbv.
reflexivity.
Qed.
Goal match t return prod unit unit with Build_T f g => g end = pair tt tt.
Proof.
cbv.
reflexivity.
Qed.
Goal forall (x : T),
match x return prod unit unit with Build_T f g => g end =
pair match x return unit with Build_T f g => fst g end match x return unit with Build_T f g => snd g end.
Proof.
cbv.
destruct x.
reflexivity.
Qed.
Record U : Type := Build_U { h := tt }.
Definition u : U := Build_U.
Goal match u with Build_U h => h end = tt.
Proof.
cbv.
reflexivity.
Qed.
|