lean4-htt/tests/lean/run/implicitApplyIssue.lean
Leonardo de Moura 9e980b2a78 fix: bug at decAux?
We are getting a few "stuck at universe constraint" errors after the
fix. We may need to add some kind of approximation in the future.
2021-09-20 07:12:57 -07:00

26 lines
848 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 Set α := α → Prop
class HasMem (α : outParam $ Type u) (β : Type v) where
mem : α → β → Prop
infix:50 " ∈ " => HasMem.mem
instance {α : Type u} : HasMem α (Set α) := ⟨λ a s => s a⟩
instance {α : Type u} : LE (Set α) := ⟨λ s t => ∀ {x : α}, x ∈ s → x ∈ t⟩
class HasInf (P : Type u) where
inf : P → P → P
infix:70 " ⊓ " => HasInf.inf
instance {α : Type u} : HasInf (Set α) := ⟨λ s t x => x ∈ s ∧ x ∈ t⟩
theorem infLeLeft {s t : Set α} : s ⊓ t ≤ s := And.left
theorem infLeRight {s t : Set α} : s ⊓ t ≤ t := And.right
theorem inter_mem_sets_iff {α : Type u} (f : Set (Set α)) (hf : ∀ {s t}, s ∈ f → s ≤ t → t ∈ f) {x y : Set α}
: x ⊓ y ∈ f → x ∈ f ∧ y ∈ f := by
intro h
refine ⟨hf h infLeLeft, hf h ?_⟩
apply infLeRight