algebra.order.complete_fieldMathlib.Algebra.Order.CompleteField

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -181,8 +181,7 @@ theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
   refine' (image_subset_iff.2 fun q hq => _).antisymm _
   · rw [mem_set_of_eq, ← sub_lt_iff_lt_add] at hq
     obtain ⟨q₁, hq₁q, hq₁ab⟩ := exists_rat_btwn hq
-    refine' ⟨q₁, q - q₁, _, _, add_sub_cancel'_right _ _⟩ <;> try norm_cast <;>
-      rwa [coe_mem_cut_map_iff]
+    refine' ⟨q₁, q - q₁, _, _, add_sub_cancel _ _⟩ <;> try norm_cast <;> rwa [coe_mem_cut_map_iff]
     exact_mod_cast sub_lt_comm.mp hq₁q
   · rintro _ ⟨_, _, ⟨qa, ha, rfl⟩, ⟨qb, hb, rfl⟩, rfl⟩
     refine' ⟨qa + qb, _, by norm_cast⟩
Diff
@@ -179,7 +179,7 @@ theorem cutMap_bddAbove (a : α) : BddAbove (cutMap β a) :=
 theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
   by
   refine' (image_subset_iff.2 fun q hq => _).antisymm _
-  · rw [mem_set_of_eq, ← sub_lt_iff_lt_add] at hq 
+  · rw [mem_set_of_eq, ← sub_lt_iff_lt_add] at hq
     obtain ⟨q₁, hq₁q, hq₁ab⟩ := exists_rat_btwn hq
     refine' ⟨q₁, q - q₁, _, _, add_sub_cancel'_right _ _⟩ <;> try norm_cast <;>
       rwa [coe_mem_cut_map_iff]
@@ -227,7 +227,7 @@ theorem inducedMap_rat (q : ℚ) : inducedMap α β (q : α) = q :=
   by
   refine'
     csSup_eq_of_forall_le_of_forall_lt_exists_gt (cut_map_nonempty β q) (fun x h => _) fun w h => _
-  · rw [cut_map_coe] at h 
+  · rw [cut_map_coe] at h
     obtain ⟨r, h, rfl⟩ := h
     exact le_of_lt h
   · obtain ⟨q', hwq, hq⟩ := exists_rat_btwn h
@@ -260,7 +260,7 @@ theorem inducedMap_nonneg (ha : 0 ≤ a) : 0 ≤ inducedMap α β a :=
 theorem coe_lt_inducedMap_iff : (q : β) < inducedMap α β a ↔ (q : α) < a :=
   by
   refine' ⟨fun h => _, fun hq => _⟩
-  · rw [← induced_map_rat α] at h 
+  · rw [← induced_map_rat α] at h
     exact (induced_map_mono α β).reflect_lt h
   · obtain ⟨q', hq, hqa⟩ := exists_rat_btwn hq
     apply lt_csSup_of_lt (cut_map_bdd_above β a) (coe_mem_cut_map_iff.mpr hqa)
