data.fintype.order
⟷
Mathlib.Data.Fintype.Order
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -204,7 +204,10 @@ variable {α : Type _}
#print Directed.finite_le /-
theorem Directed.finite_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
- [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by classical
+ [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
+ classical
+ obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
+ exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
#align directed.fintype_le Directed.finite_le
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -204,10 +204,7 @@ variable {α : Type _}
#print Directed.finite_le /-
theorem Directed.finite_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
- [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
- classical
- obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
- exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
+ [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by classical
#align directed.fintype_le Directed.finite_le
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -202,30 +202,30 @@ noncomputable instance : CompleteBooleanAlgebra Bool :=
variable {α : Type _}
-#print Directed.fintype_le /-
-theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
+#print Directed.finite_le /-
+theorem Directed.finite_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
[Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
classical
obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
-#align directed.fintype_le Directed.fintype_le
+#align directed.fintype_le Directed.finite_le
-/
-#print Fintype.exists_le /-
-theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
+#print Finite.exists_le /-
+theorem Finite.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
- directed_id.fintype_le _
-#align fintype.exists_le Fintype.exists_le
+ directed_id.finite_le _
+#align fintype.exists_le Finite.exists_le
-/
-#print Fintype.bddAbove_range /-
-theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
+#print Finite.bddAbove_range /-
+theorem Finite.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) :=
by
- obtain ⟨M, hM⟩ := Fintype.exists_le f
+ obtain ⟨M, hM⟩ := Finite.exists_le f
refine' ⟨M, fun a ha => _⟩
obtain ⟨b, rfl⟩ := ha
exact hM b
-#align fintype.bdd_above_range Fintype.bddAbove_range
+#align fintype.bdd_above_range Finite.bddAbove_range
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2021 Peter Nelson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Peter Nelson, Yaël Dillies
-/
-import Mathbin.Data.Fintype.Lattice
-import Mathbin.Data.Finset.Order
+import Data.Fintype.Lattice
+import Data.Finset.Order
#align_import data.fintype.order from "leanprover-community/mathlib"@"63f84d91dd847f50bae04a01071f3a5491934e36"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2021 Peter Nelson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Peter Nelson, Yaël Dillies
-
-! This file was ported from Lean 3 source module data.fintype.order
-! leanprover-community/mathlib commit 63f84d91dd847f50bae04a01071f3a5491934e36
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Fintype.Lattice
import Mathbin.Data.Finset.Order
+#align_import data.fintype.order from "leanprover-community/mathlib"@"63f84d91dd847f50bae04a01071f3a5491934e36"
+
/-!
# Order structures on finite types
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -205,18 +205,23 @@ noncomputable instance : CompleteBooleanAlgebra Bool :=
variable {α : Type _}
+#print Directed.fintype_le /-
theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
[Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
classical
obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
#align directed.fintype_le Directed.fintype_le
+-/
+#print Fintype.exists_le /-
theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
directed_id.fintype_le _
#align fintype.exists_le Fintype.exists_le
+-/
+#print Fintype.bddAbove_range /-
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) :=
by
@@ -225,4 +230,5 @@ theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (·
obtain ⟨b, rfl⟩ := ha
exact hM b
#align fintype.bdd_above_range Fintype.bddAbove_range
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -126,14 +126,14 @@ noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α]
α with
iInf_sup_le_sup_inf := fun a s =>
by
- convert(Finset.inf_sup_distrib_left _ _ _).ge
- convert(Finset.inf_eq_iInf _ _).symm
+ convert (Finset.inf_sup_distrib_left _ _ _).ge
+ convert (Finset.inf_eq_iInf _ _).symm
simp_rw [Set.mem_toFinset]
rfl
inf_sup_le_iSup_inf := fun a s =>
by
- convert(Finset.sup_inf_distrib_left _ _ _).le
- convert(Finset.sup_eq_iSup _ _).symm
+ convert (Finset.sup_inf_distrib_left _ _ _).le
+ convert (Finset.sup_eq_iSup _ _).symm
simp_rw [Set.mem_toFinset]
rfl }
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
@@ -208,8 +208,8 @@ variable {α : Type _}
theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
[Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
classical
- obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
- exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
+ obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
+ exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
#align directed.fintype_le Directed.fintype_le
theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -60,6 +60,7 @@ section Nonempty
variable (α) [Nonempty α]
+#print Fintype.toOrderBot /-
-- See note [reducible non-instances]
/-- Constructs the `⊥` of a finite nonempty `semilattice_inf`. -/
@[reducible]
@@ -68,7 +69,9 @@ def toOrderBot [SemilatticeInf α] : OrderBot α
bot := univ.inf' univ_nonempty id
bot_le a := inf'_le _ <| mem_univ a
#align fintype.to_order_bot Fintype.toOrderBot
+-/
+#print Fintype.toOrderTop /-
-- See note [reducible non-instances]
/-- Constructs the `⊤` of a finite nonempty `semilattice_sup` -/
@[reducible]
@@ -77,13 +80,16 @@ def toOrderTop [SemilatticeSup α] : OrderTop α
top := univ.sup' univ_nonempty id
le_top a := le_sup' _ <| mem_univ a
#align fintype.to_order_top Fintype.toOrderTop
+-/
+#print Fintype.toBoundedOrder /-
-- See note [reducible non-instances]
/-- Constructs the `⊤` and `⊥` of a finite nonempty `lattice`. -/
@[reducible]
def toBoundedOrder [Lattice α] : BoundedOrder α :=
{ toOrderBot α, toOrderTop α with }
#align fintype.to_bounded_order Fintype.toBoundedOrder
+-/
end Nonempty
@@ -91,8 +97,9 @@ section BoundedOrder
variable (α)
-open Classical
+open scoped Classical
+#print Fintype.toCompleteLattice /-
-- See note [reducible non-instances]
/-- A finite bounded lattice is complete. -/
@[reducible]
@@ -106,7 +113,9 @@ noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLat
inf_le := fun _ _ ha => Finset.inf_le (Set.mem_toFinset.mpr ha)
le_inf := fun s _ ha => Finset.le_inf fun b hb => ha _ <| Set.mem_toFinset.mp hb }
#align fintype.to_complete_lattice Fintype.toCompleteLattice
+-/
+#print Fintype.toCompleteDistribLattice /-
-- See note [reducible non-instances]
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
@@ -128,13 +137,16 @@ noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α]
simp_rw [Set.mem_toFinset]
rfl }
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
+-/
+#print Fintype.toCompleteLinearOrder /-
-- See note [reducible non-instances]
/-- A finite bounded linear order is complete. -/
@[reducible]
noncomputable def toCompleteLinearOrder [LinearOrder α] [BoundedOrder α] : CompleteLinearOrder α :=
{ toCompleteLattice α, ‹LinearOrder α› with }
#align fintype.to_complete_linear_order Fintype.toCompleteLinearOrder
+-/
#print Fintype.toCompleteBooleanAlgebra /-
-- See note [reducible non-instances]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -60,12 +60,6 @@ section Nonempty
variable (α) [Nonempty α]
-/- warning: fintype.to_order_bot -> Fintype.toOrderBot is a dubious translation:
-lean 3 declaration is
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeInf.{u1} α], OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_4)))
-but is expected to have type
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeInf.{u1} α], OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_4)))
-Case conversion may be inaccurate. Consider using '#align fintype.to_order_bot Fintype.toOrderBotₓ'. -/
-- See note [reducible non-instances]
/-- Constructs the `⊥` of a finite nonempty `semilattice_inf`. -/
@[reducible]
@@ -75,12 +69,6 @@ def toOrderBot [SemilatticeInf α] : OrderBot α
bot_le a := inf'_le _ <| mem_univ a
#align fintype.to_order_bot Fintype.toOrderBot
-/- warning: fintype.to_order_top -> Fintype.toOrderTop is a dubious translation:
-lean 3 declaration is
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeSup.{u1} α], OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_4)))
-but is expected to have type
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeSup.{u1} α], OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_4)))
-Case conversion may be inaccurate. Consider using '#align fintype.to_order_top Fintype.toOrderTopₓ'. -/
-- See note [reducible non-instances]
/-- Constructs the `⊤` of a finite nonempty `semilattice_sup` -/
@[reducible]
@@ -90,12 +78,6 @@ def toOrderTop [SemilatticeSup α] : OrderTop α
le_top a := le_sup' _ <| mem_univ a
#align fintype.to_order_top Fintype.toOrderTop
-/- warning: fintype.to_bounded_order -> Fintype.toBoundedOrder is a dubious translation:
-lean 3 declaration is
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : Lattice.{u1} α], BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_4))))
-but is expected to have type
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : Lattice.{u1} α], BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_4))))
-Case conversion may be inaccurate. Consider using '#align fintype.to_bounded_order Fintype.toBoundedOrderₓ'. -/
-- See note [reducible non-instances]
/-- Constructs the `⊤` and `⊥` of a finite nonempty `lattice`. -/
@[reducible]
@@ -111,12 +93,6 @@ variable (α)
open Classical
-/- warning: fintype.to_complete_lattice -> Fintype.toCompleteLattice is a dubious translation:
-lean 3 declaration is
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Lattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_3))))], CompleteLattice.{u1} α
-but is expected to have type
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Lattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_3))))], CompleteLattice.{u1} α
-Case conversion may be inaccurate. Consider using '#align fintype.to_complete_lattice Fintype.toCompleteLatticeₓ'. -/
-- See note [reducible non-instances]
/-- A finite bounded lattice is complete. -/
@[reducible]
@@ -131,12 +107,6 @@ noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLat
le_inf := fun s _ ha => Finset.le_inf fun b hb => ha _ <| Set.mem_toFinset.mp hb }
#align fintype.to_complete_lattice Fintype.toCompleteLattice
-/- warning: fintype.to_complete_distrib_lattice -> Fintype.toCompleteDistribLattice is a dubious translation:
-lean 3 declaration is
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : DistribLattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α _inst_3)))))], CompleteDistribLattice.{u1} α
-but is expected to have type
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : DistribLattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α _inst_3)))))], CompleteDistribLattice.{u1} α
-Case conversion may be inaccurate. Consider using '#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLatticeₓ'. -/
-- See note [reducible non-instances]
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
@@ -159,12 +129,6 @@ noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α]
rfl }
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
-/- warning: fintype.to_complete_linear_order -> Fintype.toCompleteLinearOrder is a dubious translation:
-lean 3 declaration is
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : LinearOrder.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_3)))))], CompleteLinearOrder.{u1} α
-but is expected to have type
- forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : LinearOrder.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_3))))))], CompleteLinearOrder.{u1} α
-Case conversion may be inaccurate. Consider using '#align fintype.to_complete_linear_order Fintype.toCompleteLinearOrderₓ'. -/
-- See note [reducible non-instances]
/-- A finite bounded linear order is complete. -/
@[reducible]
@@ -229,12 +193,6 @@ noncomputable instance : CompleteBooleanAlgebra Bool :=
variable {α : Type _}
-/- warning: directed.fintype_le -> Directed.fintype_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {r : α -> α -> Prop} [_inst_1 : IsTrans.{u1} α r] {β : Type.{u2}} {γ : Type.{u3}} [_inst_2 : Nonempty.{succ u3} γ] {f : γ -> α} [_inst_3 : Fintype.{u2} β], (Directed.{u1, succ u3} α γ r f) -> (forall (g : β -> γ), Exists.{succ u3} γ (fun (z : γ) => forall (i : β), r (f (g i)) (f z)))
-but is expected to have type
- forall {α : Type.{u3}} {r : α -> α -> Prop} [_inst_1 : IsTrans.{u3} α r] {β : Type.{u2}} {γ : Type.{u1}} [_inst_2 : Nonempty.{succ u1} γ] {f : γ -> α} [_inst_3 : Fintype.{u2} β], (Directed.{u3, succ u1} α γ r f) -> (forall (g : β -> γ), Exists.{succ u1} γ (fun (z : γ) => forall (i : β), r (f (g i)) (f z)))
-Case conversion may be inaccurate. Consider using '#align directed.fintype_le Directed.fintype_leₓ'. -/
theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
[Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
classical
@@ -242,23 +200,11 @@ theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Typ
exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
#align directed.fintype_le Directed.fintype_le
-/- warning: fintype.exists_le -> Fintype.exists_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), Exists.{succ u1} α (fun (M : α) => forall (i : β), LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (f i) M)
-but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1044 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1046 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1044 x._@.Mathlib.Data.Fintype.Order._hyg.1046)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
-Case conversion may be inaccurate. Consider using '#align fintype.exists_le Fintype.exists_leₓ'. -/
theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
directed_id.fintype_le _
#align fintype.exists_le Fintype.exists_le
-/- warning: fintype.bdd_above_range -> Fintype.bddAbove_range is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), BddAbove.{u1} α _inst_2 (Set.range.{u1, succ u2} α β f)
-but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1099 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1101 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1099 x._@.Mathlib.Data.Fintype.Order._hyg.1101)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
-Case conversion may be inaccurate. Consider using '#align fintype.bdd_above_range Fintype.bddAbove_rangeₓ'. -/
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -60,7 +60,12 @@ section Nonempty
variable (α) [Nonempty α]
-#print Fintype.toOrderBot /-
+/- warning: fintype.to_order_bot -> Fintype.toOrderBot is a dubious translation:
+lean 3 declaration is
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeInf.{u1} α], OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_4)))
+but is expected to have type
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeInf.{u1} α], OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_4)))
+Case conversion may be inaccurate. Consider using '#align fintype.to_order_bot Fintype.toOrderBotₓ'. -/
-- See note [reducible non-instances]
/-- Constructs the `⊥` of a finite nonempty `semilattice_inf`. -/
@[reducible]
@@ -69,9 +74,13 @@ def toOrderBot [SemilatticeInf α] : OrderBot α
bot := univ.inf' univ_nonempty id
bot_le a := inf'_le _ <| mem_univ a
#align fintype.to_order_bot Fintype.toOrderBot
--/
-#print Fintype.toOrderTop /-
+/- warning: fintype.to_order_top -> Fintype.toOrderTop is a dubious translation:
+lean 3 declaration is
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeSup.{u1} α], OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_4)))
+but is expected to have type
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : SemilatticeSup.{u1} α], OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_4)))
+Case conversion may be inaccurate. Consider using '#align fintype.to_order_top Fintype.toOrderTopₓ'. -/
-- See note [reducible non-instances]
/-- Constructs the `⊤` of a finite nonempty `semilattice_sup` -/
@[reducible]
@@ -80,16 +89,19 @@ def toOrderTop [SemilatticeSup α] : OrderTop α
top := univ.sup' univ_nonempty id
le_top a := le_sup' _ <| mem_univ a
#align fintype.to_order_top Fintype.toOrderTop
--/
-#print Fintype.toBoundedOrder /-
+/- warning: fintype.to_bounded_order -> Fintype.toBoundedOrder is a dubious translation:
+lean 3 declaration is
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : Lattice.{u1} α], BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_4))))
+but is expected to have type
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Nonempty.{succ u1} α] [_inst_4 : Lattice.{u1} α], BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_4))))
+Case conversion may be inaccurate. Consider using '#align fintype.to_bounded_order Fintype.toBoundedOrderₓ'. -/
-- See note [reducible non-instances]
/-- Constructs the `⊤` and `⊥` of a finite nonempty `lattice`. -/
@[reducible]
def toBoundedOrder [Lattice α] : BoundedOrder α :=
{ toOrderBot α, toOrderTop α with }
#align fintype.to_bounded_order Fintype.toBoundedOrder
--/
end Nonempty
@@ -99,7 +111,12 @@ variable (α)
open Classical
-#print Fintype.toCompleteLattice /-
+/- warning: fintype.to_complete_lattice -> Fintype.toCompleteLattice is a dubious translation:
+lean 3 declaration is
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Lattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_3))))], CompleteLattice.{u1} α
+but is expected to have type
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : Lattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α _inst_3))))], CompleteLattice.{u1} α
+Case conversion may be inaccurate. Consider using '#align fintype.to_complete_lattice Fintype.toCompleteLatticeₓ'. -/
-- See note [reducible non-instances]
/-- A finite bounded lattice is complete. -/
@[reducible]
@@ -113,9 +130,13 @@ noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLat
inf_le := fun _ _ ha => Finset.inf_le (Set.mem_toFinset.mpr ha)
le_inf := fun s _ ha => Finset.le_inf fun b hb => ha _ <| Set.mem_toFinset.mp hb }
#align fintype.to_complete_lattice Fintype.toCompleteLattice
--/
-#print Fintype.toCompleteDistribLattice /-
+/- warning: fintype.to_complete_distrib_lattice -> Fintype.toCompleteDistribLattice is a dubious translation:
+lean 3 declaration is
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : DistribLattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α _inst_3)))))], CompleteDistribLattice.{u1} α
+but is expected to have type
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : DistribLattice.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α _inst_3)))))], CompleteDistribLattice.{u1} α
+Case conversion may be inaccurate. Consider using '#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLatticeₓ'. -/
-- See note [reducible non-instances]
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
@@ -137,16 +158,19 @@ noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α]
simp_rw [Set.mem_toFinset]
rfl }
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
--/
-#print Fintype.toCompleteLinearOrder /-
+/- warning: fintype.to_complete_linear_order -> Fintype.toCompleteLinearOrder is a dubious translation:
+lean 3 declaration is
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : LinearOrder.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_3)))))], CompleteLinearOrder.{u1} α
+but is expected to have type
+ forall (α : Type.{u1}) [_inst_2 : Fintype.{u1} α] [_inst_3 : LinearOrder.{u1} α] [_inst_4 : BoundedOrder.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_3))))))], CompleteLinearOrder.{u1} α
+Case conversion may be inaccurate. Consider using '#align fintype.to_complete_linear_order Fintype.toCompleteLinearOrderₓ'. -/
-- See note [reducible non-instances]
/-- A finite bounded linear order is complete. -/
@[reducible]
noncomputable def toCompleteLinearOrder [LinearOrder α] [BoundedOrder α] : CompleteLinearOrder α :=
{ toCompleteLattice α, ‹LinearOrder α› with }
#align fintype.to_complete_linear_order Fintype.toCompleteLinearOrder
--/
#print Fintype.toCompleteBooleanAlgebra /-
-- See note [reducible non-instances]
@@ -220,7 +244,7 @@ theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Typ
/- warning: fintype.exists_le -> Fintype.exists_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), Exists.{succ u1} α (fun (M : α) => forall (i : β), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (f i) M)
+ forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), Exists.{succ u1} α (fun (M : α) => forall (i : β), LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (f i) M)
but is expected to have type
forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1044 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1046 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1044 x._@.Mathlib.Data.Fintype.Order._hyg.1046)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
Case conversion may be inaccurate. Consider using '#align fintype.exists_le Fintype.exists_leₓ'. -/
@@ -231,7 +255,7 @@ theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)
/- warning: fintype.bdd_above_range -> Fintype.bddAbove_range is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), BddAbove.{u1} α _inst_2 (Set.range.{u1, succ u2} α β f)
+ forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), BddAbove.{u1} α _inst_2 (Set.range.{u1, succ u2} α β f)
but is expected to have type
forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1099 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1101 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1099 x._@.Mathlib.Data.Fintype.Order._hyg.1101)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
Case conversion may be inaccurate. Consider using '#align fintype.bdd_above_range Fintype.bddAbove_rangeₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -106,8 +106,8 @@ open Classical
noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLattice α :=
{ ‹Lattice α›,
‹BoundedOrder α› with
- supₛ := fun s => s.toFinset.sup id
- infₛ := fun s => s.toFinset.inf id
+ sSup := fun s => s.toFinset.sup id
+ sInf := fun s => s.toFinset.inf id
le_sup := fun _ _ ha => Finset.le_sup (Set.mem_toFinset.mpr ha)
sup_le := fun s _ ha => Finset.sup_le fun b hb => ha _ <| Set.mem_toFinset.mp hb
inf_le := fun _ _ ha => Finset.inf_le (Set.mem_toFinset.mpr ha)
@@ -124,16 +124,16 @@ noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α]
{
toCompleteLattice
α with
- infᵢ_sup_le_sup_inf := fun a s =>
+ iInf_sup_le_sup_inf := fun a s =>
by
convert(Finset.inf_sup_distrib_left _ _ _).ge
- convert(Finset.inf_eq_infᵢ _ _).symm
+ convert(Finset.inf_eq_iInf _ _).symm
simp_rw [Set.mem_toFinset]
rfl
- inf_sup_le_supᵢ_inf := fun a s =>
+ inf_sup_le_iSup_inf := fun a s =>
by
convert(Finset.sup_inf_distrib_left _ _ _).le
- convert(Finset.sup_eq_supᵢ _ _).symm
+ convert(Finset.sup_eq_iSup _ _).symm
simp_rw [Set.mem_toFinset]
rfl }
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -222,7 +222,7 @@ theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Typ
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), Exists.{succ u1} α (fun (M : α) => forall (i : β), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (f i) M)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1052 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1054 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1052 x._@.Mathlib.Data.Fintype.Order._hyg.1054)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1044 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1046 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1044 x._@.Mathlib.Data.Fintype.Order._hyg.1046)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
Case conversion may be inaccurate. Consider using '#align fintype.exists_le Fintype.exists_leₓ'. -/
theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
@@ -233,7 +233,7 @@ theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), BddAbove.{u1} α _inst_2 (Set.range.{u1, succ u2} α β f)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1107 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1109 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1107 x._@.Mathlib.Data.Fintype.Order._hyg.1109)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1099 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1101 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1099 x._@.Mathlib.Data.Fintype.Order._hyg.1101)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
Case conversion may be inaccurate. Consider using '#align fintype.bdd_above_range Fintype.bddAbove_rangeₓ'. -/
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -126,14 +126,14 @@ noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α]
α with
infᵢ_sup_le_sup_inf := fun a s =>
by
- convert (Finset.inf_sup_distrib_left _ _ _).ge
- convert (Finset.inf_eq_infᵢ _ _).symm
+ convert(Finset.inf_sup_distrib_left _ _ _).ge
+ convert(Finset.inf_eq_infᵢ _ _).symm
simp_rw [Set.mem_toFinset]
rfl
inf_sup_le_supᵢ_inf := fun a s =>
by
- convert (Finset.sup_inf_distrib_left _ _ _).le
- convert (Finset.sup_eq_supᵢ _ _).symm
+ convert(Finset.sup_inf_distrib_left _ _ _).le
+ convert(Finset.sup_eq_supᵢ _ _).symm
simp_rw [Set.mem_toFinset]
rfl }
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
@@ -222,7 +222,7 @@ theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Typ
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), Exists.{succ u1} α (fun (M : α) => forall (i : β), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (f i) M)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1012 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1014 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1012 x._@.Mathlib.Data.Fintype.Order._hyg.1014)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1052 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1054 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1052 x._@.Mathlib.Data.Fintype.Order._hyg.1054)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
Case conversion may be inaccurate. Consider using '#align fintype.exists_le Fintype.exists_leₓ'. -/
theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
@@ -233,7 +233,7 @@ theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), BddAbove.{u1} α _inst_2 (Set.range.{u1, succ u2} α β f)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1067 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1069 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1067 x._@.Mathlib.Data.Fintype.Order._hyg.1069)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1107 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1109 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1107 x._@.Mathlib.Data.Fintype.Order._hyg.1109)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
Case conversion may be inaccurate. Consider using '#align fintype.bdd_above_range Fintype.bddAbove_rangeₓ'. -/
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -222,7 +222,7 @@ theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Typ
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), Exists.{succ u1} α (fun (M : α) => forall (i : β), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (f i) M)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.942 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.944 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.942 x._@.Mathlib.Data.Fintype.Order._hyg.944)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1012 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1014 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1012 x._@.Mathlib.Data.Fintype.Order._hyg.1014)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
Case conversion may be inaccurate. Consider using '#align fintype.exists_le Fintype.exists_leₓ'. -/
theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
@@ -233,7 +233,7 @@ theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), BddAbove.{u1} α _inst_2 (Set.range.{u1, succ u2} α β f)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.997 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.999 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.997 x._@.Mathlib.Data.Fintype.Order._hyg.999)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.1067 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.1069 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.1067 x._@.Mathlib.Data.Fintype.Order._hyg.1069)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
Case conversion may be inaccurate. Consider using '#align fintype.bdd_above_range Fintype.bddAbove_rangeₓ'. -/
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -222,7 +222,7 @@ theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Typ
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), Exists.{succ u1} α (fun (M : α) => forall (i : β), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (f i) M)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.938 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.940 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.938 x._@.Mathlib.Data.Fintype.Order._hyg.940)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.942 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.944 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.942 x._@.Mathlib.Data.Fintype.Order._hyg.944)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), Exists.{succ u2} α (fun (M : α) => forall (i : β), LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) (f i) M)
Case conversion may be inaccurate. Consider using '#align fintype.exists_le Fintype.exists_leₓ'. -/
theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
@@ -233,7 +233,7 @@ theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Nonempty.{succ u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))] {β : Type.{u2}} [_inst_4 : Fintype.{u2} β] (f : β -> α), BddAbove.{u1} α _inst_2 (Set.range.{u1, succ u2} α β f)
but is expected to have type
- forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.993 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.995 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.993 x._@.Mathlib.Data.Fintype.Order._hyg.995)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
+ forall {α : Type.{u2}} [_inst_1 : Nonempty.{succ u2} α] [_inst_2 : Preorder.{u2} α] [_inst_3 : IsDirected.{u2} α (fun (x._@.Mathlib.Data.Fintype.Order._hyg.997 : α) (x._@.Mathlib.Data.Fintype.Order._hyg.999 : α) => LE.le.{u2} α (Preorder.toLE.{u2} α _inst_2) x._@.Mathlib.Data.Fintype.Order._hyg.997 x._@.Mathlib.Data.Fintype.Order._hyg.999)] {β : Type.{u1}} [_inst_4 : Fintype.{u1} β] (f : β -> α), BddAbove.{u2} α _inst_2 (Set.range.{u2, succ u1} α β f)
Case conversion may be inaccurate. Consider using '#align fintype.bdd_above_range Fintype.bddAbove_rangeₓ'. -/
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
open Classical
(#11199)
We remove all but one open Classical
s, instead preferring to use open scoped Classical
. The only real side-effect this led to is moving a couple declarations to use Exists.choose
instead of Classical.choose
.
The first few commits are explicitly labelled regex replaces for ease of review.
@@ -84,7 +84,7 @@ section BoundedOrder
variable (α)
-open Classical
+open scoped Classical
-- See note [reducible non-instances]
/-- A finite bounded lattice is complete. -/
This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0
branch as we update to intermediate nightlies.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>
@@ -89,15 +89,15 @@ open Classical
-- See note [reducible non-instances]
/-- A finite bounded lattice is complete. -/
@[reducible]
-noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLattice α :=
- { ‹Lattice α›,
- ‹BoundedOrder α› with
- sSup := fun s => s.toFinset.sup id
- sInf := fun s => s.toFinset.inf id
- le_sSup := fun _ _ ha => Finset.le_sup (f := id) (Set.mem_toFinset.mpr ha)
- sSup_le := fun s _ ha => Finset.sup_le fun b hb => ha _ <| Set.mem_toFinset.mp hb
- sInf_le := fun _ _ ha => Finset.inf_le (Set.mem_toFinset.mpr ha)
- le_sInf := fun s _ ha => Finset.le_inf fun b hb => ha _ <| Set.mem_toFinset.mp hb }
+noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLattice α where
+ __ := ‹Lattice α›
+ __ := ‹BoundedOrder α›
+ sSup := fun s => s.toFinset.sup id
+ sInf := fun s => s.toFinset.inf id
+ le_sSup := fun _ _ ha => Finset.le_sup (f := id) (Set.mem_toFinset.mpr ha)
+ sSup_le := fun s _ ha => Finset.sup_le fun b hb => ha _ <| Set.mem_toFinset.mp hb
+ sInf_le := fun _ _ ha => Finset.inf_le (Set.mem_toFinset.mpr ha)
+ le_sInf := fun s _ ha => Finset.le_inf fun b hb => ha _ <| Set.mem_toFinset.mp hb
#align fintype.to_complete_lattice Fintype.toCompleteLattice
-- Porting note: `convert` doesn't work as well as it used to.
@@ -105,18 +105,18 @@ noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLat
/-- A finite bounded distributive lattice is completely distributive. -/
@[reducible]
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
- CompleteDistribLattice α :=
- { toCompleteLattice α with
- iInf_sup_le_sup_sInf := fun a s => by
- convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
- rw [Finset.inf_eq_iInf]
- simp_rw [Set.mem_toFinset]
- rfl
- inf_sSup_le_iSup_inf := fun a s => by
- convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
- rw [Finset.sup_eq_iSup]
- simp_rw [Set.mem_toFinset]
- rfl }
+ CompleteDistribLattice α where
+ __ := toCompleteLattice α
+ iInf_sup_le_sup_sInf := fun a s => by
+ convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
+ rw [Finset.inf_eq_iInf]
+ simp_rw [Set.mem_toFinset]
+ rfl
+ inf_sSup_le_iSup_inf := fun a s => by
+ convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
+ rw [Finset.sup_eq_iSup]
+ simp_rw [Set.mem_toFinset]
+ rfl
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
-- See note [reducible non-instances]
@@ -129,20 +129,9 @@ noncomputable def toCompleteLinearOrder [LinearOrder α] [BoundedOrder α] : Com
-- See note [reducible non-instances]
/-- A finite boolean algebra is complete. -/
@[reducible]
-noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α :=
- -- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
- { Fintype.toCompleteLattice α,
- ‹BooleanAlgebra α› with
- iInf_sup_le_sup_sInf := fun a s => by
- convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
- rw [Finset.inf_eq_iInf]
- simp_rw [Set.mem_toFinset]
- rfl
- inf_sSup_le_iSup_inf := fun a s => by
- convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
- rw [Finset.sup_eq_iSup]
- simp_rw [Set.mem_toFinset]
- rfl }
+noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBooleanAlgebra α where
+ __ := ‹BooleanAlgebra α›
+ __ := Fintype.toCompleteDistribLattice α
#align fintype.to_complete_boolean_algebra Fintype.toCompleteBooleanAlgebra
-- See note [reducible non-instances]
@@ -3,7 +3,6 @@ Copyright (c) 2021 Peter Nelson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Peter Nelson, Yaël Dillies
-/
-import Mathlib.Data.Fintype.Lattice
import Mathlib.Data.Finset.Order
import Mathlib.Order.Atoms.Finite
@@ -198,35 +198,50 @@ noncomputable instance Bool.completeAtomicBooleanAlgebra : CompleteAtomicBoolean
/-! ### Directed Orders -/
-variable {α : Type*}
+variable {α : Type*} {r : α → α → Prop} [IsTrans α r] {β γ : Type*} [Nonempty γ] {f : γ → α}
+ [Finite β] (D : Directed r f)
-theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type*} [Nonempty γ] {f : γ → α}
- [Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
+theorem Directed.finite_set_le {s : Set γ} (hs : s.Finite) : ∃ z, ∀ i ∈ s, r (f i) (f z) := by
+ convert D.finset_le hs.toFinset; rw [Set.Finite.mem_toFinset]
+
+theorem Directed.finite_le (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
classical
- obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
- exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
-#align directed.fintype_le Directed.fintype_le
-
-theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*} [Fintype β]
- (f : β → α) : ∃ M, ∀ i, f i ≤ M :=
- directed_id.fintype_le _
-#align fintype.exists_le Fintype.exists_le
-
-theorem Fintype.exists_ge [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*} [Fintype β]
- (f : β → α) : ∃ M, ∀ i, M ≤ f i :=
- directed_id.fintype_le (r := (· ≥ ·)) _
-
-theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*}
- [Fintype β] (f : β → α) : BddAbove (Set.range f) := by
- obtain ⟨M, hM⟩ := Fintype.exists_le f
+ obtain ⟨z, hz⟩ := D.finite_set_le (Set.finite_range g)
+ exact ⟨z, fun i => hz (g i) ⟨i, rfl⟩⟩
+#align directed.fintype_le Directed.finite_le
+
+variable [Nonempty α] [Preorder α]
+
+theorem Finite.exists_le [IsDirected α (· ≤ ·)] (f : β → α) : ∃ M, ∀ i, f i ≤ M :=
+ directed_id.finite_le _
+#align fintype.exists_le Finite.exists_le
+
+theorem Finite.exists_ge [IsDirected α (· ≥ ·)] (f : β → α) : ∃ M, ∀ i, M ≤ f i :=
+ directed_id.finite_le (r := (· ≥ ·)) _
+
+theorem Set.Finite.exists_le [IsDirected α (· ≤ ·)] {s : Set α} (hs : s.Finite) :
+ ∃ M, ∀ i ∈ s, i ≤ M :=
+ directed_id.finite_set_le hs
+
+theorem Set.Finite.exists_ge [IsDirected α (· ≥ ·)] {s : Set α} (hs : s.Finite) :
+ ∃ M, ∀ i ∈ s, M ≤ i :=
+ directed_id.finite_set_le (r := (· ≥ ·)) hs
+
+theorem Finite.bddAbove_range [IsDirected α (· ≤ ·)] (f : β → α) : BddAbove (Set.range f) := by
+ obtain ⟨M, hM⟩ := Finite.exists_le f
refine' ⟨M, fun a ha => _⟩
obtain ⟨b, rfl⟩ := ha
exact hM b
-#align fintype.bdd_above_range Fintype.bddAbove_range
+#align fintype.bdd_above_range Finite.bddAbove_range
-theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*}
- [Fintype β] (f : β → α) : BddBelow (Set.range f) := by
- obtain ⟨M, hM⟩ := Fintype.exists_ge f
+theorem Finite.bddBelow_range [IsDirected α (· ≥ ·)] (f : β → α) : BddBelow (Set.range f) := by
+ obtain ⟨M, hM⟩ := Finite.exists_ge f
refine' ⟨M, fun a ha => _⟩
obtain ⟨b, rfl⟩ := ha
exact hM b
+
+@[deprecated] alias Directed.fintype_le := Directed.finite_le
+@[deprecated] alias Fintype.exists_le := Finite.exists_le
+@[deprecated] alias Fintype.exists_ge := Finite.exists_ge
+@[deprecated] alias Fintype.bddAbove_range := Finite.bddAbove_range
+@[deprecated] alias Fintype.bddBelow_range := Finite.bddBelow_range
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -49,7 +49,7 @@ open Finset
namespace Fintype
-variable {ι α : Type _} [Fintype ι] [Fintype α]
+variable {ι α : Type*} [Fintype ι] [Fintype α]
section Nonempty
@@ -198,25 +198,25 @@ noncomputable instance Bool.completeAtomicBooleanAlgebra : CompleteAtomicBoolean
/-! ### Directed Orders -/
-variable {α : Type _}
+variable {α : Type*}
-theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type _} [Nonempty γ] {f : γ → α}
+theorem Directed.fintype_le {r : α → α → Prop} [IsTrans α r] {β γ : Type*} [Nonempty γ] {f : γ → α}
[Fintype β] (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z) := by
classical
obtain ⟨z, hz⟩ := D.finset_le (Finset.image g Finset.univ)
exact ⟨z, fun i => hz (g i) (Finset.mem_image_of_mem g (Finset.mem_univ i))⟩
#align directed.fintype_le Directed.fintype_le
-theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _} [Fintype β]
+theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*} [Fintype β]
(f : β → α) : ∃ M, ∀ i, f i ≤ M :=
directed_id.fintype_le _
#align fintype.exists_le Fintype.exists_le
-theorem Fintype.exists_ge [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type _} [Fintype β]
+theorem Fintype.exists_ge [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*} [Fintype β]
(f : β → α) : ∃ M, ∀ i, M ≤ f i :=
directed_id.fintype_le (r := (· ≥ ·)) _
-theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
+theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type*}
[Fintype β] (f : β → α) : BddAbove (Set.range f) := by
obtain ⟨M, hM⟩ := Fintype.exists_le f
refine' ⟨M, fun a ha => _⟩
@@ -224,7 +224,7 @@ theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (·
exact hM b
#align fintype.bdd_above_range Fintype.bddAbove_range
-theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type _}
+theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type*}
[Fintype β] (f : β → α) : BddBelow (Set.range f) := by
obtain ⟨M, hM⟩ := Fintype.exists_ge f
refine' ⟨M, fun a ha => _⟩
@@ -2,16 +2,13 @@
Copyright (c) 2021 Peter Nelson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Peter Nelson, Yaël Dillies
-
-! This file was ported from Lean 3 source module data.fintype.order
-! leanprover-community/mathlib commit 1126441d6bccf98c81214a0780c73d499f6721fe
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Fintype.Lattice
import Mathlib.Data.Finset.Order
import Mathlib.Order.Atoms.Finite
+#align_import data.fintype.order from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
+
/-!
# Order structures on finite types
@@ -34,7 +34,7 @@ and set membership is undecidable in general.
On a `Fintype`, we can promote:
* a `Lattice` to a `CompleteLattice`.
* a `DistribLattice` to a `CompleteDistribLattice`.
-* a `LinearOrder` to a `CompleteLinearOrder`.
+* a `LinearOrder` to a `CompleteLinearOrder`.
* a `BooleanAlgebra` to a `CompleteAtomicBooleanAlgebra`.
Those are marked as `def` to avoid typeclass loops.
Adds new CompletelyDistribLattice
/CompleteAtomicBooleanAlgebra
classes for complete lattices / complete atomic Boolean algebras that are also completely distributive, and removes the misleading claim that CompleteDistribLattice
/CompleteBooleanAlgebra
are completely distributive.
CompleteDistribLattice
instances are upgraded to CompletelyDistribLattice
.CompleteBooleanAlgebra
instances are upgraded to CompleteAtomicBooleanAlgebra
.@@ -10,6 +10,7 @@ Authors: Peter Nelson, Yaël Dillies
-/
import Mathlib.Data.Fintype.Lattice
import Mathlib.Data.Finset.Order
+import Mathlib.Order.Atoms.Finite
/-!
# Order structures on finite types
@@ -34,7 +35,7 @@ On a `Fintype`, we can promote:
* a `Lattice` to a `CompleteLattice`.
* a `DistribLattice` to a `CompleteDistribLattice`.
* a `LinearOrder` to a `CompleteLinearOrder`.
-* a `BooleanAlgebra` to a `CompleteBooleanAlgebra`.
+* a `BooleanAlgebra` to a `CompleteAtomicBooleanAlgebra`.
Those are marked as `def` to avoid typeclass loops.
@@ -148,6 +149,13 @@ noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBoolean
rfl }
#align fintype.to_complete_boolean_algebra Fintype.toCompleteBooleanAlgebra
+-- See note [reducible non-instances]
+/-- A finite boolean algebra is complete and atomic. -/
+@[reducible]
+noncomputable def toCompleteAtomicBooleanAlgebra [BooleanAlgebra α] :
+ CompleteAtomicBooleanAlgebra α :=
+ (toCompleteBooleanAlgebra α).toCompleteAtomicBooleanAlgebra
+
end BoundedOrder
section Nonempty
@@ -187,6 +195,9 @@ noncomputable instance Bool.completeLinearOrder : CompleteLinearOrder Bool :=
noncomputable instance Bool.completeBooleanAlgebra : CompleteBooleanAlgebra Bool :=
Fintype.toCompleteBooleanAlgebra _
+noncomputable instance Bool.completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra Bool :=
+ Fintype.toCompleteAtomicBooleanAlgebra _
+
/-! ### Directed Orders -/
@@ -204,6 +204,10 @@ theorem Fintype.exists_le [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)
directed_id.fintype_le _
#align fintype.exists_le Fintype.exists_le
+theorem Fintype.exists_ge [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type _} [Fintype β]
+ (f : β → α) : ∃ M, ∀ i, M ≤ f i :=
+ directed_id.fintype_le (r := (· ≥ ·)) _
+
theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (· ≤ ·)] {β : Type _}
[Fintype β] (f : β → α) : BddAbove (Set.range f) := by
obtain ⟨M, hM⟩ := Fintype.exists_le f
@@ -211,3 +215,10 @@ theorem Fintype.bddAbove_range [Nonempty α] [Preorder α] [IsDirected α (·
obtain ⟨b, rfl⟩ := ha
exact hM b
#align fintype.bdd_above_range Fintype.bddAbove_range
+
+theorem Fintype.bddBelow_range [Nonempty α] [Preorder α] [IsDirected α (· ≥ ·)] {β : Type _}
+ [Fintype β] (f : β → α) : BddBelow (Set.range f) := by
+ obtain ⟨M, hM⟩ := Fintype.exists_ge f
+ refine' ⟨M, fun a ha => _⟩
+ obtain ⟨b, rfl⟩ := ha
+ exact hM b
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -27,7 +27,7 @@ Those are marked as `def` to avoid defeqness issues.
## Completion instances
-Those instances are noncomputable because the definitions of `supₛ` and `infₛ` use `Set.toFinset`
+Those instances are noncomputable because the definitions of `sSup` and `sInf` use `Set.toFinset`
and set membership is undecidable in general.
On a `Fintype`, we can promote:
@@ -95,12 +95,12 @@ open Classical
noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLattice α :=
{ ‹Lattice α›,
‹BoundedOrder α› with
- supₛ := fun s => s.toFinset.sup id
- infₛ := fun s => s.toFinset.inf id
- le_supₛ := fun _ _ ha => Finset.le_sup (f := id) (Set.mem_toFinset.mpr ha)
- supₛ_le := fun s _ ha => Finset.sup_le fun b hb => ha _ <| Set.mem_toFinset.mp hb
- infₛ_le := fun _ _ ha => Finset.inf_le (Set.mem_toFinset.mpr ha)
- le_infₛ := fun s _ ha => Finset.le_inf fun b hb => ha _ <| Set.mem_toFinset.mp hb }
+ sSup := fun s => s.toFinset.sup id
+ sInf := fun s => s.toFinset.inf id
+ le_sSup := fun _ _ ha => Finset.le_sup (f := id) (Set.mem_toFinset.mpr ha)
+ sSup_le := fun s _ ha => Finset.sup_le fun b hb => ha _ <| Set.mem_toFinset.mp hb
+ sInf_le := fun _ _ ha => Finset.inf_le (Set.mem_toFinset.mpr ha)
+ le_sInf := fun s _ ha => Finset.le_inf fun b hb => ha _ <| Set.mem_toFinset.mp hb }
#align fintype.to_complete_lattice Fintype.toCompleteLattice
-- Porting note: `convert` doesn't work as well as it used to.
@@ -110,14 +110,14 @@ noncomputable def toCompleteLattice [Lattice α] [BoundedOrder α] : CompleteLat
noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α] :
CompleteDistribLattice α :=
{ toCompleteLattice α with
- infᵢ_sup_le_sup_infₛ := fun a s => by
+ iInf_sup_le_sup_sInf := fun a s => by
convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
- rw [Finset.inf_eq_infᵢ]
+ rw [Finset.inf_eq_iInf]
simp_rw [Set.mem_toFinset]
rfl
- inf_supₛ_le_supᵢ_inf := fun a s => by
+ inf_sSup_le_iSup_inf := fun a s => by
convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
- rw [Finset.sup_eq_supᵢ]
+ rw [Finset.sup_eq_iSup]
simp_rw [Set.mem_toFinset]
rfl }
#align fintype.to_complete_distrib_lattice Fintype.toCompleteDistribLattice
@@ -136,14 +136,14 @@ noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBoolean
-- Porting note: using `Fintype.toCompleteDistribLattice α` caused timeouts
{ Fintype.toCompleteLattice α,
‹BooleanAlgebra α› with
- infᵢ_sup_le_sup_infₛ := fun a s => by
+ iInf_sup_le_sup_sInf := fun a s => by
convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
- rw [Finset.inf_eq_infᵢ]
+ rw [Finset.inf_eq_iInf]
simp_rw [Set.mem_toFinset]
rfl
- inf_supₛ_le_supᵢ_inf := fun a s => by
+ inf_sSup_le_iSup_inf := fun a s => by
convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
- rw [Finset.sup_eq_supᵢ]
+ rw [Finset.sup_eq_iSup]
simp_rw [Set.mem_toFinset]
rfl }
#align fintype.to_complete_boolean_algebra Fintype.toCompleteBooleanAlgebra
congr!
and convert
(#2606)
congr!
, convert
, and convert_to
to control parts of the congruence algorithm, in particular transparency settings when applying congruence lemmas.congr!
now applies congruence lemmas with reducible transparency by default. This prevents it from unfolding definitions when applying congruence lemmas. It also now tries both the LHS-biased and RHS-biased simp congruence lemmas, with a configuration option to set which it should try first.HEq
congruence lemma generator that gives each hypothesis access to the proofs of previous hypotheses. This means that if you have an equality ⊢ ⟨a, x⟩ = ⟨b, y⟩
of sigma types, congr!
turns this into goals ⊢ a = b
and ⊢ a = b → HEq x y
(note that congr!
will also auto-introduce a = b
for you in the second goal). This congruence lemma generator applies to more cases than the simp congruence lemma generator does.congr!
(and hence convert
) are more careful about applying lemmas that don't force definitions to unfold. There were a number of cases in mathlib where the implementation of congr
was being abused to unfold definitions.set_option trace.congr! true
you can see what congr!
sees when it is deciding on congruence lemmas.convert_to
to do using 1
when there is no using
clause, to match its documentation.Note that congr!
is more capable than congr
at finding a way to equate left-hand sides and right-hand sides, so you will frequently need to limit its depth with a using
clause. However, there is also a new heuristic to prevent considering unlikely-to-be-provable type equalities (controlled by the typeEqs
option), which can help limit the depth automatically.
There is also a predefined configuration that you can invoke with, for example, convert (config := .unfoldSameFun) h
, that causes it to behave more like congr
, including using default transparency when unfolding.
@@ -111,12 +111,12 @@ noncomputable def toCompleteDistribLattice [DistribLattice α] [BoundedOrder α]
CompleteDistribLattice α :=
{ toCompleteLattice α with
infᵢ_sup_le_sup_infₛ := fun a s => by
- convert (Finset.inf_sup_distrib_left s.toFinset id a).ge
+ convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
rw [Finset.inf_eq_infᵢ]
simp_rw [Set.mem_toFinset]
rfl
inf_supₛ_le_supᵢ_inf := fun a s => by
- convert (Finset.sup_inf_distrib_left s.toFinset id a).le
+ convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
rw [Finset.sup_eq_supᵢ]
simp_rw [Set.mem_toFinset]
rfl }
@@ -137,12 +137,12 @@ noncomputable def toCompleteBooleanAlgebra [BooleanAlgebra α] : CompleteBoolean
{ Fintype.toCompleteLattice α,
‹BooleanAlgebra α› with
infᵢ_sup_le_sup_infₛ := fun a s => by
- convert (Finset.inf_sup_distrib_left s.toFinset id a).ge
+ convert (Finset.inf_sup_distrib_left s.toFinset id a).ge using 1
rw [Finset.inf_eq_infᵢ]
simp_rw [Set.mem_toFinset]
rfl
inf_supₛ_le_supᵢ_inf := fun a s => by
- convert (Finset.sup_inf_distrib_left s.toFinset id a).le
+ convert (Finset.sup_inf_distrib_left s.toFinset id a).le using 1
rw [Finset.sup_eq_supᵢ]
simp_rw [Set.mem_toFinset]
rfl }
The unported dependencies are