Skip to content

Commit 1552b79

Browse files
committed
golf
1 parent 7073a0a commit 1552b79

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

Mathlib/Data/Set/Finite/Lattice.lean

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ theorem Finite.biInf_iSup_eq {ι} {κ : ι → Sort*} [Nonempty (∀ a, κ a)] [
393393
(hs : s.Finite) {f : ∀ a, κ a → α} :
394394
⨅ a ∈ s, ⨆ b, f a b = ⨆ g : ∀ a, κ a, ⨅ a ∈ s, f a (g a) := by
395395
classical
396-
induction s, hs using Set.Finite.induction_on with
396+
induction s, hs using Finite.induction_on with
397397
| empty => simp [iSup_const]
398398
| @insert a s ha _ ih =>
399399
simp_rw [iInf_insert, ih, iSup_inf_eq, inf_iSup_eq]
@@ -409,7 +409,7 @@ theorem Finite.biSup_iInf_eq {ι} {κ : ι → Sort*} [Nonempty (∀ a, κ a)] [
409409
(hs : s.Finite) {f : ∀ a, κ a → α} :
410410
⨆ a ∈ s, ⨅ b, f a b = ⨅ g : ∀ a, κ a, ⨆ a ∈ s, f a (g a) := by
411411
classical
412-
induction s, hs using Set.Finite.induction_on with
412+
induction s, hs using Finite.induction_on with
413413
| empty => simp [iInf_const]
414414
| @insert a s ha _ ih =>
415415
simp_rw [iSup_insert, ih, iInf_sup_eq, sup_iInf_eq]
@@ -424,12 +424,9 @@ theorem Finite.biSup_iInf_eq {ι} {κ : ι → Sort*} [Nonempty (∀ a, κ a)] [
424424
theorem _root_.iInf_iSup_eq_of_finite {α ι} {κ : ι → Sort*} [Order.Frame α] [Finite ι]
425425
{f : ∀ a, κ a → α} : ⨅ a, ⨆ b, f a b = ⨆ g : ∀ a, κ a, ⨅ a, f a (g a) := by
426426
by_cases h : ∀ a, Nonempty (κ a)
427-
· have := Finite.biInf_iSup_eq (f := (f <| PLift.down ·)) Set.finite_univ
428-
simp only [mem_univ, iInf_pos] at this
429-
simp_rw [← Equiv.plift.symm.iInf_comp,
427+
· simpa [← Equiv.plift.symm.iInf_comp,
430428
← (Equiv.plift.piCongr (W := (κ <| PLift.down ·)) fun _ => Equiv.refl _).symm.iSup_comp]
431-
at this
432-
simpa using this
429+
using Finite.biInf_iSup_eq (f := (f <| PLift.down ·)) finite_univ
433430
· simp only [not_forall, not_nonempty_iff] at h
434431
haveI : IsEmpty (∀ a, κ a) := by simpa
435432
rcases h with ⟨a, h⟩
@@ -438,12 +435,9 @@ theorem _root_.iInf_iSup_eq_of_finite {α ι} {κ : ι → Sort*} [Order.Frame
438435
theorem _root_.iSup_iInf_eq_of_finite {α ι} {κ : ι → Sort*} [Order.Coframe α] [Finite ι]
439436
{f : ∀ a, κ a → α} : ⨆ a, ⨅ b, f a b = ⨅ g : ∀ a, κ a, ⨆ a, f a (g a) := by
440437
by_cases h : ∀ a, Nonempty (κ a)
441-
· have := Finite.biSup_iInf_eq (f := (f <| PLift.down ·)) Set.finite_univ
442-
simp only [mem_univ, iSup_pos] at this
443-
simp_rw [← Equiv.plift.symm.iSup_comp,
438+
· simpa [← Equiv.plift.symm.iSup_comp,
444439
← (Equiv.plift.piCongr (W := (κ <| PLift.down ·)) fun _ => Equiv.refl _).symm.iInf_comp]
445-
at this
446-
simpa using this
440+
using Finite.biSup_iInf_eq (f := (f <| PLift.down ·)) finite_univ
447441
· simp only [not_forall, not_nonempty_iff] at h
448442
haveI : IsEmpty (∀ a, κ a) := by simpa
449443
rcases h with ⟨a, h⟩

0 commit comments

Comments
 (0)