lean4-htt/tests/lean/run/Daniel1.lean
Sebastian Ullrich 8a02dfec4f feat: subsume variables under variable
/cc @leodemoura
2021-01-22 14:36:05 +01:00

17 lines
449 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.

def small (ps : Array (Nat × Nat)) : Array (Nat × Nat) :=
(ps.filter fun (p : Prod _ _) =>
match p with
| (x, y) => x == 0)
++
ps
#eval small #[(1, 2), (0, 3), (2, 4)]
variable {α β : Type} [Inhabited α] [Inhabited β]
def P (xys : Array (α × β)) (f : α → β) : Prop := True
example (xys : Array (α × β))
(pred? : α → Bool)
(H : Subtype $ P (xys.filter fun (x, _) => pred? x))
: Unit := ()