4ec0e1b07c
Now, it automatically supports transitivity of the form (R a b) -> (b = c) -> R a c (a = b) -> (R b c) -> R a c closes #507
18 lines
558 B
Text
18 lines
558 B
Text
constant list : Type → Type
|
|
constant R.{l} : Π {A : Type.{l}}, A → A → Type.{l}
|
|
infix `~`:50 := R
|
|
|
|
example {A : Type} {a b c d : list nat} (H₁ : a ~ b) (H₂ : b = c) (H₃ : c = d) : a ~ d :=
|
|
calc a ~ b : H₁
|
|
... = c : H₂
|
|
... = d : H₃
|
|
|
|
example {A : Type} {a b c d : list nat} (H₁ : a = b) (H₂ : b = c) (H₃ : c ~ d) : a ~ d :=
|
|
calc a = b : H₁
|
|
... = c : H₂
|
|
... ~ d : H₃
|
|
|
|
example {A : Type} {a b c d : list nat} (H₁ : a = b) (H₂ : b ~ c) (H₃ : c = d) : a ~ d :=
|
|
calc a = b : H₁
|
|
... ~ c : H₂
|
|
... = d : H₃
|