lean4-htt/tests/lean/run/discrRefinement2.lean
Leonardo de Moura 6fb2a2b47b chore: remove notation for HEq
We don't really needed it here.
2021-09-15 08:06:32 -07:00

28 lines
975 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

infix:50 " ≅ " => HEq
theorem ex1 {α : Sort u} {a b : α} (h : a ≅ b) : a = b :=
match h with
| HEq.refl _ => rfl
theorem ex2 {α : Sort u2} {a : α} {motive : {β : Sort u2} → β → Sort u1} (m : motive a) {β : Sort u2} {b : β} (h : a ≅ b) : motive b :=
match h, m with
| HEq.refl _, m => m
theorem ex3 {α : Sort u} {a : α} {p : α → Sort v} {b : α} (h₁ : a ≅ b) (h₂ : p a) : p b :=
match h₁, h₂ with
| HEq.refl _, h₂ => h₂
theorem ex4 {α β : Sort u} {a : α} {b : β} (h : a ≅ b) : b ≅ a :=
match h with
| HEq.refl _ => HEq.refl _
theorem ex5 {α : Sort u} {a a' : α} (h : a = a') : a ≅ a' :=
match h with
| rfl => HEq.refl _
theorem ex6 {α β : Sort u} (h : α = β) (a : α) : cast h a ≅ a :=
match h with
| rfl => HEq.refl _
theorem ex7 {α β σ : Sort u} {a : α} {b : β} {c : σ} (h₁ : a ≅ b) (h₂ : b ≅ c) : a ≅ c :=
match h₁, h₂ with
| HEq.refl _, HEq.refl _ => HEq.refl _