@@ -338,7 +338,7 @@ theorem exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self (ha : 0 < a) (b : 
     rw [← Rat.cast_zero, coe_mem_cut_map_iff, Rat.cast_zero]
     exact mul_self_pos.2 ha.ne'
   obtain ⟨q, hq, hbq, hqa⟩ := exists_rat_pow_btwn two_ne_zero hba (hb.trans_lt hba)
-  rw [← cast_pow] at hbq 
+  rw [← cast_pow] at hbq
   refine' ⟨(q ^ 2 : ℚ), coe_mem_cut_map_iff.2 _, hbq⟩
   rw [pow_two] at hqa ⊢
   push_cast
Diff
@@ -57,12 +57,12 @@ open Function Rat Real Set
 open scoped Classical Pointwise
 
 #print ConditionallyCompleteLinearOrderedField /-
-/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
 @[protect_proj]
 class ConditionallyCompleteLinearOrderedField (α : Type _) extends
-    "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure",
+    "./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure",
     ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 -/
Diff
@@ -57,12 +57,12 @@ open Function Rat Real Set
 open scoped Classical Pointwise
 
 #print ConditionallyCompleteLinearOrderedField /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
 @[protect_proj]
 class ConditionallyCompleteLinearOrderedField (α : Type _) extends
-    "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure",
+    "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure",
     ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 -/
Diff
@@ -74,7 +74,7 @@ instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedea
     [ConditionallyCompleteLinearOrderedField α] : Archimedean α :=
   archimedean_iff_nat_lt.2
     (by
-      by_contra' h
+      by_contra! h
       obtain ⟨x, h⟩ := h
       have :=
         csSup_le (range_nonempty (coe : ℕ → α))
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2022 Alex J. Best. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex J. Best, Yaël Dillies
 -/
-import Mathbin.Algebra.Order.Hom.Ring
-import Mathbin.Algebra.Order.Pointwise
-import Mathbin.Analysis.SpecialFunctions.Pow.Real
+import Algebra.Order.Hom.Ring
+import Algebra.Order.Pointwise
+import Analysis.SpecialFunctions.Pow.Real
 
 #align_import algebra.order.complete_field from "leanprover-community/mathlib"@"6b31d1eebd64eab86d5bd9936bfaada6ca8b5842"
 
@@ -57,12 +57,12 @@ open Function Rat Real Set
 open scoped Classical Pointwise
 
 #print ConditionallyCompleteLinearOrderedField /-
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
 @[protect_proj]
 class ConditionallyCompleteLinearOrderedField (α : Type _) extends
-    "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure",
+    "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure",
     ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 -/
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Alex J. Best. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex J. Best, Yaël Dillies
-
-! This file was ported from Lean 3 source module algebra.order.complete_field
-! leanprover-community/mathlib commit 6b31d1eebd64eab86d5bd9936bfaada6ca8b5842
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Order.Hom.Ring
 import Mathbin.Algebra.Order.Pointwise
 import Mathbin.Analysis.SpecialFunctions.Pow.Real
 
+#align_import algebra.order.complete_field from "leanprover-community/mathlib"@"6b31d1eebd64eab86d5bd9936bfaada6ca8b5842"
+
 /-!
 # Conditionally complete linear ordered fields
 
Diff
@@ -60,12 +60,12 @@ open Function Rat Real Set
 open scoped Classical Pointwise
 
 #print ConditionallyCompleteLinearOrderedField /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
 @[protect_proj]
 class ConditionallyCompleteLinearOrderedField (α : Type _) extends
-    "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure",
+    "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure",
     ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 -/
@@ -118,22 +118,29 @@ def cutMap (a : α) : Set β :=
 #align linear_ordered_field.cut_map LinearOrderedField.cutMap
 -/
 
+#print LinearOrderedField.cutMap_mono /-
 theorem cutMap_mono (h : a₁ ≤ a₂) : cutMap β a₁ ⊆ cutMap β a₂ :=
   image_subset _ fun _ => h.trans_lt'
 #align linear_ordered_field.cut_map_mono LinearOrderedField.cutMap_mono
+-/
 
 variable {β}
 
+#print LinearOrderedField.mem_cutMap_iff /-
 @[simp]
 theorem mem_cutMap_iff : b ∈ cutMap β a ↔ ∃ q : ℚ, (q : α) < a ∧ (q : β) = b :=
   Iff.rfl
 #align linear_ordered_field.mem_cut_map_iff LinearOrderedField.mem_cutMap_iff
+-/
 
+#print LinearOrderedField.coe_mem_cutMap_iff /-
 @[simp]
 theorem coe_mem_cutMap_iff [CharZero β] : (q : β) ∈ cutMap β a ↔ (q : α) < a :=
   Rat.cast_injective.mem_set_image
 #align linear_ordered_field.coe_mem_cut_map_iff LinearOrderedField.coe_mem_cutMap_iff
+-/
 
+#print LinearOrderedField.cutMap_self /-
 theorem cutMap_self (a : α) : cutMap α a = Iio a ∩ range (coe : ℚ → α) :=
   by
   ext
@@ -143,14 +150,17 @@ theorem cutMap_self (a : α) : cutMap α a = Iio a ∩ range (coe : ℚ → α)
   · rintro ⟨h, q, rfl⟩
     exact ⟨q, h, rfl⟩
 #align linear_ordered_field.cut_map_self LinearOrderedField.cutMap_self
+-/
 
 end DivisionRing
 
 variable (β) [LinearOrderedField β] {a a₁ a₂ : α} {b : β} {q : ℚ}
 
+#print LinearOrderedField.cutMap_coe /-
 theorem cutMap_coe (q : ℚ) : cutMap β (q : α) = coe '' {r : ℚ | (r : β) < q} := by
   simp_rw [cut_map, Rat.cast_lt]
 #align linear_ordered_field.cut_map_coe LinearOrderedField.cutMap_coe
+-/
 
 variable [Archimedean α]
 
@@ -168,6 +178,7 @@ theorem cutMap_bddAbove (a : α) : BddAbove (cutMap β a) :=
 #align linear_ordered_field.cut_map_bdd_above LinearOrderedField.cutMap_bddAbove
 -/
 
+#print LinearOrderedField.cutMap_add /-
 theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
   by
   refine' (image_subset_iff.2 fun q hq => _).antisymm _
@@ -181,6 +192,7 @@ theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
     rw [mem_set_of_eq, cast_add]
     exact add_lt_add ha hb
 #align linear_ordered_field.cut_map_add LinearOrderedField.cutMap_add
+-/
 
 end CutMap
 
@@ -207,10 +219,13 @@ def inducedMap (x : α) : β :=
 
 variable [Archimedean α]
 
+#print LinearOrderedField.inducedMap_mono /-
 theorem inducedMap_mono : Monotone (inducedMap α β) := fun a b h =>
   csSup_le_csSup (cutMap_bddAbove β _) (cutMap_nonempty β _) (cutMap_mono β h)
 #align linear_ordered_field.induced_map_mono LinearOrderedField.inducedMap_mono
+-/
 
+#print LinearOrderedField.inducedMap_rat /-
 theorem inducedMap_rat (q : ℚ) : inducedMap α β (q : α) = q :=
   by
   refine'
@@ -222,21 +237,29 @@ theorem inducedMap_rat (q : ℚ) : inducedMap α β (q : α) = q :=
     rw [cut_map_coe]
     exact ⟨q', ⟨_, hq, rfl⟩, hwq⟩
 #align linear_ordered_field.induced_map_rat LinearOrderedField.inducedMap_rat
+-/
 
+#print LinearOrderedField.inducedMap_zero /-
 @[simp]
 theorem inducedMap_zero : inducedMap α β 0 = 0 := by exact_mod_cast induced_map_rat α β 0
 #align linear_ordered_field.induced_map_zero LinearOrderedField.inducedMap_zero
+-/
 
+#print LinearOrderedField.inducedMap_one /-
 @[simp]
 theorem inducedMap_one : inducedMap α β 1 = 1 := by exact_mod_cast induced_map_rat α β 1
 #align linear_ordered_field.induced_map_one LinearOrderedField.inducedMap_one
+-/
 
 variable {α β} {a : α} {b : β} {q : ℚ}
 
+#print LinearOrderedField.inducedMap_nonneg /-
 theorem inducedMap_nonneg (ha : 0 ≤ a) : 0 ≤ inducedMap α β a :=
   (inducedMap_zero α _).ge.trans <| inducedMap_mono _ _ ha
 #align linear_ordered_field.induced_map_nonneg LinearOrderedField.inducedMap_nonneg
+-/
 
+#print LinearOrderedField.coe_lt_inducedMap_iff /-
 theorem coe_lt_inducedMap_iff : (q : β) < inducedMap α β a ↔ (q : α) < a :=
   by
   refine' ⟨fun h => _, fun hq => _⟩
@@ -246,11 +269,14 @@ theorem coe_lt_inducedMap_iff : (q : β) < inducedMap α β a ↔ (q : α) < a :
     apply lt_csSup_of_lt (cut_map_bdd_above β a) (coe_mem_cut_map_iff.mpr hqa)
     exact_mod_cast hq
 #align linear_ordered_field.coe_lt_induced_map_iff LinearOrderedField.coe_lt_inducedMap_iff
+-/
 
+#print LinearOrderedField.lt_inducedMap_iff /-
 theorem lt_inducedMap_iff : b < inducedMap α β a ↔ ∃ q : ℚ, b < q ∧ (q : α) < a :=
   ⟨fun h => (exists_rat_btwn h).imp fun q => And.imp_right coe_lt_inducedMap_iff.1,
     fun ⟨q, hbq, hqa⟩ => hbq.trans <| by rwa [coe_lt_induced_map_iff]⟩
 #align linear_ordered_field.lt_induced_map_iff LinearOrderedField.lt_inducedMap_iff
+-/
 
 #print LinearOrderedField.inducedMap_self /-
 @[simp]
@@ -269,11 +295,14 @@ theorem inducedMap_inducedMap (a : α) : inducedMap β γ (inducedMap α β a) =
 #align linear_ordered_field.induced_map_induced_map LinearOrderedField.inducedMap_inducedMap
 -/
 
+#print LinearOrderedField.inducedMap_inv_self /-
 @[simp]
 theorem inducedMap_inv_self (b : β) : inducedMap γ β (inducedMap β γ b) = b := by
   rw [induced_map_induced_map, induced_map_self]
 #align linear_ordered_field.induced_map_inv_self LinearOrderedField.inducedMap_inv_self
+-/
 
+#print LinearOrderedField.inducedMap_add /-
 theorem inducedMap_add (x y : α) : inducedMap α β (x + y) = inducedMap α β x + inducedMap α β y :=
   by
   rw [induced_map, cut_map_add]
@@ -281,9 +310,11 @@ theorem inducedMap_add (x y : α) : inducedMap α β (x + y) = inducedMap α β
     csSup_add (cut_map_nonempty β x) (cut_map_bdd_above β x) (cut_map_nonempty β y)
       (cut_map_bdd_above β y)
 #align linear_ordered_field.induced_map_add LinearOrderedField.inducedMap_add
+-/
 
 variable {α β}
 
+#print LinearOrderedField.le_inducedMap_mul_self_of_mem_cutMap /-
 /-- Preparatory lemma for `induced_ring_hom`. -/
 theorem le_inducedMap_mul_self_of_mem_cutMap (ha : 0 < a) (b : β) (hb : b ∈ cutMap β (a * a)) :
     b ≤ inducedMap α β a * inducedMap α β a :=
@@ -298,7 +329,9 @@ theorem le_inducedMap_mul_self_of_mem_cutMap (ha : 0 < a) (b : β) (hb : b ∈ c
       (le_csSup (cut_map_bdd_above β a) <|
         coe_mem_cut_map_iff.2 <| lt_of_mul_self_lt_mul_self ha.le hqa)
 #align linear_ordered_field.le_induced_map_mul_self_of_mem_cut_map LinearOrderedField.le_inducedMap_mul_self_of_mem_cutMap
+-/
 
+#print LinearOrderedField.exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self /-
 /-- Preparatory lemma for `induced_ring_hom`. -/
 theorem exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self (ha : 0 < a) (b : β)
     (hba : b < inducedMap α β a * inducedMap α β a) : ∃ c ∈ cutMap β (a * a), b < c :=
@@ -316,13 +349,16 @@ theorem exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self (ha : 0 < a) (b : 
   exact mul_self_lt_mul_self (by exact_mod_cast hq.le) (hqa'.trans' <| by assumption_mod_cast)
   exact induced_map_nonneg ha.le
 #align linear_ordered_field.exists_mem_cut_map_mul_self_of_lt_induced_map_mul_self LinearOrderedField.exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self
+-/
 
 variable (α β)
 
+#print LinearOrderedField.inducedAddHom /-
 /-- `induced_map` as an additive homomorphism. -/
 def inducedAddHom : α →+ β :=
   ⟨inducedMap α β, inducedMap_zero α β, inducedMap_add α β⟩
 #align linear_ordered_field.induced_add_hom LinearOrderedField.inducedAddHom
+-/
 
 #print LinearOrderedField.inducedOrderRingHom /-
 /-- `induced_map` as an `order_ring_hom`. -/
@@ -353,6 +389,7 @@ def inducedOrderRingHom : α →+*o β :=
 #align linear_ordered_field.induced_order_ring_hom LinearOrderedField.inducedOrderRingHom
 -/
 
+#print LinearOrderedField.inducedOrderRingIso /-
 /-- The isomorphism of ordered rings between two conditionally complete linearly ordered fields. -/
 def inducedOrderRingIso : β ≃+*o γ :=
   { inducedOrderRingHom β γ with
@@ -365,21 +402,28 @@ def inducedOrderRingIso : β ≃+*o γ :=
       simpa [induced_order_ring_hom, AddMonoidHom.mkRingHomOfMulSelfOfTwoNeZero,
         induced_add_hom] using induced_map_mono γ β h }
 #align linear_ordered_field.induced_order_ring_iso LinearOrderedField.inducedOrderRingIso
+-/
 
+#print LinearOrderedField.coe_inducedOrderRingIso /-
 @[simp]
 theorem coe_inducedOrderRingIso : ⇑(inducedOrderRingIso β γ) = inducedMap β γ :=
   rfl
 #align linear_ordered_field.coe_induced_order_ring_iso LinearOrderedField.coe_inducedOrderRingIso
+-/
 
+#print LinearOrderedField.inducedOrderRingIso_symm /-
 @[simp]
 theorem inducedOrderRingIso_symm : (inducedOrderRingIso β γ).symm = inducedOrderRingIso γ β :=
   rfl
 #align linear_ordered_field.induced_order_ring_iso_symm LinearOrderedField.inducedOrderRingIso_symm
+-/
 
+#print LinearOrderedField.inducedOrderRingIso_self /-
 @[simp]
 theorem inducedOrderRingIso_self : inducedOrderRingIso β β = OrderRingIso.refl β :=
   OrderRingIso.ext inducedMap_self
 #align linear_ordered_field.induced_order_ring_iso_self LinearOrderedField.inducedOrderRingIso_self
+-/
 
 open OrderRingIso
 
@@ -401,10 +445,12 @@ section Real
 
 variable {R S : Type _} [OrderedRing R] [LinearOrderedRing S]
 
+#print ringHom_monotone /-
 theorem ringHom_monotone (hR : ∀ r : R, 0 ≤ r → ∃ s : R, s ^ 2 = r) (f : R →+* S) : Monotone f :=
   (monotone_iff_map_nonneg f).2 fun r h => by obtain ⟨s, rfl⟩ := hR r h; rw [map_pow];
     apply sq_nonneg
 #align ring_hom_monotone ringHom_monotone
+-/
 
 #print Real.RingHom.unique /-
 /-- There exists no nontrivial ring homomorphism `ℝ →+* ℝ`. -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex J. Best, Yaël Dillies
 
 ! This file was ported from Lean 3 source module algebra.order.complete_field
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
+! leanprover-community/mathlib commit 6b31d1eebd64eab86d5bd9936bfaada6ca8b5842
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Analysis.SpecialFunctions.Pow.Real
 /-!
 # Conditionally complete linear ordered fields
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file shows that the reals are unique, or, more formally, given a type satisfying the common
 axioms of the reals (field, conditionally complete, linearly ordered) that there is an isomorphism
 preserving these properties to the reals. This is `rat.induced_order_ring_iso`. Moreover this
Diff
@@ -56,6 +56,7 @@ open Function Rat Real Set
 
 open scoped Classical Pointwise
 
+#print ConditionallyCompleteLinearOrderedField /-
 /- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
@@ -64,7 +65,9 @@ class ConditionallyCompleteLinearOrderedField (α : Type _) extends
     "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure",
     ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
+-/
 
+#print ConditionallyCompleteLinearOrderedField.to_archimedean /-
 -- see Note [lower instance priority]
 /-- Any conditionally complete linearly ordered field is archimedean. -/
 instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedean
@@ -79,6 +82,7 @@ instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedea
             le_sub_iff_add_le.2 <| le_csSup ⟨x, forall_range_iff.2 h⟩ ⟨n + 1, Nat.cast_succ n⟩)
       linarith)
 #align conditionally_complete_linear_ordered_field.to_archimedean ConditionallyCompleteLinearOrderedField.to_archimedean
+-/
 
 /-- The reals are a conditionally complete linearly ordered field. -/
 instance : ConditionallyCompleteLinearOrderedField ℝ :=
@@ -103,11 +107,13 @@ section DivisionRing
 
 variable (β) [DivisionRing β] {a a₁ a₂ : α} {b : β} {q : ℚ}
 
+#print LinearOrderedField.cutMap /-
 /-- The lower cut of rationals inside a linear ordered field that are less than a given element of
 another linear ordered field. -/
 def cutMap (a : α) : Set β :=
   (coe : ℚ → β) '' {t | ↑t < a}
 #align linear_ordered_field.cut_map LinearOrderedField.cutMap
+-/
 
 theorem cutMap_mono (h : a₁ ≤ a₂) : cutMap β a₁ ⊆ cutMap β a₂ :=
   image_subset _ fun _ => h.trans_lt'
@@ -145,15 +151,19 @@ theorem cutMap_coe (q : ℚ) : cutMap β (q : α) = coe '' {r : ℚ | (r : β) <
 
 variable [Archimedean α]
 
+#print LinearOrderedField.cutMap_nonempty /-
 theorem cutMap_nonempty (a : α) : (cutMap β a).Nonempty :=
   Nonempty.image _ <| exists_rat_lt a
 #align linear_ordered_field.cut_map_nonempty LinearOrderedField.cutMap_nonempty
+-/
 
+#print LinearOrderedField.cutMap_bddAbove /-
 theorem cutMap_bddAbove (a : α) : BddAbove (cutMap β a) :=
   by
   obtain ⟨q, hq⟩ := exists_rat_gt a
   exact ⟨q, ball_image_iff.2 fun r hr => by exact_mod_cast (hq.trans' hr).le⟩
 #align linear_ordered_field.cut_map_bdd_above LinearOrderedField.cutMap_bddAbove
+-/
 
 theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
   by
@@ -183,12 +193,14 @@ section InducedMap
 variable (α β γ) [LinearOrderedField α] [ConditionallyCompleteLinearOrderedField β]
   [ConditionallyCompleteLinearOrderedField γ]
 
+#print LinearOrderedField.inducedMap /-
 /-- The induced order preserving function from a linear ordered field to a conditionally complete
 linear ordered field, defined by taking the Sup in the codomain of all the rationals less than the
 input. -/
 def inducedMap (x : α) : β :=
   sSup <| cutMap β x
 #align linear_ordered_field.induced_map LinearOrderedField.inducedMap
+-/
 
 variable [Archimedean α]
 
@@ -237,18 +249,22 @@ theorem lt_inducedMap_iff : b < inducedMap α β a ↔ ∃ q : ℚ, b < q ∧ (q
     fun ⟨q, hbq, hqa⟩ => hbq.trans <| by rwa [coe_lt_induced_map_iff]⟩
 #align linear_ordered_field.lt_induced_map_iff LinearOrderedField.lt_inducedMap_iff
 
+#print LinearOrderedField.inducedMap_self /-
 @[simp]
 theorem inducedMap_self (b : β) : inducedMap β β b = b :=
   eq_of_forall_rat_lt_iff_lt fun q => coe_lt_inducedMap_iff
 #align linear_ordered_field.induced_map_self LinearOrderedField.inducedMap_self
+-/
 
 variable (α β)
 
+#print LinearOrderedField.inducedMap_inducedMap /-
 @[simp]
 theorem inducedMap_inducedMap (a : α) : inducedMap β γ (inducedMap α β a) = inducedMap α γ a :=
   eq_of_forall_rat_lt_iff_lt fun q => by
     rw [coe_lt_induced_map_iff, coe_lt_induced_map_iff, Iff.comm, coe_lt_induced_map_iff]
 #align linear_ordered_field.induced_map_induced_map LinearOrderedField.inducedMap_inducedMap
+-/
 
 @[simp]
 theorem inducedMap_inv_self (b : β) : inducedMap γ β (inducedMap β γ b) = b := by
@@ -305,6 +321,7 @@ def inducedAddHom : α →+ β :=
   ⟨inducedMap α β, inducedMap_zero α β, inducedMap_add α β⟩
 #align linear_ordered_field.induced_add_hom LinearOrderedField.inducedAddHom
 
+#print LinearOrderedField.inducedOrderRingHom /-
 /-- `induced_map` as an `order_ring_hom`. -/
 @[simps]
 def inducedOrderRingHom : α →+*o β :=
@@ -331,6 +348,7 @@ def inducedOrderRingHom : α →+*o β :=
       two_ne_zero (inducedMap_one _ _) with
     monotone' := inducedMap_mono _ _ }
 #align linear_ordered_field.induced_order_ring_hom LinearOrderedField.inducedOrderRingHom
+-/
 
 /-- The isomorphism of ordered rings between two conditionally complete linearly ordered fields. -/
 def inducedOrderRingIso : β ≃+*o γ :=
@@ -385,6 +403,7 @@ theorem ringHom_monotone (hR : ∀ r : R, 0 ≤ r → ∃ s : R, s ^ 2 = r) (f :
     apply sq_nonneg
 #align ring_hom_monotone ringHom_monotone
 
+#print Real.RingHom.unique /-
 /-- There exists no nontrivial ring homomorphism `ℝ →+* ℝ`. -/
 instance Real.RingHom.unique : Unique (ℝ →+* ℝ)
     where
@@ -393,6 +412,7 @@ instance Real.RingHom.unique : Unique (ℝ →+* ℝ)
     congr_arg OrderRingHom.toRingHom
       (Subsingleton.elim ⟨f, ringHom_monotone (fun r hr => ⟨Real.sqrt r, sq_sqrt hr⟩) f⟩ default)
 #align real.ring_hom.unique Real.RingHom.unique
+-/
 
 end Real
 
Diff
@@ -56,12 +56,12 @@ open Function Rat Real Set
 
 open scoped Classical Pointwise
 
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
 @[protect_proj]
 class ConditionallyCompleteLinearOrderedField (α : Type _) extends
-    "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure",
+    "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure",
     ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 
@@ -106,7 +106,7 @@ variable (β) [DivisionRing β] {a a₁ a₂ : α} {b : β} {q : ℚ}
 /-- The lower cut of rationals inside a linear ordered field that are less than a given element of
 another linear ordered field. -/
 def cutMap (a : α) : Set β :=
-  (coe : ℚ → β) '' { t | ↑t < a }
+  (coe : ℚ → β) '' {t | ↑t < a}
 #align linear_ordered_field.cut_map LinearOrderedField.cutMap
 
 theorem cutMap_mono (h : a₁ ≤ a₂) : cutMap β a₁ ⊆ cutMap β a₂ :=
@@ -139,7 +139,7 @@ end DivisionRing
 
 variable (β) [LinearOrderedField β] {a a₁ a₂ : α} {b : β} {q : ℚ}
 
-theorem cutMap_coe (q : ℚ) : cutMap β (q : α) = coe '' { r : ℚ | (r : β) < q } := by
+theorem cutMap_coe (q : ℚ) : cutMap β (q : α) = coe '' {r : ℚ | (r : β) < q} := by
   simp_rw [cut_map, Rat.cast_lt]
 #align linear_ordered_field.cut_map_coe LinearOrderedField.cutMap_coe
 
Diff
@@ -61,8 +61,8 @@ open scoped Classical Pointwise
 This axiomatizes the reals. -/
 @[protect_proj]
 class ConditionallyCompleteLinearOrderedField (α : Type _) extends
-  "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure",
-  ConditionallyCompleteLinearOrder α
+    "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure",
+    ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 
 -- see Note [lower instance priority]
@@ -158,7 +158,7 @@ theorem cutMap_bddAbove (a : α) : BddAbove (cutMap β a) :=
 theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
   by
   refine' (image_subset_iff.2 fun q hq => _).antisymm _
-  · rw [mem_set_of_eq, ← sub_lt_iff_lt_add] at hq
+  · rw [mem_set_of_eq, ← sub_lt_iff_lt_add] at hq 
     obtain ⟨q₁, hq₁q, hq₁ab⟩ := exists_rat_btwn hq
     refine' ⟨q₁, q - q₁, _, _, add_sub_cancel'_right _ _⟩ <;> try norm_cast <;>
       rwa [coe_mem_cut_map_iff]
@@ -200,7 +200,7 @@ theorem inducedMap_rat (q : ℚ) : inducedMap α β (q : α) = q :=
   by
   refine'
     csSup_eq_of_forall_le_of_forall_lt_exists_gt (cut_map_nonempty β q) (fun x h => _) fun w h => _
-  · rw [cut_map_coe] at h
+  · rw [cut_map_coe] at h 
     obtain ⟨r, h, rfl⟩ := h
     exact le_of_lt h
   · obtain ⟨q', hwq, hq⟩ := exists_rat_btwn h
@@ -225,7 +225,7 @@ theorem inducedMap_nonneg (ha : 0 ≤ a) : 0 ≤ inducedMap α β a :=
 theorem coe_lt_inducedMap_iff : (q : β) < inducedMap α β a ↔ (q : α) < a :=
   by
   refine' ⟨fun h => _, fun hq => _⟩
-  · rw [← induced_map_rat α] at h
+  · rw [← induced_map_rat α] at h 
     exact (induced_map_mono α β).reflect_lt h
   · obtain ⟨q', hq, hqa⟩ := exists_rat_btwn hq
     apply lt_csSup_of_lt (cut_map_bdd_above β a) (coe_mem_cut_map_iff.mpr hqa)
@@ -273,7 +273,7 @@ theorem le_inducedMap_mul_self_of_mem_cutMap (ha : 0 < a) (b : β) (hb : b ∈ c
   obtain ⟨q', hq', hqq', hqa⟩ := exists_rat_pow_btwn two_ne_zero hb (mul_self_pos.2 ha.ne')
   trans (q' : β) ^ 2
   exact_mod_cast hqq'.le
-  rw [pow_two] at hqa⊢
+  rw [pow_two] at hqa ⊢
   exact
     mul_self_le_mul_self (by exact_mod_cast hq'.le)
       (le_csSup (cut_map_bdd_above β a) <|
@@ -289,9 +289,9 @@ theorem exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self (ha : 0 < a) (b : 
     rw [← Rat.cast_zero, coe_mem_cut_map_iff, Rat.cast_zero]
     exact mul_self_pos.2 ha.ne'
   obtain ⟨q, hq, hbq, hqa⟩ := exists_rat_pow_btwn two_ne_zero hba (hb.trans_lt hba)
-  rw [← cast_pow] at hbq
+  rw [← cast_pow] at hbq 
   refine' ⟨(q ^ 2 : ℚ), coe_mem_cut_map_iff.2 _, hbq⟩
-  rw [pow_two] at hqa⊢
+  rw [pow_two] at hqa ⊢
   push_cast
   obtain ⟨q', hq', hqa'⟩ := lt_induced_map_iff.1 (lt_of_mul_self_lt_mul_self _ hqa)
   exact mul_self_lt_mul_self (by exact_mod_cast hq.le) (hqa'.trans' <| by assumption_mod_cast)
Diff
@@ -178,7 +178,7 @@ end CutMap
 -/
 
 
-section [anonymous]
+section InducedMap
 
 variable (α β γ) [LinearOrderedField α] [ConditionallyCompleteLinearOrderedField β]
   [ConditionallyCompleteLinearOrderedField γ]
@@ -257,7 +257,7 @@ theorem inducedMap_inv_self (b : β) : inducedMap γ β (inducedMap β γ b) = b
 
 theorem inducedMap_add (x y : α) : inducedMap α β (x + y) = inducedMap α β x + inducedMap α β y :=
   by
-  rw [[anonymous], cut_map_add]
+  rw [induced_map, cut_map_add]
   exact
     csSup_add (cut_map_nonempty β x) (cut_map_bdd_above β x) (cut_map_nonempty β y)
       (cut_map_bdd_above β y)
@@ -372,7 +372,7 @@ fields. -/
 instance : Unique (β ≃+*o γ) :=
   uniqueOfSubsingleton <| inducedOrderRingIso β γ
 
-end [anonymous]
+end InducedMap
 
 end LinearOrderedField
 
Diff
@@ -54,7 +54,7 @@ noncomputable section
 
 open Function Rat Real Set
 
-open Classical Pointwise
+open scoped Classical Pointwise
 
 /- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
Diff
@@ -381,10 +381,7 @@ section Real
 variable {R S : Type _} [OrderedRing R] [LinearOrderedRing S]
 
 theorem ringHom_monotone (hR : ∀ r : R, 0 ≤ r → ∃ s : R, s ^ 2 = r) (f : R →+* S) : Monotone f :=
-  (monotone_iff_map_nonneg f).2 fun r h =>
-    by
-    obtain ⟨s, rfl⟩ := hR r h
-    rw [map_pow]
+  (monotone_iff_map_nonneg f).2 fun r h => by obtain ⟨s, rfl⟩ := hR r h; rw [map_pow];
     apply sq_nonneg
 #align ring_hom_monotone ringHom_monotone
 
Diff
@@ -4,13 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex J. Best, Yaël Dillies
 
 ! This file was ported from Lean 3 source module algebra.order.complete_field
-! leanprover-community/mathlib commit 402f8982dddc1864bd703da2d6e2ee304a866973
+! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Order.Hom.Ring
 import Mathbin.Algebra.Order.Pointwise
-import Mathbin.Analysis.SpecialFunctions.Pow
+import Mathbin.Analysis.SpecialFunctions.Pow.Real
 
 /-!
 # Conditionally complete linear ordered fields
Diff
@@ -74,9 +74,9 @@ instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedea
       by_contra' h
       obtain ⟨x, h⟩ := h
       have :=
-        csupₛ_le (range_nonempty (coe : ℕ → α))
+        csSup_le (range_nonempty (coe : ℕ → α))
           (forall_range_iff.2 fun n =>
-            le_sub_iff_add_le.2 <| le_csupₛ ⟨x, forall_range_iff.2 h⟩ ⟨n + 1, Nat.cast_succ n⟩)
+            le_sub_iff_add_le.2 <| le_csSup ⟨x, forall_range_iff.2 h⟩ ⟨n + 1, Nat.cast_succ n⟩)
       linarith)
 #align conditionally_complete_linear_ordered_field.to_archimedean ConditionallyCompleteLinearOrderedField.to_archimedean
 
@@ -187,19 +187,19 @@ variable (α β γ) [LinearOrderedField α] [ConditionallyCompleteLinearOrderedF
 linear ordered field, defined by taking the Sup in the codomain of all the rationals less than the
 input. -/
 def inducedMap (x : α) : β :=
-  supₛ <| cutMap β x
+  sSup <| cutMap β x
 #align linear_ordered_field.induced_map LinearOrderedField.inducedMap
 
 variable [Archimedean α]
 
 theorem inducedMap_mono : Monotone (inducedMap α β) := fun a b h =>
-  csupₛ_le_csupₛ (cutMap_bddAbove β _) (cutMap_nonempty β _) (cutMap_mono β h)
+  csSup_le_csSup (cutMap_bddAbove β _) (cutMap_nonempty β _) (cutMap_mono β h)
 #align linear_ordered_field.induced_map_mono LinearOrderedField.inducedMap_mono
 
 theorem inducedMap_rat (q : ℚ) : inducedMap α β (q : α) = q :=
   by
   refine'
-    csupₛ_eq_of_forall_le_of_forall_lt_exists_gt (cut_map_nonempty β q) (fun x h => _) fun w h => _
+    csSup_eq_of_forall_le_of_forall_lt_exists_gt (cut_map_nonempty β q) (fun x h => _) fun w h => _
   · rw [cut_map_coe] at h
     obtain ⟨r, h, rfl⟩ := h
     exact le_of_lt h
@@ -228,7 +228,7 @@ theorem coe_lt_inducedMap_iff : (q : β) < inducedMap α β a ↔ (q : α) < a :
   · rw [← induced_map_rat α] at h
     exact (induced_map_mono α β).reflect_lt h
   · obtain ⟨q', hq, hqa⟩ := exists_rat_btwn hq
-    apply lt_csupₛ_of_lt (cut_map_bdd_above β a) (coe_mem_cut_map_iff.mpr hqa)
+    apply lt_csSup_of_lt (cut_map_bdd_above β a) (coe_mem_cut_map_iff.mpr hqa)
     exact_mod_cast hq
 #align linear_ordered_field.coe_lt_induced_map_iff LinearOrderedField.coe_lt_inducedMap_iff
 
@@ -259,7 +259,7 @@ theorem inducedMap_add (x y : α) : inducedMap α β (x + y) = inducedMap α β
   by
   rw [[anonymous], cut_map_add]
   exact
-    csupₛ_add (cut_map_nonempty β x) (cut_map_bdd_above β x) (cut_map_nonempty β y)
+    csSup_add (cut_map_nonempty β x) (cut_map_bdd_above β x) (cut_map_nonempty β y)
       (cut_map_bdd_above β y)
 #align linear_ordered_field.induced_map_add LinearOrderedField.inducedMap_add
 
@@ -276,7 +276,7 @@ theorem le_inducedMap_mul_self_of_mem_cutMap (ha : 0 < a) (b : β) (hb : b ∈ c
   rw [pow_two] at hqa⊢
   exact
     mul_self_le_mul_self (by exact_mod_cast hq'.le)
-      (le_csupₛ (cut_map_bdd_above β a) <|
+      (le_csSup (cut_map_bdd_above β a) <|
         coe_mem_cut_map_iff.2 <| lt_of_mul_self_lt_mul_self ha.le hqa)
 #align linear_ordered_field.le_induced_map_mul_self_of_mem_cut_map LinearOrderedField.le_inducedMap_mul_self_of_mem_cutMap
 
@@ -325,7 +325,7 @@ def inducedOrderRingHom : α →+*o β :=
           · exact this x h
         -- prove that the (Sup of rationals less than x) ^ 2 is the Sup of the set of rationals less
         -- than (x ^ 2) by showing it is an upper bound and any smaller number is not an upper bound
-        refine' fun x hx => csupₛ_eq_of_forall_le_of_forall_lt_exists_gt (cut_map_nonempty β _) _ _
+        refine' fun x hx => csSup_eq_of_forall_le_of_forall_lt_exists_gt (cut_map_nonempty β _) _ _
         exact le_induced_map_mul_self_of_mem_cut_map hx
         exact exists_mem_cut_map_mul_self_of_lt_induced_map_mul_self hx)
       two_ne_zero (inducedMap_one _ _) with
Diff
@@ -56,12 +56,12 @@ open Function Rat Real Set
 
 open Classical Pointwise
 
-/- ./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
 @[protect_proj]
 class ConditionallyCompleteLinearOrderedField (α : Type _) extends
-  "./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure",
+  "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure",
   ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 
Diff
@@ -178,7 +178,7 @@ end CutMap
 -/
 
 
-section InducedMap
+section [anonymous]
 
 variable (α β γ) [LinearOrderedField α] [ConditionallyCompleteLinearOrderedField β]
   [ConditionallyCompleteLinearOrderedField γ]
@@ -257,7 +257,7 @@ theorem inducedMap_inv_self (b : β) : inducedMap γ β (inducedMap β γ b) = b
 
 theorem inducedMap_add (x y : α) : inducedMap α β (x + y) = inducedMap α β x + inducedMap α β y :=
   by
-  rw [induced_map, cut_map_add]
+  rw [[anonymous], cut_map_add]
   exact
     csupₛ_add (cut_map_nonempty β x) (cut_map_bdd_above β x) (cut_map_nonempty β y)
       (cut_map_bdd_above β y)
@@ -372,7 +372,7 @@ fields. -/
 instance : Unique (β ≃+*o γ) :=
   uniqueOfSubsingleton <| inducedOrderRingIso β γ
 
-end InducedMap
+end [anonymous]
 
 end LinearOrderedField
 
Diff
@@ -321,7 +321,7 @@ def inducedOrderRingHom : α →+*o β :=
           · convert this (-x) (neg_pos.2 h) using 1
             · rw [neg_mul, mul_neg, neg_neg]
             · simp_rw [AddMonoidHom.map_neg, neg_mul, mul_neg, neg_neg]
-          · simp only [mul_zero, AddMonoidHom.map_zero]
+          · simp only [MulZeroClass.mul_zero, AddMonoidHom.map_zero]
           · exact this x h
         -- prove that the (Sup of rationals less than x) ^ 2 is the Sup of the set of rationals less
         -- than (x ^ 2) by showing it is an upper bound and any smaller number is not an upper bound

Changes in mathlib4

mathlib3
mathlib4
feat: add notation for Real.sqrt (#12056)

This adds the notation √r for Real.sqrt r. The precedence is such that √x⁻¹ is parsed as √(x⁻¹); not because this is particularly desirable, but because it's the default and the choice doesn't really matter.

This is extracted from #7907, which adds a more general nth root typeclass. The idea is to perform all the boring substitutions downstream quickly, so that we can play around with custom elaborators with a much slower rate of code-rot. This PR also won't rot as quickly, as it does not forbid writing x.sqrt as that PR does.

While perhaps claiming for Real.sqrt is greedy; it:

  • Is far more common thatn NNReal.sqrt and Nat.sqrt
  • Is far more interesting to mathlib than sqrt on Float
  • Can be overloaded anyway, so this does not prevent downstream code using the notation on their own types.
  • Will be replaced by a more general typeclass in a future PR.

Zulip

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -369,7 +369,7 @@ theorem ringHom_monotone (hR : ∀ r : R, 0 ≤ r → ∃ s : R, s ^ 2 = r) (f :
 instance Real.RingHom.unique : Unique (ℝ →+* ℝ) where
   default := RingHom.id ℝ
   uniq f := congr_arg OrderRingHom.toRingHom (@Subsingleton.elim (ℝ →+*o ℝ) _
-      ⟨f, ringHom_monotone (fun r hr => ⟨Real.sqrt r, sq_sqrt hr⟩) f⟩ default)
+      ⟨f, ringHom_monotone (fun r hr => ⟨√r, sq_sqrt hr⟩) f⟩ default)
 #align real.ring_hom.unique Real.RingHom.unique
 
 end Real
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -150,7 +150,7 @@ theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
   refine (image_subset_iff.2 fun q hq => ?_).antisymm ?_
   · rw [mem_setOf_eq, ← sub_lt_iff_lt_add] at hq
     obtain ⟨q₁, hq₁q, hq₁ab⟩ := exists_rat_btwn hq
-    refine ⟨q₁, by rwa [coe_mem_cutMap_iff], q - q₁, ?_, add_sub_cancel'_right _ _⟩
+    refine ⟨q₁, by rwa [coe_mem_cutMap_iff], q - q₁, ?_, add_sub_cancel _ _⟩
     · norm_cast
       rw [coe_mem_cutMap_iff]
       exact mod_cast sub_lt_comm.mp hq₁q
chore: Remove ball and bex from lemma names (#10816)

ball for "bounded forall" and bex for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem and exists_mem in the few Set lemma names that mention them.

Also deprecate ball_image_of_ball, mem_image_elim, mem_image_elim_on since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image semi-implicit), have obscure names and are completely unused.

Diff
@@ -69,8 +69,8 @@ instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedea
       by_contra! h
       obtain ⟨x, h⟩ := h
       have := csSup_le _ _ (range_nonempty Nat.cast)
-        (forall_range_iff.2 fun m =>
-          le_sub_iff_add_le.2 <| le_csSup _ _ ⟨x, forall_range_iff.2 h⟩ ⟨m+1, Nat.cast_succ m⟩)
+        (forall_mem_range.2 fun m =>
+          le_sub_iff_add_le.2 <| le_csSup _ _ ⟨x, forall_mem_range.2 h⟩ ⟨m+1, Nat.cast_succ m⟩)
       linarith)
 #align conditionally_complete_linear_ordered_field.to_archimedean ConditionallyCompleteLinearOrderedField.to_archimedean
 
@@ -143,7 +143,7 @@ theorem cutMap_nonempty (a : α) : (cutMap β a).Nonempty :=
 
 theorem cutMap_bddAbove (a : α) : BddAbove (cutMap β a) := by
   obtain ⟨q, hq⟩ := exists_rat_gt a
-  exact ⟨q, ball_image_iff.2 fun r hr => mod_cast (hq.trans' hr).le⟩
+  exact ⟨q, forall_mem_image.2 fun r hr => mod_cast (hq.trans' hr).le⟩
 #align linear_ordered_field.cut_map_bdd_above LinearOrderedField.cutMap_bddAbove
 
 theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b := by
chore: classify simp can do this porting notes (#10619)

Classify by adding issue number (#10618) to porting notes claiming anything semantically equivalent to simp can prove this or simp can simplify this.

Diff
@@ -240,7 +240,7 @@ theorem inducedMap_inducedMap (a : α) : inducedMap β γ (inducedMap α β a) =
     rw [coe_lt_inducedMap_iff, coe_lt_inducedMap_iff, Iff.comm, coe_lt_inducedMap_iff]
 #align linear_ordered_field.induced_map_induced_map LinearOrderedField.inducedMap_inducedMap
 
---@[simp] -- Porting note: simp can prove it
+--@[simp] -- Porting note (#10618): simp can prove it
 theorem inducedMap_inv_self (b : β) : inducedMap γ β (inducedMap β γ b) = b := by
   rw [inducedMap_inducedMap, inducedMap_self]
 #align linear_ordered_field.induced_map_inv_self LinearOrderedField.inducedMap_inv_self
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -295,9 +295,8 @@ def inducedAddHom : α →+ β :=
 @[simps!]
 def inducedOrderRingHom : α →+*o β :=
   { AddMonoidHom.mkRingHomOfMulSelfOfTwoNeZero (inducedAddHom α β) (by
-      suffices : ∀ x, 0 < x → inducedAddHom α β (x * x)
-          = inducedAddHom α β x * inducedAddHom α β x
-      · intro x
+      suffices ∀ x, 0 < x → inducedAddHom α β (x * x) = inducedAddHom α β x * inducedAddHom α β x by
+        intro x
         obtain h | rfl | h := lt_trichotomy x 0
         · convert this (-x) (neg_pos.2 h) using 1
           · rw [neg_mul, mul_neg, neg_neg]
refactor(*): change definition of Set.image2 etc (#9275)
  • Redefine Set.image2 to use ∃ a ∈ s, ∃ b ∈ t, f a b = c instead of ∃ a b, a ∈ s ∧ b ∈ t ∧ f a b = c.
  • Redefine Set.seq as Set.image2. The new definition is equal to the old one but rw [Set.seq] gives a different result.
  • Redefine Filter.map₂ to use ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s instead of ∃ u v, u ∈ f ∧ v ∈ g ∧ ...
  • Update lemmas like Set.mem_image2, Finset.mem_image₂, Set.mem_mul, Finset.mem_div etc

The two reasons to make the change are:

  • ∃ a ∈ s, ∃ b ∈ t, _ is a simp-normal form, and
  • it looks a bit nicer.
Diff
@@ -150,11 +150,11 @@ theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
   refine (image_subset_iff.2 fun q hq => ?_).antisymm ?_
   · rw [mem_setOf_eq, ← sub_lt_iff_lt_add] at hq
     obtain ⟨q₁, hq₁q, hq₁ab⟩ := exists_rat_btwn hq
-    refine ⟨q₁, q - q₁, by rwa [coe_mem_cutMap_iff], ?_, add_sub_cancel'_right _ _⟩
+    refine ⟨q₁, by rwa [coe_mem_cutMap_iff], q - q₁, ?_, add_sub_cancel'_right _ _⟩
     · norm_cast
       rw [coe_mem_cutMap_iff]
       exact mod_cast sub_lt_comm.mp hq₁q
-  · rintro _ ⟨_, _, ⟨qa, ha, rfl⟩, ⟨qb, hb, rfl⟩, rfl⟩
+  · rintro _ ⟨_, ⟨qa, ha, rfl⟩, _, ⟨qb, hb, rfl⟩, rfl⟩
     -- After leanprover/lean4#2734, `norm_cast` needs help with beta reduction.
     refine' ⟨qa + qb, _, by beta_reduce; norm_cast⟩
     rw [mem_setOf_eq, cast_add]
chore: rename by_contra' to by_contra! (#8797)

To fit with the "please try harder" convention of ! tactics.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -66,7 +66,7 @@ instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedea
     [ConditionallyCompleteLinearOrderedField α] : Archimedean α :=
   archimedean_iff_nat_lt.2
     (by
-      by_contra' h
+      by_contra! h
       obtain ⟨x, h⟩ := h
       have := csSup_le _ _ (range_nonempty Nat.cast)
         (forall_range_iff.2 fun m =>
chore: replace exact_mod_cast tactic with mod_cast elaborator where possible (#8404)

We still have the exact_mod_cast tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast are the ones that don't work using the term elaborator by itself.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -143,7 +143,7 @@ theorem cutMap_nonempty (a : α) : (cutMap β a).Nonempty :=
 
 theorem cutMap_bddAbove (a : α) : BddAbove (cutMap β a) := by
   obtain ⟨q, hq⟩ := exists_rat_gt a
-  exact ⟨q, ball_image_iff.2 fun r hr => by exact_mod_cast (hq.trans' hr).le⟩
+  exact ⟨q, ball_image_iff.2 fun r hr => mod_cast (hq.trans' hr).le⟩
 #align linear_ordered_field.cut_map_bdd_above LinearOrderedField.cutMap_bddAbove
 
 theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b := by
@@ -153,7 +153,7 @@ theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
     refine ⟨q₁, q - q₁, by rwa [coe_mem_cutMap_iff], ?_, add_sub_cancel'_right _ _⟩
     · norm_cast
       rw [coe_mem_cutMap_iff]
-      exact_mod_cast sub_lt_comm.mp hq₁q
+      exact mod_cast sub_lt_comm.mp hq₁q
   · rintro _ ⟨_, _, ⟨qa, ha, rfl⟩, ⟨qb, hb, rfl⟩, rfl⟩
     -- After leanprover/lean4#2734, `norm_cast` needs help with beta reduction.
     refine' ⟨qa + qb, _, by beta_reduce; norm_cast⟩
@@ -200,11 +200,11 @@ theorem inducedMap_rat (q : ℚ) : inducedMap α β (q : α) = q := by
 #align linear_ordered_field.induced_map_rat LinearOrderedField.inducedMap_rat
 
 @[simp]
-theorem inducedMap_zero : inducedMap α β 0 = 0 := by exact_mod_cast inducedMap_rat α β 0
+theorem inducedMap_zero : inducedMap α β 0 = 0 := mod_cast inducedMap_rat α β 0
 #align linear_ordered_field.induced_map_zero LinearOrderedField.inducedMap_zero
 
 @[simp]
-theorem inducedMap_one : inducedMap α β 1 = 1 := by exact_mod_cast inducedMap_rat α β 1
+theorem inducedMap_one : inducedMap α β 1 = 1 := mod_cast inducedMap_rat α β 1
 #align linear_ordered_field.induced_map_one LinearOrderedField.inducedMap_one
 
 variable {α β} {a : α} {b : β} {q : ℚ}
@@ -219,7 +219,7 @@ theorem coe_lt_inducedMap_iff : (q : β) < inducedMap α β a ↔ (q : α) < a :
     exact (inducedMap_mono α β).reflect_lt h
   · obtain ⟨q', hq, hqa⟩ := exists_rat_btwn hq
     apply lt_csSup_of_lt (cutMap_bddAbove β a) (coe_mem_cutMap_iff.mpr hqa)
-    exact_mod_cast hq
+    exact mod_cast hq
 #align linear_ordered_field.coe_lt_induced_map_iff LinearOrderedField.coe_lt_inducedMap_iff
 
 theorem lt_inducedMap_iff : b < inducedMap α β a ↔ ∃ q : ℚ, b < q ∧ (q : α) < a :=
@@ -260,9 +260,9 @@ theorem le_inducedMap_mul_self_of_mem_cutMap (ha : 0 < a) (b : β) (hb : b ∈ c
   obtain ⟨q, hb, rfl⟩ := hb
   obtain ⟨q', hq', hqq', hqa⟩ := exists_rat_pow_btwn two_ne_zero hb (mul_self_pos.2 ha.ne')
   trans (q' : β) ^ 2
-  · exact_mod_cast hqq'.le
+  · exact mod_cast hqq'.le
   · rw [pow_two] at hqa ⊢
-    exact mul_self_le_mul_self (by exact_mod_cast hq'.le)
+    exact mul_self_le_mul_self (mod_cast hq'.le)
       (le_csSup (cutMap_bddAbove β a) <|
         coe_mem_cutMap_iff.2 <| lt_of_mul_self_lt_mul_self ha.le hqa)
 #align linear_ordered_field.le_induced_map_mul_self_of_mem_cut_map LinearOrderedField.le_inducedMap_mul_self_of_mem_cutMap
@@ -281,7 +281,7 @@ theorem exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self (ha : 0 < a) (b : 
   push_cast
   obtain ⟨q', hq', hqa'⟩ := lt_inducedMap_iff.1 (lt_of_mul_self_lt_mul_self
     (inducedMap_nonneg ha.le) hqa)
-  exact mul_self_lt_mul_self (by exact_mod_cast hq.le) (hqa'.trans' <| by assumption_mod_cast)
+  exact mul_self_lt_mul_self (mod_cast hq.le) (hqa'.trans' <| by assumption_mod_cast)
 #align linear_ordered_field.exists_mem_cut_map_mul_self_of_lt_induced_map_mul_self LinearOrderedField.exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self
 
 variable (α β)
chore: bump toolchain to v4.3.0-rc1 (#8051)

This incorporates changes from

  • #7845
  • #7847
  • #7853
  • #7872 (was never actually made to work, but the diffs in nightly-testing are unexciting: we need to fully qualify a few names)

They can all be closed when this is merged.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -155,7 +155,8 @@ theorem cutMap_add (a b : α) : cutMap β (a + b) = cutMap β a + cutMap β b :=
       rw [coe_mem_cutMap_iff]
       exact_mod_cast sub_lt_comm.mp hq₁q
   · rintro _ ⟨_, _, ⟨qa, ha, rfl⟩, ⟨qb, hb, rfl⟩, rfl⟩
-    refine' ⟨qa + qb, _, by norm_cast⟩
+    -- After leanprover/lean4#2734, `norm_cast` needs help with beta reduction.
+    refine' ⟨qa + qb, _, by beta_reduce; norm_cast⟩
     rw [mem_setOf_eq, cast_add]
     exact add_lt_add ha hb
 #align linear_ordered_field.cut_map_add LinearOrderedField.cutMap_add
chore: tidy various files (#7017)
Diff
@@ -259,11 +259,11 @@ theorem le_inducedMap_mul_self_of_mem_cutMap (ha : 0 < a) (b : β) (hb : b ∈ c
   obtain ⟨q, hb, rfl⟩ := hb
   obtain ⟨q', hq', hqq', hqa⟩ := exists_rat_pow_btwn two_ne_zero hb (mul_self_pos.2 ha.ne')
   trans (q' : β) ^ 2
-  exact_mod_cast hqq'.le
-  rw [pow_two] at hqa ⊢
-  exact mul_self_le_mul_self (by exact_mod_cast hq'.le)
-    (le_csSup (cutMap_bddAbove β a) <|
-      coe_mem_cutMap_iff.2 <| lt_of_mul_self_lt_mul_self ha.le hqa)
+  · exact_mod_cast hqq'.le
+  · rw [pow_two] at hqa ⊢
+    exact mul_self_le_mul_self (by exact_mod_cast hq'.le)
+      (le_csSup (cutMap_bddAbove β a) <|
+        coe_mem_cutMap_iff.2 <| lt_of_mul_self_lt_mul_self ha.le hqa)
 #align linear_ordered_field.le_induced_map_mul_self_of_mem_cut_map LinearOrderedField.le_inducedMap_mul_self_of_mem_cutMap
 
 /-- Preparatory lemma for `inducedOrderRingHom`. -/
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -301,7 +301,7 @@ def inducedOrderRingHom : α →+*o β :=
         · convert this (-x) (neg_pos.2 h) using 1
           · rw [neg_mul, mul_neg, neg_neg]
           · simp_rw [AddMonoidHom.map_neg, neg_mul, mul_neg, neg_neg]
-        · simp only [MulZeroClass.mul_zero, AddMonoidHom.map_zero]
+        · simp only [mul_zero, AddMonoidHom.map_zero]
         · exact this x h
         -- prove that the (Sup of rationals less than x) ^ 2 is the Sup of the set of rationals less
         -- than (x ^ 2) by showing it is an upper bound and any smaller number is not an upper bound
chore: remove unused simps (#6632)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -261,7 +261,6 @@ theorem le_inducedMap_mul_self_of_mem_cutMap (ha : 0 < a) (b : β) (hb : b ∈ c
   trans (q' : β) ^ 2
   exact_mod_cast hqq'.le
   rw [pow_two] at hqa ⊢
-  push_cast at hqa
   exact mul_self_le_mul_self (by exact_mod_cast hq'.le)
     (le_csSup (cutMap_bddAbove β a) <|
       coe_mem_cutMap_iff.2 <| lt_of_mul_self_lt_mul_self ha.le hqa)
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -45,7 +45,7 @@ reals, conditionally complete, ordered field, uniqueness
 -/
 
 
-variable {F α β γ : Type _}
+variable {F α β γ : Type*}
 
 noncomputable section
 
@@ -56,7 +56,7 @@ open scoped Classical Pointwise
 /-- A field which is both linearly ordered and conditionally complete with respect to the order.
 This axiomatizes the reals. -/
 -- @[protect_proj] -- Porting note: does not exist anymore
-class ConditionallyCompleteLinearOrderedField (α : Type _) extends
+class ConditionallyCompleteLinearOrderedField (α : Type*) extends
     LinearOrderedField α, ConditionallyCompleteLinearOrder α
 #align conditionally_complete_linear_ordered_field ConditionallyCompleteLinearOrderedField
 
@@ -359,7 +359,7 @@ end LinearOrderedField
 
 section Real
 
-variable {R S : Type _} [OrderedRing R] [LinearOrderedRing S]
+variable {R S : Type*} [OrderedRing R] [LinearOrderedRing S]
 
 theorem ringHom_monotone (hR : ∀ r : R, 0 ≤ r → ∃ s : R, s ^ 2 = r) (f : R →+* S) : Monotone f :=
   (monotone_iff_map_nonneg f).2 fun r h => by
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Alex J. Best. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex J. Best, Yaël Dillies
-
-! This file was ported from Lean 3 source module algebra.order.complete_field
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Order.Hom.Ring
 import Mathlib.Algebra.Order.Pointwise
 import Mathlib.Analysis.SpecialFunctions.Pow.Real
 
+#align_import algebra.order.complete_field from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
+
 /-!
 # Conditionally complete linear ordered fields
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -186,7 +186,7 @@ def inducedMap (x : α) : β :=
 
 variable [Archimedean α]
 
-theorem inducedMap_mono : Monotone (inducedMap α β) := fun _ _  h =>
+theorem inducedMap_mono : Monotone (inducedMap α β) := fun _ _ h =>
   csSup_le_csSup (cutMap_bddAbove β _) (cutMap_nonempty β _) (cutMap_mono β h)
 #align linear_ordered_field.induced_map_mono LinearOrderedField.inducedMap_mono
 
chore: tidy various files (#4997)
Diff
@@ -17,8 +17,8 @@ import Mathlib.Analysis.SpecialFunctions.Pow.Real
 
 This file shows that the reals are unique, or, more formally, given a type satisfying the common
 axioms of the reals (field, conditionally complete, linearly ordered) that there is an isomorphism
-preserving these properties to the reals. This is `rat.induced_order_ring_iso`. Moreover this
-isomorphism is unique.
+preserving these properties to the reals. This is `LinearOrderedField.inducedOrderRingIso` for `ℚ`.
+Moreover this isomorphism is unique.
 
 We introduce definitions of conditionally complete linear ordered fields, and show all such are
 archimedean. We also construct the natural map from a `LinearOrderedField` to such a field.
@@ -79,7 +79,7 @@ instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedea
 
 /-- The reals are a conditionally complete linearly ordered field. -/
 instance : ConditionallyCompleteLinearOrderedField ℝ :=
-  { (inferInstance : LinearOrderedField  ℝ),
+  { (inferInstance : LinearOrderedField ℝ),
     (inferInstance : ConditionallyCompleteLinearOrder ℝ) with }
 
 namespace LinearOrderedField
@@ -290,8 +290,8 @@ theorem exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self (ha : 0 < a) (b : 
 variable (α β)
 
 /-- `inducedMap` as an additive homomorphism. -/
-def inducedAddHom : α →+ β := by
-  refine ⟨⟨inducedMap α β, inducedMap_zero α β⟩, inducedMap_add α β⟩
+def inducedAddHom : α →+ β :=
+  ⟨⟨inducedMap α β, inducedMap_zero α β⟩, inducedMap_add α β⟩
 #align linear_ordered_field.induced_add_hom LinearOrderedField.inducedAddHom
 
 /-- `inducedMap` as an `OrderRingHom`. -/
chore: fix many typos (#4967)

These are all doc fixes

Diff
@@ -168,7 +168,7 @@ end CutMap
 /-!
 ### Induced map
 
-`LinearOrderField.cutMap` spits out a `Set β`. To get something in `β`, we now take the supremum.
+`LinearOrderedField.cutMap` spits out a `Set β`. To get something in `β`, we now take the supremum.
 -/
 
 
feat: port Algebra.Order.CompleteField (#4859)

A statement in Analysis.SpecialFunctions.Pow.Real.lean was incorrect compared to the Mathlib3 version. I fixed it since it is used in this file.

Co-authored-by: Chris Hughes <chrishughes24@gmail.com>

Dependencies 12 + 750

751 files ported (98.4%)
328944 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file