data.real.cardinality
β·
Mathlib.Data.Real.Cardinality
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -101,7 +101,7 @@ theorem cantorFunctionAux_zero (f : β β Bool) : cantorFunctionAux c f 0 = co
theorem cantorFunctionAux_succ (f : β β Bool) :
(fun n => cantorFunctionAux c f (n + 1)) = fun n =>
c * cantorFunctionAux c (fun n => f (n + 1)) n :=
- by ext n; cases h : f (n + 1) <;> simp [h, pow_succ]
+ by ext n; cases h : f (n + 1) <;> simp [h, pow_succ']
#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succ
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -153,7 +153,7 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
have h3 : c < 1 := by apply h2.trans; norm_num
induction' n with n ih generalizing f g
Β· let f_max : β β Bool := fun n => Nat.rec ff (fun _ _ => tt) n
- have hf_max : β n, f n β f_max n := by intro n hn; cases n; rw [fn] at hn ; contradiction;
+ have hf_max : β n, f n β f_max n := by intro n hn; cases n; rw [fn] at hn; contradiction;
apply rfl
let g_min : β β Bool := fun n => Nat.rec tt (fun _ _ => ff) n
have hg_min : β n, g_min n β g n := by intro n hn; cases n; rw [gn]; apply rfl; contradiction
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -109,7 +109,7 @@ theorem cantorFunctionAux_succ (f : β β Bool) :
theorem summable_cantor_function (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
Summable (cantorFunctionAux c f) :=
by
- apply (summable_geometric_of_lt_1 h1 h2).summable_of_eq_zero_or_self
+ apply (summable_geometric_of_lt_one h1 h2).summable_of_eq_zero_or_self
intro n; cases h : f n <;> simp [h]
#align cardinal.summable_cantor_function Cardinal.summable_cantor_function
-/
@@ -165,7 +165,7 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
rwa [sub_pos]
convert this
Β· rw [cantor_function_succ _ (le_of_lt h1) h3, div_eq_mul_inv, β
- tsum_geometric_of_lt_1 (le_of_lt h1) h3]
+ tsum_geometric_of_lt_one (le_of_lt h1) h3]
apply zero_add
Β· refine' (tsum_eq_single 0 _).trans _
Β· intro n hn; cases n; contradiction; rfl
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -184,6 +184,17 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
by
intro f g hfg
classical
+ by_contra h
+ revert hfg
+ have : β n, f n β g n := by rw [β Classical.not_forall]; intro h'; apply h; ext; apply h'
+ let n := Nat.find this
+ have hn : β k : β, k < n β f k = g k := by intro k hk; apply of_not_not;
+ exact Nat.find_min this hk
+ cases fn : f n
+ Β· apply ne_of_lt; refine' increasing_cantor_function h1 h2 hn fn _
+ apply Bool.eq_true_of_not_eq_false; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
+ Β· apply ne_of_gt; refine' increasing_cantor_function h1 h2 (fun k hk => (hn k hk).symm) _ fn
+ apply Bool.eq_false_of_not_eq_true; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
#align cardinal.cantor_function_injective Cardinal.cantorFunction_injective
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -184,17 +184,6 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
by
intro f g hfg
classical
- by_contra h
- revert hfg
- have : β n, f n β g n := by rw [β Classical.not_forall]; intro h'; apply h; ext; apply h'
- let n := Nat.find this
- have hn : β k : β, k < n β f k = g k := by intro k hk; apply of_not_not;
- exact Nat.find_min this hk
- cases fn : f n
- Β· apply ne_of_lt; refine' increasing_cantor_function h1 h2 hn fn _
- apply Bool.eq_true_of_not_eq_false; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
- Β· apply ne_of_gt; refine' increasing_cantor_function h1 h2 (fun k hk => (hn k hk).symm) _ fn
- apply Bool.eq_false_of_not_eq_true; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
#align cardinal.cantor_function_injective Cardinal.cantorFunction_injective
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/b1abe23ae96fef89ad30d9f4362c307f72a55010
@@ -186,7 +186,7 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
classical
by_contra h
revert hfg
- have : β n, f n β g n := by rw [β not_forall]; intro h'; apply h; ext; apply h'
+ have : β n, f n β g n := by rw [β Classical.not_forall]; intro h'; apply h; ext; apply h'
let n := Nat.find this
have hn : β k : β, k < n β f k = g k := by intro k hk; apply of_not_not;
exact Nat.find_min this hk
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2019 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
-/
-import Mathbin.Analysis.SpecificLimits.Basic
-import Mathbin.Data.Rat.Denumerable
-import Mathbin.Data.Set.Pointwise.Interval
-import Mathbin.SetTheory.Cardinal.Continuum
+import Analysis.SpecificLimits.Basic
+import Data.Rat.Denumerable
+import Data.Set.Pointwise.Interval
+import SetTheory.Cardinal.Continuum
#align_import data.real.cardinality from "leanprover-community/mathlib"@"8eb9c42d4d34c77f6ee84ea766ae4070233a973c"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2019 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module data.real.cardinality
-! leanprover-community/mathlib commit 8eb9c42d4d34c77f6ee84ea766ae4070233a973c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.SpecificLimits.Basic
import Mathbin.Data.Rat.Denumerable
import Mathbin.Data.Set.Pointwise.Interval
import Mathbin.SetTheory.Cardinal.Continuum
+#align_import data.real.cardinality from "leanprover-community/mathlib"@"8eb9c42d4d34c77f6ee84ea766ae4070233a973c"
+
/-!
# The cardinality of the reals
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -68,19 +68,25 @@ def cantorFunctionAux (c : β) (f : β β Bool) (n : β) : β :=
#align cardinal.cantor_function_aux Cardinal.cantorFunctionAux
-/
+#print Cardinal.cantorFunctionAux_true /-
@[simp]
theorem cantorFunctionAux_true (h : f n = true) : cantorFunctionAux c f n = c ^ n := by
simp [cantor_function_aux, h]
#align cardinal.cantor_function_aux_tt Cardinal.cantorFunctionAux_true
+-/
+#print Cardinal.cantorFunctionAux_false /-
@[simp]
theorem cantorFunctionAux_false (h : f n = false) : cantorFunctionAux c f n = 0 := by
simp [cantor_function_aux, h]
#align cardinal.cantor_function_aux_ff Cardinal.cantorFunctionAux_false
+-/
+#print Cardinal.cantorFunctionAux_nonneg /-
theorem cantorFunctionAux_nonneg (h : 0 β€ c) : 0 β€ cantorFunctionAux c f n := by
cases h' : f n <;> simp [h']; apply pow_nonneg h
#align cardinal.cantor_function_aux_nonneg Cardinal.cantorFunctionAux_nonneg
+-/
#print Cardinal.cantorFunctionAux_eq /-
theorem cantorFunctionAux_eq (h : f n = g n) : cantorFunctionAux c f n = cantorFunctionAux c g n :=
@@ -88,22 +94,28 @@ theorem cantorFunctionAux_eq (h : f n = g n) : cantorFunctionAux c f n = cantorF
#align cardinal.cantor_function_aux_eq Cardinal.cantorFunctionAux_eq
-/
+#print Cardinal.cantorFunctionAux_zero /-
theorem cantorFunctionAux_zero (f : β β Bool) : cantorFunctionAux c f 0 = cond (f 0) 1 0 := by
cases h : f 0 <;> simp [h]
#align cardinal.cantor_function_aux_zero Cardinal.cantorFunctionAux_zero
+-/
+#print Cardinal.cantorFunctionAux_succ /-
theorem cantorFunctionAux_succ (f : β β Bool) :
(fun n => cantorFunctionAux c f (n + 1)) = fun n =>
c * cantorFunctionAux c (fun n => f (n + 1)) n :=
by ext n; cases h : f (n + 1) <;> simp [h, pow_succ]
#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succ
+-/
+#print Cardinal.summable_cantor_function /-
theorem summable_cantor_function (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
Summable (cantorFunctionAux c f) :=
by
apply (summable_geometric_of_lt_1 h1 h2).summable_of_eq_zero_or_self
intro n; cases h : f n <;> simp [h]
#align cardinal.summable_cantor_function Cardinal.summable_cantor_function
+-/
#print Cardinal.cantorFunction /-
/-- `cantor_function c (f : β β bool)` is `Ξ£ n, f n * c ^ n`, where `tt` is interpreted as `1` and
@@ -113,6 +125,7 @@ def cantorFunction (c : β) (f : β β Bool) : β :=
#align cardinal.cantor_function Cardinal.cantorFunction
-/
+#print Cardinal.cantorFunction_le /-
theorem cantorFunction_le (h1 : 0 β€ c) (h2 : c < 1) (h3 : β n, f n β g n) :
cantorFunction c f β€ cantorFunction c g :=
by
@@ -120,7 +133,9 @@ theorem cantorFunction_le (h1 : 0 β€ c) (h2 : c < 1) (h3 : β n, f n β g n)
intro n; cases h : f n; simp [h, cantor_function_aux_nonneg h1]
replace h3 : g n = tt := h3 n h; simp [h, h3]
#align cardinal.cantor_function_le Cardinal.cantorFunction_le
+-/
+#print Cardinal.cantorFunction_succ /-
theorem cantorFunction_succ (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
cantorFunction c f = cond (f 0) 1 0 + c * cantorFunction c fun n => f (n + 1) :=
by
@@ -128,7 +143,9 @@ theorem cantorFunction_succ (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
rw [cantor_function_aux_succ, tsum_mul_left, cantor_function_aux, pow_zero]
rfl
#align cardinal.cantor_function_succ Cardinal.cantorFunction_succ
+-/
+#print Cardinal.increasing_cantorFunction /-
/-- `cantor_function c` is strictly increasing with if `0 < c < 1/2`, if we endow `β β bool` with a
lexicographic order. The lexicographic order doesn't exist for these infinitary products, so we
explicitly write out what it means. -/
@@ -161,7 +178,9 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
apply add_lt_add_left; rw [mul_lt_mul_left h1];
exact ih (fun k hk => hn _ <| Nat.succ_lt_succ hk) fn gn
#align cardinal.increasing_cantor_function Cardinal.increasing_cantorFunction
+-/
+#print Cardinal.cantorFunction_injective /-
/-- `cantor_function c` is injective if `0 < c < 1/2`. -/
theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
Function.Injective (cantorFunction c) :=
@@ -180,6 +199,7 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
Β· apply ne_of_gt; refine' increasing_cantor_function h1 h2 (fun k hk => (hn k hk).symm) _ fn
apply Bool.eq_false_of_not_eq_true; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
#align cardinal.cantor_function_injective Cardinal.cantorFunction_injective
+-/
#print Cardinal.mk_real /-
/-- The cardinality of the reals, as a type. -/
@@ -250,6 +270,7 @@ theorem mk_Iic_real (a : β) : (#Iic a) = π :=
#align cardinal.mk_Iic_real Cardinal.mk_Iic_real
-/
+#print Cardinal.mk_Ioo_real /-
/-- The cardinality of the interval (a, b). -/
theorem mk_Ioo_real {a b : β} (h : a < b) : (#Ioo a b) = π :=
by
@@ -262,21 +283,28 @@ theorem mk_Ioo_real {a b : β} (h : a < b) : (#Ioo a b) = π :=
refine' le_trans _ h2
rw [image_inv, inv_Ioo_0_left h, mk_Ioi_real]
#align cardinal.mk_Ioo_real Cardinal.mk_Ioo_real
+-/
+#print Cardinal.mk_Ico_real /-
/-- The cardinality of the interval [a, b). -/
theorem mk_Ico_real {a b : β} (h : a < b) : (#Ico a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ico_self)
#align cardinal.mk_Ico_real Cardinal.mk_Ico_real
+-/
+#print Cardinal.mk_Icc_real /-
/-- The cardinality of the interval [a, b]. -/
theorem mk_Icc_real {a b : β} (h : a < b) : (#Icc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Icc_self)
#align cardinal.mk_Icc_real Cardinal.mk_Icc_real
+-/
+#print Cardinal.mk_Ioc_real /-
/-- The cardinality of the interval (a, b]. -/
theorem mk_Ioc_real {a b : β} (h : a < b) : (#Ioc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ioc_self)
#align cardinal.mk_Ioc_real Cardinal.mk_Ioc_real
+-/
end Cardinal
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -168,17 +168,17 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
by
intro f g hfg
classical
- by_contra h
- revert hfg
- have : β n, f n β g n := by rw [β not_forall]; intro h'; apply h; ext; apply h'
- let n := Nat.find this
- have hn : β k : β, k < n β f k = g k := by intro k hk; apply of_not_not;
- exact Nat.find_min this hk
- cases fn : f n
- Β· apply ne_of_lt; refine' increasing_cantor_function h1 h2 hn fn _
- apply Bool.eq_true_of_not_eq_false; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
- Β· apply ne_of_gt; refine' increasing_cantor_function h1 h2 (fun k hk => (hn k hk).symm) _ fn
- apply Bool.eq_false_of_not_eq_true; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
+ by_contra h
+ revert hfg
+ have : β n, f n β g n := by rw [β not_forall]; intro h'; apply h; ext; apply h'
+ let n := Nat.find this
+ have hn : β k : β, k < n β f k = g k := by intro k hk; apply of_not_not;
+ exact Nat.find_min this hk
+ cases fn : f n
+ Β· apply ne_of_lt; refine' increasing_cantor_function h1 h2 hn fn _
+ apply Bool.eq_true_of_not_eq_false; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
+ Β· apply ne_of_gt; refine' increasing_cantor_function h1 h2 (fun k hk => (hn k hk).symm) _ fn
+ apply Bool.eq_false_of_not_eq_true; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
#align cardinal.cantor_function_injective Cardinal.cantorFunction_injective
#print Cardinal.mk_real /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -139,7 +139,7 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
have h3 : c < 1 := by apply h2.trans; norm_num
induction' n with n ih generalizing f g
Β· let f_max : β β Bool := fun n => Nat.rec ff (fun _ _ => tt) n
- have hf_max : β n, f n β f_max n := by intro n hn; cases n; rw [fn] at hn; contradiction;
+ have hf_max : β n, f n β f_max n := by intro n hn; cases n; rw [fn] at hn ; contradiction;
apply rfl
let g_min : β β Bool := fun n => Nat.rec tt (fun _ _ => ff) n
have hg_min : β n, g_min n β g n := by intro n hn; cases n; rw [gn]; apply rfl; contradiction
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -51,7 +51,7 @@ continuum, cardinality, reals, cardinality of the reals
open Nat Set
-open Cardinal
+open scoped Cardinal
noncomputable section
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -68,34 +68,16 @@ def cantorFunctionAux (c : β) (f : β β Bool) (n : β) : β :=
#align cardinal.cantor_function_aux Cardinal.cantorFunctionAux
-/
-/- warning: cardinal.cantor_function_aux_tt -> Cardinal.cantorFunctionAux_true is a dubious translation:
-lean 3 declaration is
- forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.true) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.monoid)) c n))
-but is expected to have type
- forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.true) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.instMonoidReal)) c n))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_tt Cardinal.cantorFunctionAux_trueβ'. -/
@[simp]
theorem cantorFunctionAux_true (h : f n = true) : cantorFunctionAux c f n = c ^ n := by
simp [cantor_function_aux, h]
#align cardinal.cantor_function_aux_tt Cardinal.cantorFunctionAux_true
-/- warning: cardinal.cantor_function_aux_ff -> Cardinal.cantorFunctionAux_false is a dubious translation:
-lean 3 declaration is
- forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
-but is expected to have type
- forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_ff Cardinal.cantorFunctionAux_falseβ'. -/
@[simp]
theorem cantorFunctionAux_false (h : f n = false) : cantorFunctionAux c f n = 0 := by
simp [cantor_function_aux, h]
#align cardinal.cantor_function_aux_ff Cardinal.cantorFunctionAux_false
-/- warning: cardinal.cantor_function_aux_nonneg -> Cardinal.cantorFunctionAux_nonneg is a dubious translation:
-lean 3 declaration is
- forall {c : Real} {f : Nat -> Bool} {n : Nat}, (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (Cardinal.cantorFunctionAux c f n))
-but is expected to have type
- forall {c : Real} {f : Nat -> Bool} {n : Nat}, (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (Cardinal.cantorFunctionAux c f n))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_nonneg Cardinal.cantorFunctionAux_nonnegβ'. -/
theorem cantorFunctionAux_nonneg (h : 0 β€ c) : 0 β€ cantorFunctionAux c f n := by
cases h' : f n <;> simp [h']; apply pow_nonneg h
#align cardinal.cantor_function_aux_nonneg Cardinal.cantorFunctionAux_nonneg
@@ -106,34 +88,16 @@ theorem cantorFunctionAux_eq (h : f n = g n) : cantorFunctionAux c f n = cantorF
#align cardinal.cantor_function_aux_eq Cardinal.cantorFunctionAux_eq
-/
-/- warning: cardinal.cantor_function_aux_zero -> Cardinal.cantorFunctionAux_zero is a dubious translation:
-lean 3 declaration is
- forall {c : Real} (f : Nat -> Bool), Eq.{1} Real (Cardinal.cantorFunctionAux c f (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
-but is expected to have type
- forall {c : Real} (f : Nat -> Bool), Eq.{1} Real (Cardinal.cantorFunctionAux c f (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_zero Cardinal.cantorFunctionAux_zeroβ'. -/
theorem cantorFunctionAux_zero (f : β β Bool) : cantorFunctionAux c f 0 = cond (f 0) 1 0 := by
cases h : f 0 <;> simp [h]
#align cardinal.cantor_function_aux_zero Cardinal.cantorFunctionAux_zero
-/- warning: cardinal.cantor_function_aux_succ -> Cardinal.cantorFunctionAux_succ is a dubious translation:
-lean 3 declaration is
- forall {c : Real} (f : Nat -> Bool), Eq.{1} (Nat -> Real) (fun (n : Nat) => Cardinal.cantorFunctionAux c f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) (fun (n : Nat) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) c (Cardinal.cantorFunctionAux c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) n))
-but is expected to have type
- forall {c : Real} (f : Nat -> Bool), Eq.{1} (Nat -> Real) (fun (n : Nat) => Cardinal.cantorFunctionAux c f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) (fun (n : Nat) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) c (Cardinal.cantorFunctionAux c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) n))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succβ'. -/
theorem cantorFunctionAux_succ (f : β β Bool) :
(fun n => cantorFunctionAux c f (n + 1)) = fun n =>
c * cantorFunctionAux c (fun n => f (n + 1)) n :=
by ext n; cases h : f (n + 1) <;> simp [h, pow_succ]
#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succ
-/- warning: cardinal.summable_cantor_function -> Cardinal.summable_cantor_function is a dubious translation:
-lean 3 declaration is
- forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) -> (Summable.{0, 0} Real Nat Real.addCommMonoid (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (Cardinal.cantorFunctionAux c f))
-but is expected to have type
- forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) -> (Summable.{0, 0} Real Nat Real.instAddCommMonoidReal (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (Cardinal.cantorFunctionAux c f))
-Case conversion may be inaccurate. Consider using '#align cardinal.summable_cantor_function Cardinal.summable_cantor_functionβ'. -/
theorem summable_cantor_function (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
Summable (cantorFunctionAux c f) :=
by
@@ -149,12 +113,6 @@ def cantorFunction (c : β) (f : β β Bool) : β :=
#align cardinal.cantor_function Cardinal.cantorFunction
-/
-/- warning: cardinal.cantor_function_le -> Cardinal.cantorFunction_le is a dubious translation:
-lean 3 declaration is
- forall {c : Real} {f : Nat -> Bool} {g : Nat -> Bool}, (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) -> (forall (n : Nat), (coeSort.{1, 1} Bool Prop coeSortBool (f n)) -> (coeSort.{1, 1} Bool Prop coeSortBool (g n))) -> (LE.le.{0} Real Real.hasLe (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g))
-but is expected to have type
- forall {c : Real} {f : Nat -> Bool} {g : Nat -> Bool}, (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) -> (forall (n : Nat), (Eq.{1} Bool (f n) Bool.true) -> (Eq.{1} Bool (g n) Bool.true)) -> (LE.le.{0} Real Real.instLEReal (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_le Cardinal.cantorFunction_leβ'. -/
theorem cantorFunction_le (h1 : 0 β€ c) (h2 : c < 1) (h3 : β n, f n β g n) :
cantorFunction c f β€ cantorFunction c g :=
by
@@ -163,12 +121,6 @@ theorem cantorFunction_le (h1 : 0 β€ c) (h2 : c < 1) (h3 : β n, f n β g n)
replace h3 : g n = tt := h3 n h; simp [h, h3]
#align cardinal.cantor_function_le Cardinal.cantorFunction_le
-/- warning: cardinal.cantor_function_succ -> Cardinal.cantorFunction_succ is a dubious translation:
-lean 3 declaration is
- forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) -> (Eq.{1} Real (Cardinal.cantorFunction c f) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) c (Cardinal.cantorFunction c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))))))
-but is expected to have type
- forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) -> (Eq.{1} Real (Cardinal.cantorFunction c f) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal))) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) c (Cardinal.cantorFunction c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))))))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_succ Cardinal.cantorFunction_succβ'. -/
theorem cantorFunction_succ (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
cantorFunction c f = cond (f 0) 1 0 + c * cantorFunction c fun n => f (n + 1) :=
by
@@ -177,12 +129,6 @@ theorem cantorFunction_succ (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
rfl
#align cardinal.cantor_function_succ Cardinal.cantorFunction_succ
-/- warning: cardinal.increasing_cantor_function -> Cardinal.increasing_cantorFunction is a dubious translation:
-lean 3 declaration is
- forall {c : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 2 (OfNat.mk.{0} Real 2 (bit0.{0} Real Real.hasAdd (One.one.{0} Real Real.hasOne)))))) -> (forall {n : Nat} {f : Nat -> Bool} {g : Nat -> Bool}, (forall (k : Nat), (LT.lt.{0} Nat Nat.hasLt k n) -> (Eq.{1} Bool (f k) (g k))) -> (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Bool (g n) Bool.true) -> (LT.lt.{0} Real Real.hasLt (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g)))
-but is expected to have type
- forall {c : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 2 (instOfNat.{0} Real 2 Real.natCast (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))))) -> (forall {n : Nat} {f : Nat -> Bool} {g : Nat -> Bool}, (forall (k : Nat), (LT.lt.{0} Nat instLTNat k n) -> (Eq.{1} Bool (f k) (g k))) -> (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Bool (g n) Bool.true) -> (LT.lt.{0} Real Real.instLTReal (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g)))
-Case conversion may be inaccurate. Consider using '#align cardinal.increasing_cantor_function Cardinal.increasing_cantorFunctionβ'. -/
/-- `cantor_function c` is strictly increasing with if `0 < c < 1/2`, if we endow `β β bool` with a
lexicographic order. The lexicographic order doesn't exist for these infinitary products, so we
explicitly write out what it means. -/
@@ -216,12 +162,6 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
exact ih (fun k hk => hn _ <| Nat.succ_lt_succ hk) fn gn
#align cardinal.increasing_cantor_function Cardinal.increasing_cantorFunction
-/- warning: cardinal.cantor_function_injective -> Cardinal.cantorFunction_injective is a dubious translation:
-lean 3 declaration is
- forall {c : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 2 (OfNat.mk.{0} Real 2 (bit0.{0} Real Real.hasAdd (One.one.{0} Real Real.hasOne)))))) -> (Function.Injective.{1, 1} (Nat -> Bool) Real (Cardinal.cantorFunction c))
-but is expected to have type
- forall {c : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 2 (instOfNat.{0} Real 2 Real.natCast (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))))) -> (Function.Injective.{1, 1} (Nat -> Bool) Real (Cardinal.cantorFunction c))
-Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_injective Cardinal.cantorFunction_injectiveβ'. -/
/-- `cantor_function c` is injective if `0 < c < 1/2`. -/
theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
Function.Injective (cantorFunction c) :=
@@ -310,12 +250,6 @@ theorem mk_Iic_real (a : β) : (#Iic a) = π :=
#align cardinal.mk_Iic_real Cardinal.mk_Iic_real
-/
-/- warning: cardinal.mk_Ioo_real -> Cardinal.mk_Ioo_real is a dubious translation:
-lean 3 declaration is
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Ioo.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
-but is expected to have type
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Ioo.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
-Case conversion may be inaccurate. Consider using '#align cardinal.mk_Ioo_real Cardinal.mk_Ioo_realβ'. -/
/-- The cardinality of the interval (a, b). -/
theorem mk_Ioo_real {a b : β} (h : a < b) : (#Ioo a b) = π :=
by
@@ -329,34 +263,16 @@ theorem mk_Ioo_real {a b : β} (h : a < b) : (#Ioo a b) = π :=
rw [image_inv, inv_Ioo_0_left h, mk_Ioi_real]
#align cardinal.mk_Ioo_real Cardinal.mk_Ioo_real
-/- warning: cardinal.mk_Ico_real -> Cardinal.mk_Ico_real is a dubious translation:
-lean 3 declaration is
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Ico.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
-but is expected to have type
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Ico.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
-Case conversion may be inaccurate. Consider using '#align cardinal.mk_Ico_real Cardinal.mk_Ico_realβ'. -/
/-- The cardinality of the interval [a, b). -/
theorem mk_Ico_real {a b : β} (h : a < b) : (#Ico a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ico_self)
#align cardinal.mk_Ico_real Cardinal.mk_Ico_real
-/- warning: cardinal.mk_Icc_real -> Cardinal.mk_Icc_real is a dubious translation:
-lean 3 declaration is
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Icc.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
-but is expected to have type
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Icc.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
-Case conversion may be inaccurate. Consider using '#align cardinal.mk_Icc_real Cardinal.mk_Icc_realβ'. -/
/-- The cardinality of the interval [a, b]. -/
theorem mk_Icc_real {a b : β} (h : a < b) : (#Icc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Icc_self)
#align cardinal.mk_Icc_real Cardinal.mk_Icc_real
-/- warning: cardinal.mk_Ioc_real -> Cardinal.mk_Ioc_real is a dubious translation:
-lean 3 declaration is
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Ioc.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
-but is expected to have type
- forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Ioc.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
-Case conversion may be inaccurate. Consider using '#align cardinal.mk_Ioc_real Cardinal.mk_Ioc_realβ'. -/
/-- The cardinality of the interval (a, b]. -/
theorem mk_Ioc_real {a b : β} (h : a < b) : (#Ioc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ioc_self)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -96,10 +96,8 @@ lean 3 declaration is
but is expected to have type
forall {c : Real} {f : Nat -> Bool} {n : Nat}, (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (Cardinal.cantorFunctionAux c f n))
Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_nonneg Cardinal.cantorFunctionAux_nonnegβ'. -/
-theorem cantorFunctionAux_nonneg (h : 0 β€ c) : 0 β€ cantorFunctionAux c f n :=
- by
- cases h' : f n <;> simp [h']
- apply pow_nonneg h
+theorem cantorFunctionAux_nonneg (h : 0 β€ c) : 0 β€ cantorFunctionAux c f n := by
+ cases h' : f n <;> simp [h']; apply pow_nonneg h
#align cardinal.cantor_function_aux_nonneg Cardinal.cantorFunctionAux_nonneg
#print Cardinal.cantorFunctionAux_eq /-
@@ -127,9 +125,7 @@ Case conversion may be inaccurate. Consider using '#align cardinal.cantor_functi
theorem cantorFunctionAux_succ (f : β β Bool) :
(fun n => cantorFunctionAux c f (n + 1)) = fun n =>
c * cantorFunctionAux c (fun n => f (n + 1)) n :=
- by
- ext n
- cases h : f (n + 1) <;> simp [h, pow_succ]
+ by ext n; cases h : f (n + 1) <;> simp [h, pow_succ]
#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succ
/- warning: cardinal.summable_cantor_function -> Cardinal.summable_cantor_function is a dubious translation:
@@ -194,45 +190,29 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
(hn : β k < n, f k = g k) (fn : f n = false) (gn : g n = true) :
cantorFunction c f < cantorFunction c g :=
by
- have h3 : c < 1 := by
- apply h2.trans
- norm_num
+ have h3 : c < 1 := by apply h2.trans; norm_num
induction' n with n ih generalizing f g
Β· let f_max : β β Bool := fun n => Nat.rec ff (fun _ _ => tt) n
- have hf_max : β n, f n β f_max n := by
- intro n hn
- cases n
- rw [fn] at hn
- contradiction
+ have hf_max : β n, f n β f_max n := by intro n hn; cases n; rw [fn] at hn; contradiction;
apply rfl
let g_min : β β Bool := fun n => Nat.rec tt (fun _ _ => ff) n
- have hg_min : β n, g_min n β g n := by
- intro n hn
- cases n
- rw [gn]
- apply rfl
- contradiction
+ have hg_min : β n, g_min n β g n := by intro n hn; cases n; rw [gn]; apply rfl; contradiction
apply (cantor_function_le (le_of_lt h1) h3 hf_max).trans_lt
refine' lt_of_lt_of_le _ (cantor_function_le (le_of_lt h1) h3 hg_min)
have : c / (1 - c) < 1 := by
rw [div_lt_one, lt_sub_iff_add_lt]
- Β· convert add_lt_add h2 h2
- norm_num
+ Β· convert add_lt_add h2 h2; norm_num
rwa [sub_pos]
convert this
Β· rw [cantor_function_succ _ (le_of_lt h1) h3, div_eq_mul_inv, β
tsum_geometric_of_lt_1 (le_of_lt h1) h3]
apply zero_add
Β· refine' (tsum_eq_single 0 _).trans _
- Β· intro n hn
- cases n
- contradiction
- rfl
+ Β· intro n hn; cases n; contradiction; rfl
Β· exact cantor_function_aux_zero _
rw [cantor_function_succ f (le_of_lt h1) h3, cantor_function_succ g (le_of_lt h1) h3]
rw [hn 0 <| zero_lt_succ n]
- apply add_lt_add_left
- rw [mul_lt_mul_left h1]
+ apply add_lt_add_left; rw [mul_lt_mul_left h1];
exact ih (fun k hk => hn _ <| Nat.succ_lt_succ hk) fn gn
#align cardinal.increasing_cantor_function Cardinal.increasing_cantorFunction
@@ -250,30 +230,15 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
classical
by_contra h
revert hfg
- have : β n, f n β g n := by
- rw [β not_forall]
- intro h'
- apply h
- ext
- apply h'
+ have : β n, f n β g n := by rw [β not_forall]; intro h'; apply h; ext; apply h'
let n := Nat.find this
- have hn : β k : β, k < n β f k = g k := by
- intro k hk
- apply of_not_not
+ have hn : β k : β, k < n β f k = g k := by intro k hk; apply of_not_not;
exact Nat.find_min this hk
cases fn : f n
- Β· apply ne_of_lt
- refine' increasing_cantor_function h1 h2 hn fn _
- apply Bool.eq_true_of_not_eq_false
- rw [β fn]
- apply Ne.symm
- exact Nat.find_spec this
- Β· apply ne_of_gt
- refine' increasing_cantor_function h1 h2 (fun k hk => (hn k hk).symm) _ fn
- apply Bool.eq_false_of_not_eq_true
- rw [β fn]
- apply Ne.symm
- exact Nat.find_spec this
+ Β· apply ne_of_lt; refine' increasing_cantor_function h1 h2 hn fn _
+ apply Bool.eq_true_of_not_eq_false; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
+ Β· apply ne_of_gt; refine' increasing_cantor_function h1 h2 (fun k hk => (hn k hk).symm) _ fn
+ apply Bool.eq_false_of_not_eq_true; rw [β fn]; apply Ne.symm; exact Nat.find_spec this
#align cardinal.cantor_function_injective Cardinal.cantorFunction_injective
#print Cardinal.mk_real /-
@@ -281,14 +246,10 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
theorem mk_real : (#β) = π := by
apply le_antisymm
Β· rw [real.equiv_Cauchy.cardinal_eq]
- apply mk_quotient_le.trans
- apply (mk_subtype_le _).trans_eq
+ apply mk_quotient_le.trans; apply (mk_subtype_le _).trans_eq
rw [β power_def, mk_nat, mk_rat, aleph_0_power_aleph_0]
Β· convert mk_le_of_injective (cantor_function_injective _ _)
- rw [β power_def, mk_bool, mk_nat, two_power_aleph_0]
- exact 1 / 3
- norm_num
- norm_num
+ rw [β power_def, mk_bool, mk_nat, two_power_aleph_0]; exact 1 / 3; norm_num; norm_num
#align cardinal.mk_real Cardinal.mk_real
-/
@@ -300,10 +261,8 @@ theorem mk_univ_real : (#(Set.univ : Set β)) = π := by rw [mk_univ, mk_real
#print Cardinal.not_countable_real /-
/-- **Non-Denumerability of the Continuum**: The reals are not countable. -/
-theorem not_countable_real : Β¬(Set.univ : Set β).Countable :=
- by
- rw [β le_aleph_0_iff_set_countable, not_le, mk_univ_real]
- apply cantor
+theorem not_countable_real : Β¬(Set.univ : Set β).Countable := by
+ rw [β le_aleph_0_iff_set_countable, not_le, mk_univ_real]; apply cantor
#align cardinal.not_countable_real Cardinal.not_countable_real
-/
@@ -312,20 +271,13 @@ theorem not_countable_real : Β¬(Set.univ : Set β).Countable :=
theorem mk_Ioi_real (a : β) : (#Ioi a) = π :=
by
refine' le_antisymm (mk_real βΈ mk_set_le _) _
- rw [β not_lt]
- intro h
+ rw [β not_lt]; intro h
refine' ne_of_lt _ mk_univ_real
- have hu : Iio a βͺ {a} βͺ Ioi a = Set.univ :=
- by
- convert Iic_union_Ioi
- exact Iio_union_right
+ have hu : Iio a βͺ {a} βͺ Ioi a = Set.univ := by convert Iic_union_Ioi; exact Iio_union_right
rw [β hu]
refine' lt_of_le_of_lt (mk_union_le _ _) _
refine' lt_of_le_of_lt (add_le_add_right (mk_union_le _ _) _) _
- have h2 : (fun x => a + a - x) '' Ioi a = Iio a :=
- by
- convert image_const_sub_Ioi _ _
- simp
+ have h2 : (fun x => a + a - x) '' Ioi a = Iio a := by convert image_const_sub_Ioi _ _; simp
rw [β h2]
refine' add_lt_of_lt (cantor _).le _ h
refine' add_lt_of_lt (cantor _).le (mk_image_le.trans_lt h) _
@@ -346,10 +298,7 @@ theorem mk_Ici_real (a : β) : (#Ici a) = π :=
theorem mk_Iio_real (a : β) : (#Iio a) = π :=
by
refine' le_antisymm (mk_real βΈ mk_set_le _) _
- have h2 : (fun x => a + a - x) '' Iio a = Ioi a :=
- by
- convert image_const_sub_Iio _ _
- simp
+ have h2 : (fun x => a + a - x) '' Iio a = Ioi a := by convert image_const_sub_Iio _ _; simp
exact mk_Ioi_real a βΈ h2 βΈ mk_image_le
#align cardinal.mk_Iio_real Cardinal.mk_Iio_real
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/730c6d4cab72b9d84fcfb9e95e8796e9cd8f40ba
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
! This file was ported from Lean 3 source module data.real.cardinality
-! leanprover-community/mathlib commit 7e7aaccf9b0182576cabdde36cf1b5ad3585b70d
+! leanprover-community/mathlib commit 8eb9c42d4d34c77f6ee84ea766ae4070233a973c
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,6 +16,9 @@ import Mathbin.SetTheory.Cardinal.Continuum
/-!
# The cardinality of the reals
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file shows that the real numbers have cardinality continuum, i.e. `#β = π `.
We show that `#β β€ π ` by noting that every real number is determined by a Cauchy-sequence of the
mathlib commit https://github.com/leanprover-community/mathlib/commit/cd8fafa2fac98e1a67097e8a91ad9901cfde48af
@@ -56,37 +56,71 @@ namespace Cardinal
variable {c : β} {f g : β β Bool} {n : β}
+#print Cardinal.cantorFunctionAux /-
/-- The body of the sum in `cantor_function`.
`cantor_function_aux c f n = c ^ n` if `f n = tt`;
`cantor_function_aux c f n = 0` if `f n = ff`. -/
def cantorFunctionAux (c : β) (f : β β Bool) (n : β) : β :=
cond (f n) (c ^ n) 0
#align cardinal.cantor_function_aux Cardinal.cantorFunctionAux
+-/
+/- warning: cardinal.cantor_function_aux_tt -> Cardinal.cantorFunctionAux_true is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.true) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.monoid)) c n))
+but is expected to have type
+ forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.true) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.instMonoidReal)) c n))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_tt Cardinal.cantorFunctionAux_trueβ'. -/
@[simp]
theorem cantorFunctionAux_true (h : f n = true) : cantorFunctionAux c f n = c ^ n := by
simp [cantor_function_aux, h]
#align cardinal.cantor_function_aux_tt Cardinal.cantorFunctionAux_true
+/- warning: cardinal.cantor_function_aux_ff -> Cardinal.cantorFunctionAux_false is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
+but is expected to have type
+ forall {c : Real} {f : Nat -> Bool} {n : Nat}, (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Real (Cardinal.cantorFunctionAux c f n) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_ff Cardinal.cantorFunctionAux_falseβ'. -/
@[simp]
theorem cantorFunctionAux_false (h : f n = false) : cantorFunctionAux c f n = 0 := by
simp [cantor_function_aux, h]
#align cardinal.cantor_function_aux_ff Cardinal.cantorFunctionAux_false
+/- warning: cardinal.cantor_function_aux_nonneg -> Cardinal.cantorFunctionAux_nonneg is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} {f : Nat -> Bool} {n : Nat}, (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (Cardinal.cantorFunctionAux c f n))
+but is expected to have type
+ forall {c : Real} {f : Nat -> Bool} {n : Nat}, (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (Cardinal.cantorFunctionAux c f n))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_nonneg Cardinal.cantorFunctionAux_nonnegβ'. -/
theorem cantorFunctionAux_nonneg (h : 0 β€ c) : 0 β€ cantorFunctionAux c f n :=
by
cases h' : f n <;> simp [h']
apply pow_nonneg h
#align cardinal.cantor_function_aux_nonneg Cardinal.cantorFunctionAux_nonneg
+#print Cardinal.cantorFunctionAux_eq /-
theorem cantorFunctionAux_eq (h : f n = g n) : cantorFunctionAux c f n = cantorFunctionAux c g n :=
by simp [cantor_function_aux, h]
#align cardinal.cantor_function_aux_eq Cardinal.cantorFunctionAux_eq
+-/
+/- warning: cardinal.cantor_function_aux_zero -> Cardinal.cantorFunctionAux_zero is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} (f : Nat -> Bool), Eq.{1} Real (Cardinal.cantorFunctionAux c f (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
+but is expected to have type
+ forall {c : Real} (f : Nat -> Bool), Eq.{1} Real (Cardinal.cantorFunctionAux c f (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_zero Cardinal.cantorFunctionAux_zeroβ'. -/
theorem cantorFunctionAux_zero (f : β β Bool) : cantorFunctionAux c f 0 = cond (f 0) 1 0 := by
cases h : f 0 <;> simp [h]
#align cardinal.cantor_function_aux_zero Cardinal.cantorFunctionAux_zero
+/- warning: cardinal.cantor_function_aux_succ -> Cardinal.cantorFunctionAux_succ is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} (f : Nat -> Bool), Eq.{1} (Nat -> Real) (fun (n : Nat) => Cardinal.cantorFunctionAux c f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) (fun (n : Nat) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) c (Cardinal.cantorFunctionAux c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) n))
+but is expected to have type
+ forall {c : Real} (f : Nat -> Bool), Eq.{1} (Nat -> Real) (fun (n : Nat) => Cardinal.cantorFunctionAux c f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) (fun (n : Nat) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) c (Cardinal.cantorFunctionAux c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) n))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succβ'. -/
theorem cantorFunctionAux_succ (f : β β Bool) :
(fun n => cantorFunctionAux c f (n + 1)) = fun n =>
c * cantorFunctionAux c (fun n => f (n + 1)) n :=
@@ -95,6 +129,12 @@ theorem cantorFunctionAux_succ (f : β β Bool) :
cases h : f (n + 1) <;> simp [h, pow_succ]
#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succ
+/- warning: cardinal.summable_cantor_function -> Cardinal.summable_cantor_function is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) -> (Summable.{0, 0} Real Nat Real.addCommMonoid (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (Cardinal.cantorFunctionAux c f))
+but is expected to have type
+ forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) -> (Summable.{0, 0} Real Nat Real.instAddCommMonoidReal (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (Cardinal.cantorFunctionAux c f))
+Case conversion may be inaccurate. Consider using '#align cardinal.summable_cantor_function Cardinal.summable_cantor_functionβ'. -/
theorem summable_cantor_function (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
Summable (cantorFunctionAux c f) :=
by
@@ -102,12 +142,20 @@ theorem summable_cantor_function (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1)
intro n; cases h : f n <;> simp [h]
#align cardinal.summable_cantor_function Cardinal.summable_cantor_function
+#print Cardinal.cantorFunction /-
/-- `cantor_function c (f : β β bool)` is `Ξ£ n, f n * c ^ n`, where `tt` is interpreted as `1` and
`ff` is interpreted as `0`. It is implemented using `cantor_function_aux`. -/
def cantorFunction (c : β) (f : β β Bool) : β :=
β' n, cantorFunctionAux c f n
#align cardinal.cantor_function Cardinal.cantorFunction
+-/
+/- warning: cardinal.cantor_function_le -> Cardinal.cantorFunction_le is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} {f : Nat -> Bool} {g : Nat -> Bool}, (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) -> (forall (n : Nat), (coeSort.{1, 1} Bool Prop coeSortBool (f n)) -> (coeSort.{1, 1} Bool Prop coeSortBool (g n))) -> (LE.le.{0} Real Real.hasLe (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g))
+but is expected to have type
+ forall {c : Real} {f : Nat -> Bool} {g : Nat -> Bool}, (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) -> (forall (n : Nat), (Eq.{1} Bool (f n) Bool.true) -> (Eq.{1} Bool (g n) Bool.true)) -> (LE.le.{0} Real Real.instLEReal (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_le Cardinal.cantorFunction_leβ'. -/
theorem cantorFunction_le (h1 : 0 β€ c) (h2 : c < 1) (h3 : β n, f n β g n) :
cantorFunction c f β€ cantorFunction c g :=
by
@@ -116,6 +164,12 @@ theorem cantorFunction_le (h1 : 0 β€ c) (h2 : c < 1) (h3 : β n, f n β g n)
replace h3 : g n = tt := h3 n h; simp [h, h3]
#align cardinal.cantor_function_le Cardinal.cantorFunction_le
+/- warning: cardinal.cantor_function_succ -> Cardinal.cantorFunction_succ is a dubious translation:
+lean 3 declaration is
+ forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) -> (Eq.{1} Real (Cardinal.cantorFunction c f) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) c (Cardinal.cantorFunction c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))))))
+but is expected to have type
+ forall {c : Real} (f : Nat -> Bool), (LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) -> (Eq.{1} Real (Cardinal.cantorFunction c f) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (cond.{0} Real (f (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal))) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) c (Cardinal.cantorFunction c (fun (n : Nat) => f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))))))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_succ Cardinal.cantorFunction_succβ'. -/
theorem cantorFunction_succ (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
cantorFunction c f = cond (f 0) 1 0 + c * cantorFunction c fun n => f (n + 1) :=
by
@@ -124,6 +178,12 @@ theorem cantorFunction_succ (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
rfl
#align cardinal.cantor_function_succ Cardinal.cantorFunction_succ
+/- warning: cardinal.increasing_cantor_function -> Cardinal.increasing_cantorFunction is a dubious translation:
+lean 3 declaration is
+ forall {c : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 2 (OfNat.mk.{0} Real 2 (bit0.{0} Real Real.hasAdd (One.one.{0} Real Real.hasOne)))))) -> (forall {n : Nat} {f : Nat -> Bool} {g : Nat -> Bool}, (forall (k : Nat), (LT.lt.{0} Nat Nat.hasLt k n) -> (Eq.{1} Bool (f k) (g k))) -> (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Bool (g n) Bool.true) -> (LT.lt.{0} Real Real.hasLt (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g)))
+but is expected to have type
+ forall {c : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 2 (instOfNat.{0} Real 2 Real.natCast (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))))) -> (forall {n : Nat} {f : Nat -> Bool} {g : Nat -> Bool}, (forall (k : Nat), (LT.lt.{0} Nat instLTNat k n) -> (Eq.{1} Bool (f k) (g k))) -> (Eq.{1} Bool (f n) Bool.false) -> (Eq.{1} Bool (g n) Bool.true) -> (LT.lt.{0} Real Real.instLTReal (Cardinal.cantorFunction c f) (Cardinal.cantorFunction c g)))
+Case conversion may be inaccurate. Consider using '#align cardinal.increasing_cantor_function Cardinal.increasing_cantorFunctionβ'. -/
/-- `cantor_function c` is strictly increasing with if `0 < c < 1/2`, if we endow `β β bool` with a
lexicographic order. The lexicographic order doesn't exist for these infinitary products, so we
explicitly write out what it means. -/
@@ -173,6 +233,12 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
exact ih (fun k hk => hn _ <| Nat.succ_lt_succ hk) fn gn
#align cardinal.increasing_cantor_function Cardinal.increasing_cantorFunction
+/- warning: cardinal.cantor_function_injective -> Cardinal.cantorFunction_injective is a dubious translation:
+lean 3 declaration is
+ forall {c : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) c) -> (LT.lt.{0} Real Real.hasLt c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) (OfNat.ofNat.{0} Real 2 (OfNat.mk.{0} Real 2 (bit0.{0} Real Real.hasAdd (One.one.{0} Real Real.hasOne)))))) -> (Function.Injective.{1, 1} (Nat -> Bool) Real (Cardinal.cantorFunction c))
+but is expected to have type
+ forall {c : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) c) -> (LT.lt.{0} Real Real.instLTReal c (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) (OfNat.ofNat.{0} Real 2 (instOfNat.{0} Real 2 Real.natCast (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))))) -> (Function.Injective.{1, 1} (Nat -> Bool) Real (Cardinal.cantorFunction c))
+Case conversion may be inaccurate. Consider using '#align cardinal.cantor_function_injective Cardinal.cantorFunction_injectiveβ'. -/
/-- `cantor_function c` is injective if `0 < c < 1/2`. -/
theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
Function.Injective (cantorFunction c) :=
@@ -207,6 +273,7 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
exact Nat.find_spec this
#align cardinal.cantor_function_injective Cardinal.cantorFunction_injective
+#print Cardinal.mk_real /-
/-- The cardinality of the reals, as a type. -/
theorem mk_real : (#β) = π := by
apply le_antisymm
@@ -220,18 +287,24 @@ theorem mk_real : (#β) = π := by
norm_num
norm_num
#align cardinal.mk_real Cardinal.mk_real
+-/
+#print Cardinal.mk_univ_real /-
/-- The cardinality of the reals, as a set. -/
theorem mk_univ_real : (#(Set.univ : Set β)) = π := by rw [mk_univ, mk_real]
#align cardinal.mk_univ_real Cardinal.mk_univ_real
+-/
+#print Cardinal.not_countable_real /-
/-- **Non-Denumerability of the Continuum**: The reals are not countable. -/
theorem not_countable_real : Β¬(Set.univ : Set β).Countable :=
by
rw [β le_aleph_0_iff_set_countable, not_le, mk_univ_real]
apply cantor
#align cardinal.not_countable_real Cardinal.not_countable_real
+-/
+#print Cardinal.mk_Ioi_real /-
/-- The cardinality of the interval (a, β). -/
theorem mk_Ioi_real (a : β) : (#Ioi a) = π :=
by
@@ -256,12 +329,16 @@ theorem mk_Ioi_real (a : β) : (#Ioi a) = π :=
rw [mk_singleton]
exact one_lt_aleph_0.trans (cantor _)
#align cardinal.mk_Ioi_real Cardinal.mk_Ioi_real
+-/
+#print Cardinal.mk_Ici_real /-
/-- The cardinality of the interval [a, β). -/
theorem mk_Ici_real (a : β) : (#Ici a) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioi_real a βΈ mk_le_mk_of_subset Ioi_subset_Ici_self)
#align cardinal.mk_Ici_real Cardinal.mk_Ici_real
+-/
+#print Cardinal.mk_Iio_real /-
/-- The cardinality of the interval (-β, a). -/
theorem mk_Iio_real (a : β) : (#Iio a) = π :=
by
@@ -272,12 +349,21 @@ theorem mk_Iio_real (a : β) : (#Iio a) = π :=
simp
exact mk_Ioi_real a βΈ h2 βΈ mk_image_le
#align cardinal.mk_Iio_real Cardinal.mk_Iio_real
+-/
+#print Cardinal.mk_Iic_real /-
/-- The cardinality of the interval (-β, a]. -/
theorem mk_Iic_real (a : β) : (#Iic a) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Iio_real a βΈ mk_le_mk_of_subset Iio_subset_Iic_self)
#align cardinal.mk_Iic_real Cardinal.mk_Iic_real
+-/
+/- warning: cardinal.mk_Ioo_real -> Cardinal.mk_Ioo_real is a dubious translation:
+lean 3 declaration is
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Ioo.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
+but is expected to have type
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Ioo.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
+Case conversion may be inaccurate. Consider using '#align cardinal.mk_Ioo_real Cardinal.mk_Ioo_realβ'. -/
/-- The cardinality of the interval (a, b). -/
theorem mk_Ioo_real {a b : β} (h : a < b) : (#Ioo a b) = π :=
by
@@ -291,16 +377,34 @@ theorem mk_Ioo_real {a b : β} (h : a < b) : (#Ioo a b) = π :=
rw [image_inv, inv_Ioo_0_left h, mk_Ioi_real]
#align cardinal.mk_Ioo_real Cardinal.mk_Ioo_real
+/- warning: cardinal.mk_Ico_real -> Cardinal.mk_Ico_real is a dubious translation:
+lean 3 declaration is
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Ico.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
+but is expected to have type
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Ico.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
+Case conversion may be inaccurate. Consider using '#align cardinal.mk_Ico_real Cardinal.mk_Ico_realβ'. -/
/-- The cardinality of the interval [a, b). -/
theorem mk_Ico_real {a b : β} (h : a < b) : (#Ico a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ico_self)
#align cardinal.mk_Ico_real Cardinal.mk_Ico_real
+/- warning: cardinal.mk_Icc_real -> Cardinal.mk_Icc_real is a dubious translation:
+lean 3 declaration is
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Icc.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
+but is expected to have type
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Icc.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
+Case conversion may be inaccurate. Consider using '#align cardinal.mk_Icc_real Cardinal.mk_Icc_realβ'. -/
/-- The cardinality of the interval [a, b]. -/
theorem mk_Icc_real {a b : β} (h : a < b) : (#Icc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Icc_self)
#align cardinal.mk_Icc_real Cardinal.mk_Icc_real
+/- warning: cardinal.mk_Ioc_real -> Cardinal.mk_Ioc_real is a dubious translation:
+lean 3 declaration is
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.hasLt a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Ioc.{0} Real Real.preorder a b))) Cardinal.continuum.{0})
+but is expected to have type
+ forall {a : Real} {b : Real}, (LT.lt.{0} Real Real.instLTReal a b) -> (Eq.{2} Cardinal.{0} (Cardinal.mk.{0} (Set.Elem.{0} Real (Set.Ioc.{0} Real Real.instPreorderReal a b))) Cardinal.continuum.{0})
+Case conversion may be inaccurate. Consider using '#align cardinal.mk_Ioc_real Cardinal.mk_Ioc_realβ'. -/
/-- The cardinality of the interval (a, b]. -/
theorem mk_Ioc_real {a b : β} (h : a < b) : (#Ioc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ioc_self)
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : β (n : β) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -87,7 +87,7 @@ theorem cantorFunctionAux_succ (f : β β Bool) :
(fun n => cantorFunctionAux c f (n + 1)) = fun n =>
c * cantorFunctionAux c (fun n => f (n + 1)) n := by
ext n
- cases h : f (n + 1) <;> simp [h, _root_.pow_succ]
+ cases h : f (n + 1) <;> simp [h, _root_.pow_succ']
#align cardinal.cantor_function_aux_succ Cardinal.cantorFunctionAux_succ
theorem summable_cantor_function (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
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 | |
@@ -251,7 +251,7 @@ theorem mk_Ici_real (a : β) : #(Ici a) = π :=
theorem mk_Iio_real (a : β) : #(Iio a) = π := by
refine' le_antisymm (mk_real βΈ mk_set_le _) _
have h2 : (fun x => a + a - x) '' Iio a = Ioi a := by
- simp only [image_const_sub_Iio, add_sub_cancel]
+ simp only [image_const_sub_Iio, add_sub_cancel_right]
exact mk_Ioi_real a βΈ h2 βΈ mk_image_le
#align cardinal.mk_Iio_real Cardinal.mk_Iio_real
@@ -92,7 +92,7 @@ theorem cantorFunctionAux_succ (f : β β Bool) :
theorem summable_cantor_function (f : β β Bool) (h1 : 0 β€ c) (h2 : c < 1) :
Summable (cantorFunctionAux c f) := by
- apply (summable_geometric_of_lt_1 h1 h2).summable_of_eq_zero_or_self
+ apply (summable_geometric_of_lt_one h1 h2).summable_of_eq_zero_or_self
intro n; cases h : f n <;> simp [h]
#align cardinal.summable_cantor_function Cardinal.summable_cantor_function
@@ -148,7 +148,7 @@ theorem increasing_cantorFunction (h1 : 0 < c) (h2 : c < 1 / 2) {n : β} {f g :
rwa [sub_pos]
convert this
Β· rw [cantorFunction_succ _ (le_of_lt h1) h3, div_eq_mul_inv, β
- tsum_geometric_of_lt_1 (le_of_lt h1) h3]
+ tsum_geometric_of_lt_one (le_of_lt h1) h3]
apply zero_add
Β· refine' (tsum_eq_single 0 _).trans _
Β· intro n hn
@@ -2,17 +2,14 @@
Copyright (c) 2019 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module data.real.cardinality
-! leanprover-community/mathlib commit 7e7aaccf9b0182576cabdde36cf1b5ad3585b70d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Rat.Denumerable
import Mathlib.Data.Set.Pointwise.Interval
import Mathlib.SetTheory.Cardinal.Continuum
+#align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d"
+
/-!
# The cardinality of the reals
@@ -200,7 +200,7 @@ theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
#align cardinal.cantor_function_injective Cardinal.cantorFunction_injective
/-- The cardinality of the reals, as a type. -/
-theorem mk_real : (#β) = π := by
+theorem mk_real : #β = π := by
apply le_antisymm
Β· rw [Real.equivCauchy.cardinal_eq]
apply mk_quotient_le.trans
@@ -214,7 +214,7 @@ theorem mk_real : (#β) = π := by
#align cardinal.mk_real Cardinal.mk_real
/-- The cardinality of the reals, as a set. -/
-theorem mk_univ_real : (#(Set.univ : Set β)) = π := by rw [mk_univ, mk_real]
+theorem mk_univ_real : #(Set.univ : Set β) = π := by rw [mk_univ, mk_real]
#align cardinal.mk_univ_real Cardinal.mk_univ_real
/-- **Non-Denumerability of the Continuum**: The reals are not countable. -/
@@ -224,7 +224,7 @@ theorem not_countable_real : Β¬(Set.univ : Set β).Countable := by
#align cardinal.not_countable_real Cardinal.not_countable_real
/-- The cardinality of the interval (a, β). -/
-theorem mk_Ioi_real (a : β) : (#Ioi a) = π := by
+theorem mk_Ioi_real (a : β) : #(Ioi a) = π := by
refine' le_antisymm (mk_real βΈ mk_set_le _) _
rw [β not_lt]
intro h
@@ -246,12 +246,12 @@ theorem mk_Ioi_real (a : β) : (#Ioi a) = π := by
#align cardinal.mk_Ioi_real Cardinal.mk_Ioi_real
/-- The cardinality of the interval [a, β). -/
-theorem mk_Ici_real (a : β) : (#Ici a) = π :=
+theorem mk_Ici_real (a : β) : #(Ici a) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioi_real a βΈ mk_le_mk_of_subset Ioi_subset_Ici_self)
#align cardinal.mk_Ici_real Cardinal.mk_Ici_real
/-- The cardinality of the interval (-β, a). -/
-theorem mk_Iio_real (a : β) : (#Iio a) = π := by
+theorem mk_Iio_real (a : β) : #(Iio a) = π := by
refine' le_antisymm (mk_real βΈ mk_set_le _) _
have h2 : (fun x => a + a - x) '' Iio a = Ioi a := by
simp only [image_const_sub_Iio, add_sub_cancel]
@@ -259,34 +259,34 @@ theorem mk_Iio_real (a : β) : (#Iio a) = π := by
#align cardinal.mk_Iio_real Cardinal.mk_Iio_real
/-- The cardinality of the interval (-β, a]. -/
-theorem mk_Iic_real (a : β) : (#Iic a) = π :=
+theorem mk_Iic_real (a : β) : #(Iic a) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Iio_real a βΈ mk_le_mk_of_subset Iio_subset_Iic_self)
#align cardinal.mk_Iic_real Cardinal.mk_Iic_real
/-- The cardinality of the interval (a, b). -/
-theorem mk_Ioo_real {a b : β} (h : a < b) : (#Ioo a b) = π := by
+theorem mk_Ioo_real {a b : β} (h : a < b) : #(Ioo a b) = π := by
refine' le_antisymm (mk_real βΈ mk_set_le _) _
- have h1 : (#(fun x => x - a) '' Ioo a b) β€ (#Ioo a b) := mk_image_le
+ have h1 : #((fun x => x - a) '' Ioo a b) β€ #(Ioo a b) := mk_image_le
refine' le_trans _ h1
rw [image_sub_const_Ioo, sub_self]
replace h := sub_pos_of_lt h
- have h2 : (#Inv.inv '' Ioo 0 (b - a)) β€ (#Ioo 0 (b - a)) := mk_image_le
+ have h2 : #(Inv.inv '' Ioo 0 (b - a)) β€ #(Ioo 0 (b - a)) := mk_image_le
refine' le_trans _ h2
rw [image_inv, inv_Ioo_0_left h, mk_Ioi_real]
#align cardinal.mk_Ioo_real Cardinal.mk_Ioo_real
/-- The cardinality of the interval [a, b). -/
-theorem mk_Ico_real {a b : β} (h : a < b) : (#Ico a b) = π :=
+theorem mk_Ico_real {a b : β} (h : a < b) : #(Ico a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ico_self)
#align cardinal.mk_Ico_real Cardinal.mk_Ico_real
/-- The cardinality of the interval [a, b]. -/
-theorem mk_Icc_real {a b : β} (h : a < b) : (#Icc a b) = π :=
+theorem mk_Icc_real {a b : β} (h : a < b) : #(Icc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Icc_self)
#align cardinal.mk_Icc_real Cardinal.mk_Icc_real
/-- The cardinality of the interval (a, b]. -/
-theorem mk_Ioc_real {a b : β} (h : a < b) : (#Ioc a b) = π :=
+theorem mk_Ioc_real {a b : β} (h : a < b) : #(Ioc a b) = π :=
le_antisymm (mk_real βΈ mk_set_le _) (mk_Ioo_real h βΈ mk_le_mk_of_subset Ioo_subset_Ioc_self)
#align cardinal.mk_Ioc_real Cardinal.mk_Ioc_real
The unported dependencies are
algebra.order.module
init.core
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
init.data.list.default
algebra.order.monoid.cancel.basic
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file