Theorem: iSup_iInf_eq
File: Mathlib/Order/CompleteBooleanAlgebra.lean

tactic: refine le_antisymm iSup_iInf_le ?_
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
⊢ ⨆ a, ⨅ b, f a b = ⨅ g, ⨆ a, f a (g a)
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
⊢ ⨅ g, ⨆ a, f a (g a) ≤ ⨆ a, ⨅ b, f a b

tactic: rw [iInf_iSup_eq]
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
⊢ ⨅ g, ⨆ a, f a (g a) ≤ ⨆ a, ⨅ b, f a b
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
⊢ ⨆ g, ⨅ a, f (g a) (a (g a)) ≤ ⨆ a, ⨅ b, f a b

tactic: refine iSup_le fun g => ?_
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
⊢ ⨆ g, ⨅ a, f (g a) (a (g a)) ≤ ⨆ a, ⨅ b, f a b
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
⊢ ⨅ a, f (g a) (a (g a)) ≤ ⨆ a, ⨅ b, f a b

tactic: have ⟨a, ha⟩ : ∃ a, ∀ b, ∃ f, ∃ h : a = g f, h ▸ b = f (g f) := of_not_not fun h => by
  push_neg at h
  choose h hh using h
  have := hh _ h rfl
  contradiction
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
⊢ ⨅ a, f (g a) (a (g a)) ≤ ⨆ a, ⨅ b, f a b
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
a : ι
ha : ∀ (b : κ a), ∃ f, ∃ (h : a = g f), h ▸ b = f (g f)
⊢ ⨅ a, f (g a) (a (g a)) ≤ ⨆ a, ⨅ b, f a b

tactic: refine le_trans ?_ (le_iSup _ a)
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
a : ι
ha : ∀ (b : κ a), ∃ f, ∃ (h : a = g f), h ▸ b = f (g f)
⊢ ⨅ a, f (g a) (a (g a)) ≤ ⨆ a, ⨅ b, f a b
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
a : ι
ha : ∀ (b : κ a), ∃ f, ∃ (h : a = g f), h ▸ b = f (g f)
⊢ ⨅ a, f (g a) (a (g a)) ≤ ⨅ b, f a b

tactic: refine le_iInf fun b => ?_
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
a : ι
ha : ∀ (b : κ a), ∃ f, ∃ (h : a = g f), h ▸ b = f (g f)
⊢ ⨅ a, f (g a) (a (g a)) ≤ ⨅ b, f a b
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
a : ι
ha : ∀ (b : κ a), ∃ f, ∃ (h : a = g f), h ▸ b = f (g f)
b : κ a
⊢ ⨅ a, f (g a) (a (g a)) ≤ f a b

tactic: obtain ⟨h, rfl, rfl⟩ := ha b
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
a : ι
ha : ∀ (b : κ a), ∃ f, ∃ (h : a = g f), h ▸ b = f (g f)
b : κ a
⊢ ⨅ a, f (g a) (a (g a)) ≤ f a b
state_after: case intro.intro
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : (a : ι) → κ a
ha : ∀ (b : κ (g h)), ∃ f, ∃ (h_1 : g h = g f), h_1 ▸ b = f (g f)
⊢ ⨅ a, f (g a) (a (g a)) ≤ f (g h) (h (g h))

tactic: exact iInf_le _ _
state_before: case intro.intro
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : (a : ι) → κ a
ha : ∀ (b : κ (g h)), ∃ f, ∃ (h_1 : g h = g f), h_1 ▸ b = f (g f)
⊢ ⨅ a, f (g a) (a (g a)) ≤ f (g h) (h (g h))
state_after: no goals

tactic: push_neg at h
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : ¬∃ a, ∀ (b : κ a), ∃ f, ∃ (h : a = g f), h ▸ b = f (g f)
⊢ False
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : ∀ (a : ι), ∃ b, ∀ (f : (a : ι) → κ a) (h : a = g f), h ▸ b ≠ f (g f)
⊢ False

tactic: choose h hh using h
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : ∀ (a : ι), ∃ b, ∀ (f : (a : ι) → κ a) (h : a = g f), h ▸ b ≠ f (g f)
⊢ False
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : (a : ι) → κ a
hh : ∀ (a : ι) (f : (a : ι) → κ a) (h_1 : a = g f), h_1 ▸ h a ≠ f (g f)
⊢ False

tactic: have := hh _ h rfl
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : (a : ι) → κ a
hh : ∀ (a : ι) (f : (a : ι) → κ a) (h_1 : a = g f), h_1 ▸ h a ≠ f (g f)
⊢ False
state_after: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : (a : ι) → κ a
hh : ∀ (a : ι) (f : (a : ι) → κ a) (h_1 : a = g f), h_1 ▸ h a ≠ f (g f)
this : ⋯ ▸ h (g h) ≠ h (g h)
⊢ False

tactic: contradiction
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : CompletelyDistribLattice α
f : (a : ι) → κ a → α
g : ((a : ι) → κ a) → ι
h : (a : ι) → κ a
hh : ∀ (a : ι) (f : (a : ι) → κ a) (h_1 : a = g f), h_1 ▸ h a ≠ f (g f)
this : ⋯ ▸ h (g h) ≠ h (g h)
⊢ False
state_after: no goals