16 lines
596 B
Text
16 lines
596 B
Text
class Trans (r : α → β → Prop) (s : β → γ → Prop) (t : outParam (α → γ → Prop)) where
|
||
trans : r a b → s b c → t a c
|
||
|
||
export Trans (trans)
|
||
|
||
instance : Trans (α := Nat) (β := Nat) (γ := Nat) (.≤.) (.≤.) (.≤.) where
|
||
trans := Nat.leTrans
|
||
|
||
instance : Trans (α := Int) (β := Int) (γ := Int) (.≤.) (.≤.) (.≤.) where
|
||
trans := sorry
|
||
|
||
theorem ex1 {a b c d : Nat} (h1 : a ≤ b) (h2 : b ≤ c) (h3 : c ≤ d) : a ≤ d :=
|
||
trans h1 <| trans h2 h3
|
||
|
||
theorem ex2 {a b c d : Int} (h1 : a ≤ b) (h2 : b ≤ c) (h3 : c ≤ d) : a ≤ d :=
|
||
trans h1 <| trans h2 h3
|