lean4-htt/tests/lean/run/newfrontend3.lean
Leonardo de Moura 1d9d8c7e75 chore: fix tests
close #402
2021-08-07 13:22:58 -07:00

33 lines
762 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.

--
structure S :=
(g {α} : αα)
def f (h : Nat → ({α : Type} → αα) × Bool) : Nat :=
(h 0).1 1
def tst : Nat :=
f fun n => (fun x => x, true)
theorem ex : id (Nat → Nat) :=
by {
intro;
assumption
}
def g (i j k : Nat) (a : Array Nat) (h₁ : i < k) (h₂ : k < j) (h₃ : j < a.size) : Nat :=
let vj := a.get ⟨j, h₃⟩;
let vi := a.get ⟨i, Nat.lt_trans h₁ (Nat.lt_trans h₂ h₃)⟩;
vi + vj
set_option pp.all true in
#print g
#check g.proof_1
theorem ex1 {p q r s : Prop} : p ∧ q ∧ r ∧ s → r ∧ s ∧ q ∧ p :=
fun ⟨hp, hq, hr, hs⟩ => ⟨hr, hs, hq, hp⟩
theorem ex2 {p q r s : Prop} : p ∧ q ∧ r ∧ s → r ∧ s ∧ q ∧ p := by
intro ⟨hp, hq, hr, hs⟩
exact ⟨hr, hs, hq, hp⟩