Built with Alectryon, running Lean4 v4.13.0. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+πŸ–±οΈ to focus. On Mac, use ⌘ instead of Ctrl.
/-
 - Created in 2024 by GaΓ«tan SerrΓ©
 -/

/-
- https://github.com/gaetanserre/Hirsch-Analysis
-/


import Mathlib.Analysis.Normed.Field.Lemmas
import Mathlib.Data.Nat.Factorization.Defs
import Mathlib.NumberTheory.Padics.PadicVal.Basic

open Set Filter Topology Classical

set_option trace.Meta.Tactic.simp.rewrite true

set_option maxHeartbeats 1000000

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y)

----------------------------------COUNTABLE-----------------------------------

/--
A set E is countable if it exists a surjection from β„• to E.
-/
def countable {u : Type} (E : Set u) := βˆƒ (f : β„• β†’ u), SurjOn f (univ) E

/--
β„• is countable.
-/
lemma N_countable : countable (univ : Set β„•) := 

Goals accomplished! πŸ™

countable univ

h
SurjOn (fun n => n) univ univ

countable univ
n: β„•
n_in: n ∈ univ

h
n ∈ (fun n => n) '' univ

countable univ

Goals accomplished! πŸ™
/-- β„€ is countable -/ lemma Z_countable : countable (univ : Set β„€) :=

Goals accomplished! πŸ™

countable univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

countable univ

countable univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

countable univ

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ

z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: Β¬0 < z
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: Β¬0 < z
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•

pos
z ∈ f '' univ

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•

pos
z ∈ f '' univ

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n

h
n ∈ univ ∧ f n = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n

h
f n = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n

h
f n = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n

h
f n = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n

h
(if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
[Meta.Tactic.simp.rewrite] dif_pos:1000, if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1 ==> -(↑n / 2) [Meta.Tactic.simp.rewrite] dif_neg:1000, if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1 ==> (↑n - 1) / 2 + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: Even n

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
(↑n - 1) / 2 + 1 = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: Even n

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
(↑n - 1) / 2 + 1 = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h_if: Even n

False
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h_if: Even n

-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h_if: Even n

False
Warning: `Nat.odd_iff_not_even` has been deprecated, use `Nat.not_even_iff_odd` instead
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h_if: Even n

False

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n

h.isFalse
(↑n - 1) / 2 + 1 = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n

↑n = 2 * (z - 1) + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n

↑n = 2 * (z - 1) + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n

↑n = 2 * (z - 1) + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe_tmp: ↑(z - 1).toNat = z - 1

↑n = 2 * (z - 1) + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n

↑n = 2 * (z - 1) + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe_tmp: ↑(z - 1).toNat = z - 1

↑n = 2 * (z - 1) + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe_tmp: ↑(z - 1).toNat = z - 1

↑n = 2 * ↑(z - 1).toNat + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe_tmp: ↑(z - 1).toNat = z - 1

↑n = 2 * ↑(z - 1).toNat + 1
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n

↑n = 2 * (z - 1) + 1

Goals accomplished! πŸ™

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

h.isFalse
(↑n - 1) / 2 + 1 = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

h.isFalse
(2 * (z - 1) + 1 - 1) / 2 + 1 = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

h.isFalse
(2 * (z - 1) + 1 - 1) / 2 + 1 = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z

pos
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

h.isFalse
(2 * (z - 1) + 1 - 1) / 2 + 1 = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

(2 * (z - 1) + 1 - 1) / 2 + 1 = 2 * (z - 1) / 2 + 1
[Meta.Tactic.simp.rewrite] add_sub_cancel_right:1000, 2 * (z - 1) + 1 - 1 ==> 2 * (z - 1) [Meta.Tactic.simp.rewrite] ne_eq:1000, 2 β‰  0 ==> Β¬2 = 0 [Meta.Tactic.simp.rewrite] OfNat.ofNat_ne_zero:1000, 2 = 0 ==> False [Meta.Tactic.simp.rewrite] not_false_eq_true:1000, Β¬False ==> True [Meta.Tactic.simp.rewrite] mul_div_cancel_leftβ‚€:1000, 2 * (z - 1) / 2 ==> z - 1 [Meta.Tactic.simp.rewrite] sub_add_cancel:1000, z - 1 + 1 ==> z [Meta.Tactic.simp.rewrite] ne_eq:1000, 2 β‰  0 ==> Β¬2 = 0 [Meta.Tactic.simp.rewrite] OfNat.ofNat_ne_zero:1000, 2 = 0 ==> False [Meta.Tactic.simp.rewrite] not_false_eq_true:1000, Β¬False ==> True [Meta.Tactic.simp.rewrite] mul_div_cancel_leftβ‚€:1000, 2 * (z - 1) / 2 ==> z - 1 [Meta.Tactic.simp.rewrite] sub_add_cancel:1000, z - 1 + 1 ==> z [Meta.Tactic.simp.rewrite] eq_self:1000, z = z ==> True

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

h.isFalse
(2 * (z - 1) + 1 - 1) / 2 + 1 = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

2 * (z - 1) / 2 + 1 = z - 1 + 1
[Meta.Tactic.simp.rewrite] ne_eq:1000, 2 β‰  0 ==> Β¬2 = 0 [Meta.Tactic.simp.rewrite] OfNat.ofNat_ne_zero:1000, 2 = 0 ==> False [Meta.Tactic.simp.rewrite] not_false_eq_true:1000, Β¬False ==> True [Meta.Tactic.simp.rewrite] mul_div_cancel_leftβ‚€:1000, 2 * (z - 1) / 2 ==> z - 1 [Meta.Tactic.simp.rewrite] sub_add_cancel:1000, z - 1 + 1 ==> z [Meta.Tactic.simp.rewrite] sub_add_cancel:1000, z - 1 + 1 ==> z [Meta.Tactic.simp.rewrite] eq_self:1000, z = z ==> True

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

h.isFalse
(2 * (z - 1) + 1 - 1) / 2 + 1 = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: 0 < z
n:= 2 * (z - 1).toNat + 1: β„•
odd_n: Odd n
h✝: ¬Even n
coe: ↑n = 2 * (z - 1) + 1

z - 1 + 1 = z
[Meta.Tactic.simp.rewrite] sub_add_cancel:1000, z - 1 + 1 ==> z [Meta.Tactic.simp.rewrite] eq_self:1000, z = z ==> True

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0

neg
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

neg
z ∈ f '' univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

neg
z ∈ f '' univ

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

Even n
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

Even n
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

Even n
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

βˆƒ r, n = r + r
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

Even n
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

h
n = (-z).toNat + (-z).toNat
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•

Even n

Goals accomplished! πŸ™

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n: Even n

h
n ∈ univ ∧ f n = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n: Even n

h
f n = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n: Even n

h
f n = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n: Even n

h
f n = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n: Even n

h
(if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
[Meta.Tactic.simp.rewrite] dif_pos:1000, if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1 ==> -(↑n / 2) [Meta.Tactic.simp.rewrite] dif_pos:1000, if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1 ==> -(↑n / 2)
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n: Even n
h✝: ¬Even n
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n: Even n
h✝: ¬Even n
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n

h.isTrue
-(↑n / 2) = z
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

h.isTrue
-(↑n / 2) = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

-(↑n / 2) = -(2 * ↑(-z).toNat / 2)
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

-(↑n / 2) = -(2 * ↑(-z).toNat / 2)
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

-(↑n / 2) = -(2 * ↑(-z).toNat / 2)

Goals accomplished! πŸ™

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

h.isTrue
-(↑n / 2) = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

-(2 * ↑(-z).toNat / 2) = -(2 * m_z / 2)
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

-(2 * ↑(-z).toNat / 2) = -(2 * m_z / 2)
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

-(2 * -z / 2) = -(2 * m_z / 2)

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

h.isTrue
-(↑n / 2) = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

-(2 * m_z / 2) = -m_z
[Meta.Tactic.simp.rewrite] ne_eq:1000, 2 β‰  0 ==> Β¬2 = 0 [Meta.Tactic.simp.rewrite] OfNat.ofNat_ne_zero:1000, 2 = 0 ==> False [Meta.Tactic.simp.rewrite] not_false_eq_true:1000, Β¬False ==> True [Meta.Tactic.simp.rewrite] mul_div_cancel_leftβ‚€:1000, 2 * m_z / 2 ==> m_z [Meta.Tactic.simp.rewrite] eq_self:1000, -m_z = -m_z ==> True

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

h.isTrue
-(↑n / 2) = z

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€
z: β„€
a✝: z ∈ univ
h: z ≀ 0
n:= 2 * (-z).toNat: β„•
even_n, h✝: Even n
coe: ↑(-z).toNat = -z
m_z:= -z: β„€

- -z = z
[Meta.Tactic.simp.rewrite] neg_neg:1000, - -z ==> z [Meta.Tactic.simp.rewrite] eq_self:1000, z = z ==> True

Goals accomplished! πŸ™
f:= fun n => if h : Even n then -(↑n / 2) else (↑n - 1) / 2 + 1: β„• β†’ β„€

SurjOn f univ univ

Goals accomplished! πŸ™

Goals accomplished! πŸ™

countable univ

Goals accomplished! πŸ™
/-- Let E a set. E is countable iff it exists a surjection from a countable set A to E. -/ lemma countable_trans {u : Type} {E : Set u} : countable E ↔ (βˆƒ (v : Type), βˆƒ (A : Set v), (countable A ∧ βˆƒ (f : v β†’ u), SurjOn f A E)) :=

Goals accomplished! πŸ™
u: Type
E: Set u

countable E ↔ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
(βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E) β†’ countable E
u: Type
E: Set u

countable E ↔ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
(βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E) β†’ countable E
u: Type
E: Set u
h_denomb: countable E

mp
βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
h_denomb: countable E

h
countable univ ∧ βˆƒ f, SurjOn f univ E
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
h_denomb: countable E

h.left
countable univ
u: Type
E: Set u
h_denomb: countable E
βˆƒ f, SurjOn f univ E
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
h_denomb: countable E

h.left
countable univ
u: Type
E: Set u
h_denomb: countable E

h.left
countable univ
u: Type
E: Set u
h_denomb: countable E
βˆƒ f, SurjOn f univ E

Goals accomplished! πŸ™
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
f: β„• β†’ u
f_surj: SurjOn f univ E

h.right.intro
βˆƒ f, SurjOn f univ E
u: Type
E: Set u

mp
countable E β†’ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E

Goals accomplished! πŸ™
u: Type
E: Set u

countable E ↔ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
h: βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E

mpr
countable E
u: Type
E: Set u

countable E ↔ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

mpr.intro.intro.intro.intro.intro
countable E
u: Type
E: Set u

countable E ↔ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

mpr.intro.intro.intro.intro.intro
countable E

Goals accomplished! πŸ™
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E
e: u
e_in_E: e ∈ E

e ∈ f ∘ g '' univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
e: u
e_in_E: e ∈ E
f_surj: e ∈ f '' A

e ∈ f ∘ g '' univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e

intro.intro
e ∈ f ∘ g '' univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
g_surj: a ∈ g '' univ

intro.intro
e ∈ f ∘ g '' univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

intro.intro.intro.intro
e ∈ f ∘ g '' univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h
n ∈ univ ∧ (f ∘ g) n = e
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h.left
n ∈ univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a
(f ∘ g) n = e
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h.left
n ∈ univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h.left
n ∈ univ
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a
(f ∘ g) n = e

Goals accomplished! πŸ™
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h.right
f (g n) = e
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
g_surj: SurjOn g univ A
f: v β†’ u
f_surj: SurjOn f A E

SurjOn (f ∘ g) univ E
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h.right
f (g n) = e
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h.right
f a = e
u: Type
E: Set u
v: Type
A: Set v
g: β„• β†’ v
f: v β†’ u
e: u
e_in_E: e ∈ E
a: v
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

h.right
f a = e

Goals accomplished! πŸ™
u: Type
E: Set u

countable E ↔ βˆƒ v A, countable A ∧ βˆƒ f, SurjOn f A E

Goals accomplished! πŸ™
/-- Let E be a countable set. Then any A βŠ† E is countable. -/ lemma subset_of_countable_set {u : Type} {E : Set u} (A : Set u) (h : A βŠ† E) (he : countable E) : countable A :=

Goals accomplished! πŸ™
u: Type
E, A: Set u
h: A βŠ† E
he: countable E

countable A
u: Type
E, A: Set u
h: A βŠ† E
he: countable E
f:= fun e => e: u β†’ u

countable A
u: Type
E, A: Set u
h: A βŠ† E
he: countable E

countable A
u: Type
E, A: Set u
h: A βŠ† E
he: countable E
f:= fun e => e: u β†’ u

countable A

Goals accomplished! πŸ™
u: Type
E, A: Set u
h: A βŠ† E
he: countable E
f:= fun e => e: u β†’ u

SurjOn f E A
u: Type
E, A: Set u
h: A βŠ† E
he: countable E
f:= fun e => e: u β†’ u

SurjOn f E A
u: Type
E, A: Set u
h: A βŠ† E
he: countable E
f:= fun e => e: u β†’ u

SurjOn f E A
u: Type
E, A: Set u
h: A βŠ† E
he: countable E
f:= fun e => e: u β†’ u
a: u
a_in_A: a ∈ A

a ∈ f '' E
u: Type
E, A: Set u
h: A βŠ† E
he: countable E
f:= fun e => e: u β†’ u

SurjOn f E A

Goals accomplished! πŸ™

Goals accomplished! πŸ™
u: Type
E, A: Set u
h: A βŠ† E
he: countable E

countable A

Goals accomplished! πŸ™
theorem prod_pow_primes_left {p q : β„•} [hp : Fact p.Prime] [hq : Fact q.Prime] (n m : β„•) (neq : p β‰  q) : padicValNat p (p^n * q^m) = n :=

Goals accomplished! πŸ™
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n * q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n * q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n) + padicValNat p (q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n) + padicValNat p (q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n * q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n) + padicValNat p (q ^ m) = n

Goals accomplished! πŸ™
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n) + padicValNat p (q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (q ^ m) = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

m * padicValNat p q = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (q ^ m) = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

m * 0 = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (q ^ m) = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

0 = 0

Goals accomplished! πŸ™
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q

padicValNat p (p ^ n * q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q
padic_p_qm_eq_0: padicValNat p (q ^ m) = 0

padicValNat p (p ^ n) + padicValNat p (q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q
padic_p_qm_eq_0: padicValNat p (q ^ m) = 0

n + padicValNat p (q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q
padic_p_qm_eq_0: padicValNat p (q ^ m) = 0

padicValNat p (p ^ n) + padicValNat p (q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q
padic_p_qm_eq_0: padicValNat p (q ^ m) = 0

n + 0 = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q
padic_p_qm_eq_0: padicValNat p (q ^ m) = 0

padicValNat p (p ^ n) + padicValNat p (q ^ m) = n
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: p β‰  q
padic_p_qm_eq_0: padicValNat p (q ^ m) = 0

n = n

Goals accomplished! πŸ™
theorem prod_pow_primes_right {p q : β„•} [hp : Fact p.Prime] [hq : Fact q.Prime] (n m : β„•) (neq : q β‰  p) : padicValNat q (p^n * q^m) = m :=

Goals accomplished! πŸ™
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n * q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n * q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n) + padicValNat q (q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n) + padicValNat q (q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n * q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n) + padicValNat q (q ^ m) = m

Goals accomplished! πŸ™
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n) + padicValNat q (q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n) = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

n * padicValNat q p = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n) = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

n * 0 = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n) = 0
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

0 = 0

Goals accomplished! πŸ™
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p

padicValNat q (p ^ n * q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p
padic_q_pn_eq_0: padicValNat q (p ^ n) = 0

padicValNat q (p ^ n) + padicValNat q (q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p
padic_q_pn_eq_0: padicValNat q (p ^ n) = 0

padicValNat q (p ^ n) + m = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p
padic_q_pn_eq_0: padicValNat q (p ^ n) = 0

padicValNat q (p ^ n) + padicValNat q (q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p
padic_q_pn_eq_0: padicValNat q (p ^ n) = 0

0 + m = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p
padic_q_pn_eq_0: padicValNat q (p ^ n) = 0

padicValNat q (p ^ n) + padicValNat q (q ^ m) = m
p, q: β„•
hp: Fact (Nat.Prime p)
hq: Fact (Nat.Prime q)
n, m: β„•
neq: q β‰  p
padic_q_pn_eq_0: padicValNat q (p ^ n) = 0

m = m

Goals accomplished! πŸ™
/-- β„•Β² is countable. -/ lemma N2_countable : countable (univ : Set (β„• Γ— β„•)) :=

Goals accomplished! πŸ™

countable univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•

countable univ

countable univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

countable univ

countable univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

countable univ

Goals accomplished! πŸ™
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ

x ∈ f '' A
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•

x ∈ f '' A
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•

h
n ∈ A ∧ f n = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A: n ∈ A

h
n ∈ A ∧ f n = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A: n ∈ A

h
f n = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A: n ∈ A

h
f n = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A: n ∈ A

h
f n = x

Goals accomplished! πŸ™
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A: n ∈ A

h
(if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0)) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
[Meta.Tactic.simp.rewrite] if_pos:1000, if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0) ==> (n.factorization 2, n.factorization 3) [Meta.Tactic.simp.rewrite] if_pos:1000, if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0) ==> (n.factorization 2, n.factorization 3)
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A: n ∈ A
h✝: n βˆ‰ A
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A: n ∈ A
h✝: n βˆ‰ A
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(n.factorization 2, n.factorization 3) = x

Goals accomplished! πŸ™
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(padicValNat 2 n, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(padicValNat 2 n, n.factorization 3) = x

Goals accomplished! πŸ™
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(padicValNat 2 n, padicValNat 3 n) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(n.factorization 2, n.factorization 3) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(padicValNat 2 n, padicValNat 3 n) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(padicValNat 2 n, padicValNat 3 n) = x
[Meta.Tactic.simp.rewrite] ne_eq:1000, 2 β‰  3 ==> Β¬2 = 3 [Meta.Tactic.simp.rewrite] not_false_eq_true:1000, Β¬False ==> True

Goals accomplished! πŸ™
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(x.1, padicValNat 3 n) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(padicValNat 2 n, padicValNat 3 n) = x
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(x.1, padicValNat 3 n) = x
[Meta.Tactic.simp.rewrite] ne_eq:1000, 3 β‰  2 ==> Β¬3 = 2 [Meta.Tactic.simp.rewrite] Nat.succ_ne_self:1000, 3 = 2 ==> False [Meta.Tactic.simp.rewrite] not_false_eq_true:1000, Β¬False ==> True

Goals accomplished! πŸ™
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•
x: β„• Γ— β„•
a✝: x ∈ univ
n:= 2 ^ x.1 * 3 ^ x.2: β„•
n_in_A, h✝: n ∈ A

h.isTrue
(x.1, x.2) = x

Goals accomplished! πŸ™
A:= {n | βˆƒ a b, n = 2 ^ a * 3 ^ b}: Set β„•
f:= fun n => if n ∈ A then (n.factorization 2, n.factorization 3) else (0, 0): β„• β†’ β„• Γ— β„•

SurjOn f A univ

Goals accomplished! πŸ™

Goals accomplished! πŸ™

countable univ

Goals accomplished! πŸ™
/-- We use a definition of a set being countable different to Mathlib's to match the book as much as possible. For completeness, we show that our definition is equivalent to Mathlib's. It corresponds to Corollary 1.5. -/ lemma countable_iff {u : Type} {E : Set u} (hE : Set.Nonempty E) : countable E ↔ Set.Countable E :=

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
E.Countable β†’ countable E
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
E.Countable β†’ countable E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
h: countable E

mp
E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

mp.intro
E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

mp.intro
E.Countable

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

βˆ€ e ∈ E, βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

βˆ€ e ∈ E, βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

βˆ€ e ∈ E, βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
e: u
e_in_E: e ∈ E

βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

βˆ€ e ∈ E, βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
e: u
e_in_E: e ∈ E
f_surj: e ∈ f '' univ

βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

βˆ€ e ∈ E, βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
e: u
e_in_E: e ∈ E
n: β„•
left✝: n ∈ univ
f_n: f n = e

intro.intro
βˆƒ n, f n = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E

βˆ€ e ∈ E, βˆƒ n, f n = e

Goals accomplished! πŸ™

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

mp.intro
E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

mp.intro
E.Countable

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

Function.Injective g
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

Function.Injective g
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

Function.Injective g
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

Function.Injective g

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
e: u
he: e ∈ E

f (g ⟨e, he⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
e: u
he: e ∈ E

f (g ⟨e, he⟩) = e

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
e: u
he: e ∈ E

f (g ⟨e, he⟩) = e

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
e: u
he: e ∈ E
h_g_e: g ⟨e, he⟩ = Nat.find β‹―
tmp: f (Nat.find β‹―) = e

f (g ⟨e, he⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
e: u
he: e ∈ E
h_g_e: g ⟨e, he⟩ = Nat.find β‹―
tmp: f (Nat.find β‹―) = e

f (g ⟨e, he⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
e: u
he: e ∈ E
h_g_e: g ⟨e, he⟩ = Nat.find β‹―
tmp: f (g ⟨e, he⟩) = e

f (g ⟨e, he⟩) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
e: u
he: e ∈ E
h_g_e: g ⟨e, he⟩ = Nat.find β‹―
tmp: f (g ⟨e, he⟩) = e

f (g ⟨e, he⟩) = e

Goals accomplished! πŸ™

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

Function.Injective g
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

e1 = e2
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

Function.Injective g
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

a
↑e1 = ↑e2
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•

Function.Injective g
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

a
↑e1 = ↑e2
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

a
f (g βŸ¨β†‘e1, β‹―βŸ©) = ↑e2
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

a
↑e1 = ↑e2
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

a
f (g βŸ¨β†‘e1, β‹―βŸ©) = f (g βŸ¨β†‘e2, β‹―βŸ©)
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

a
↑e1 = ↑e2
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: β„• β†’ u
f_surj: SurjOn f univ E
surj': βˆ€ e ∈ E, βˆƒ n, f n = e
g:= fun e => Nat.find β‹―: s_t β†’ β„•
f_g_id: βˆ€ (e : u) (h : e ∈ E), f (g ⟨e, h⟩) = e
e1, e2: s_t
hg: g e1 = g e2

a
f (g e2) = f (g βŸ¨β†‘e2, β‹―βŸ©)

Goals accomplished! πŸ™

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type

mp
countable E β†’ E.Countable

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
h: E.Countable

mpr
countable E
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f

mpr.mk.intro
countable E
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•

mpr.mk.intro
countable E
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE

mpr.mk.intro
countable E
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE

mpr.mk.intro
countable E

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE

βˆ€ n ∈ fE, {e | f e = n}.Nonempty
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE

βˆ€ n ∈ fE, {e | f e = n}.Nonempty
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE

βˆ€ n ∈ fE, {e | f e = n}.Nonempty
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
n: β„•
hn: n ∈ fE

{e | f e = n}.Nonempty
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE

βˆ€ n ∈ fE, {e | f e = n}.Nonempty
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
n: β„•
e: s_t
fe_n: f e = n

intro
{e | f e = n}.Nonempty
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE

βˆ€ n ∈ fE, {e | f e = n}.Nonempty

Goals accomplished! πŸ™

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E

mpr.mk.intro
countable E
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

mpr.mk.intro
countable E
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

mpr.mk.intro
countable E

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E

e ∈ f' '' fE
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t

e ∈ f' '' fE
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t

h
f e' ∈ fE ∧ f' (f e') = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t

h
f e' ∈ fE ∧ f' (f e') = e

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t

h
f e' ∈ fE ∧ f' (f e') = e

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE: f e' ∈ fE

h
f' (f e') = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE: f e' ∈ fE

h
f' (f e') = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE: f e' ∈ fE

h
f' (f e') = e

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE: f e' ∈ fE

h
(if h : f e' ∈ fE then ↑(Ο• (f e') h) else hE.some) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
[Meta.Tactic.simp.rewrite] dif_pos:1000, if h : f e' ∈ fE then ↑(Ο• (f e') h) else hE.some ==> ↑(Ο• (f e') h✝) [Meta.Tactic.simp.rewrite] dif_pos:1000, if h : f e' ∈ fE then ↑(Ο• (f e') h) else hE.some ==> ↑(Ο• (f e') fe'_in_fE)
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE: f e' ∈ fE
h✝: f e' βˆ‰ fE
↑(Ο• (f e') fe'_in_fE) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE: f e' ∈ fE
h✝: f e' βˆ‰ fE
↑(Ο• (f e') fe'_in_fE) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE
ff'e'_eq_fe': f (Ο• (f e') fe'_in_fE) = f e'

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE
ff'e'_eq_fe': f (Ο• (f e') fe'_in_fE) = f e'
f_inj: Ο• (f e') fe'_in_fE = e'

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE
ff'e'_eq_fe': f (Ο• (f e') fe'_in_fE) = f e'
f_inj: Ο• (f e') fe'_in_fE = e'
eq_subtype: βˆ€ {e1 e2 : s_t}, e1 = e2 β†’ ↑e1 = ↑e2

h.isTrue
↑(Ο• (f e') h✝) = e
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u
e: u
e_in_E: e ∈ E
e':= ⟨e, e_in_E⟩: s_t
fe'_in_fE, h✝: f e' ∈ fE

h.isTrue
↑(Ο• (f e') h✝) = e

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty
s_t:= { e // e ∈ E }: Type
f: ↑E β†’ β„•
f_inj: Function.Injective f
fE:= {n | βˆƒ e, f e = n}: Set β„•
fE_countable: countable fE
fE_dual_non_empty: βˆ€ n ∈ fE, {e | f e = n}.Nonempty
Ο•:= fun n h => β‹―.some: (n : β„•) β†’ n ∈ fE β†’ ↑E
f':= fun n => if h : n ∈ fE then ↑(Ο• n h) else hE.some: β„• β†’ u

SurjOn f' fE E

Goals accomplished! πŸ™

Goals accomplished! πŸ™
u: Type
E: Set u
hE: E.Nonempty

countable E ↔ E.Countable

Goals accomplished! πŸ™
/-- The product of two countable sets is countable. (Proposition 1.6 p.2) -/ lemma product_countable_set {u v : Type} {E : Set u} {A : Set v} (he : countable E) (ha : countable A) : countable {x : u Γ— v | x.1 ∈ E ∧ x.2 ∈ A} :=

Goals accomplished! πŸ™
u, v: Type
E: Set u
A: Set v
he: countable E
ha: countable A

countable {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
ha: countable A
fe: β„• β†’ u
fe_surj: SurjOn fe univ E

intro
countable {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
he: countable E
ha: countable A

countable {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A

intro.intro
countable {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
he: countable E
ha: countable A

countable {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

intro.intro
countable {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
he: countable E
ha: countable A

countable {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

intro.intro
countable {x | x.1 ∈ E ∧ x.2 ∈ A}

Goals accomplished! πŸ™
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A

x ∈ Ο• '' univ
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝: e ∈ univ
hfe: fe e = x.1

intro.intro
x ∈ Ο• '' univ
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

intro.intro.intro.intro
x ∈ Ο• '' univ
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
(e, a) ∈ univ ∧ Ο• (e, a) = x
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
Ο• (e, a) = x
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v

SurjOn Ο• univ {x | x.1 ∈ E ∧ x.2 ∈ A}
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
Ο• (e, a) = x
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
Ο• (e, a) = x

Goals accomplished! πŸ™
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
(fe e, fa a) = x
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
Ο• (e, a) = x
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
(x.1, fa a) = x
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
Ο• (e, a) = x
u, v: Type
E: Set u
A: Set v
fe: β„• β†’ u
fe_surj: SurjOn fe univ E
fa: β„• β†’ v
fa_surj: SurjOn fa univ A
Ο•:= fun x => (fe x.1, fa x.2): β„• Γ— β„• β†’ u Γ— v
x: u Γ— v
hx1: x.1 ∈ E
hx2: x.2 ∈ A
e: β„•
left✝¹: e ∈ univ
hfe: fe e = x.1
a: β„•
left✝: a ∈ univ
hfa: fa a = x.2

h
(x.1, x.2) = x

Goals accomplished! πŸ™

Goals accomplished! πŸ™
u, v: Type
E: Set u
A: Set v
he: countable E
ha: countable A

countable {x | x.1 ∈ E ∧ x.2 ∈ A}

Goals accomplished! πŸ™
/-- β„š is countable. (Example 1 p.3) -/ lemma Q_countable : countable (univ : Set β„š) :=

Goals accomplished! πŸ™

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)

countable univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

countable univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

countable univ

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ

q ∈ f '' A
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•

q ∈ f '' A
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•

h
x ∈ A ∧ f x = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•

h
f x = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•

h
f x = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•

h
f x = q

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•

h
(if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0) = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
[Meta.Tactic.simp.rewrite] dif_pos:1000, if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0 ==> { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } [Meta.Tactic.simp.rewrite] dif_neg:1000, if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0 ==> 0
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h✝: x ∈ A

h.isTrue
{ num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h✝: x βˆ‰ A
0 = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h✝: x ∈ A

h.isTrue
{ num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h✝: x ∈ A

h.isTrue
{ num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h✝: x βˆ‰ A
0 = q

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š

SurjOn f A univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h✝: x βˆ‰ A

h.isFalse
0 = q
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h_if: x βˆ‰ A

False
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
q: β„š
a✝: q ∈ univ
x:= (q.num, q.den): β„€ Γ— β„•
h_if: x βˆ‰ A

0 = q

Goals accomplished! πŸ™

Goals accomplished! πŸ™

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

countable univ

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

countable univ

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

{x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

{x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

{x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•

h
x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ} ↔ x ∈ univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

{x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•

h.mp
x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ} β†’ x ∈ univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•
x ∈ univ β†’ x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ}
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

{x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•

h.mp
x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ} β†’ x ∈ univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•

h.mp
x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ} β†’ x ∈ univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•
x ∈ univ β†’ x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ}
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•
a✝: x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ}

h.mp
x ∈ univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•

h.mp
x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ} β†’ x ∈ univ

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

{x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
x: β„€ Γ— β„•
a✝: x ∈ univ

h.mpr
x ∈ {x | x.1 ∈ univ ∧ x.2 ∈ univ}
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

{x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ

Goals accomplished! πŸ™

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
eq_set: {x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
univ_countable: countable {x | x.1 ∈ univ ∧ x.2 ∈ univ}

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
eq_set: {x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
univ_countable: countable {x | x.1 ∈ univ ∧ x.2 ∈ univ}

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
eq_set: {x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
univ_countable: countable univ

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
eq_set: {x | x.1 ∈ univ ∧ x.2 ∈ univ} = univ
univ_countable: countable univ

countable univ

Goals accomplished! πŸ™

Goals accomplished! πŸ™

countable univ
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
countable_prod: countable univ

countable univ

Goals accomplished! πŸ™
A:= {x | 0 < x.2 ∧ x.1.natAbs.Coprime x.2}: Set (β„€ Γ— β„•)
f:= fun x => if h : x ∈ A then { num := x.1, den := x.2, den_nz := β‹―, reduced := β‹― } else 0: β„€ Γ— β„• β†’ β„š
f_surj: SurjOn f A univ
countable_prod: countable univ
countable_A: countable A

countable univ

countable univ

Goals accomplished! πŸ™
/-- Let A and E two sets such that E is uncountable. If it exists a surjection from A to E, then A is uncountable. -/ lemma uncountable_trans {u v : Type} (A : Set u) {E : Set v} (h : Β¬countable E) : (βˆƒ (f : u β†’ v), SurjOn f A E) β†’ Β¬countable A :=

Goals accomplished! πŸ™
u, v: Type
A: Set u
E: Set v
h: Β¬countable E

(βˆƒ f, SurjOn f A E) β†’ Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
exists_surj: βˆƒ f, SurjOn f A E

Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E

(βˆƒ f, SurjOn f A E) β†’ Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E

intro
Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E

(βˆƒ f, SurjOn f A E) β†’ Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
h_countable: countable A

intro
False
u, v: Type
A: Set u
E: Set v
h: Β¬countable E

(βˆƒ f, SurjOn f A E) β†’ Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

intro.intro
False
u, v: Type
A: Set u
E: Set v
h: Β¬countable E

(βˆƒ f, SurjOn f A E) β†’ Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

intro.intro
False

Goals accomplished! πŸ™
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

SurjOn (f ∘ g) univ E
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

SurjOn (f ∘ g) univ E
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

SurjOn (f ∘ g) univ E
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E

e ∈ f ∘ g '' univ
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

SurjOn (f ∘ g) univ E
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e

intro.intro
e ∈ f ∘ g '' univ
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

SurjOn (f ∘ g) univ E
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

intro.intro.intro.intro
e ∈ f ∘ g '' univ
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

SurjOn (f ∘ g) univ E
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

right
(f ∘ g) n = e
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A

SurjOn (f ∘ g) univ E
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

right
(f ∘ g) n = e
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

right
(f ∘ g) n = e

Goals accomplished! πŸ™
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

right
f (g n) = e
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

right
(f ∘ g) n = e
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

right
f a = e
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
e: v
e_in_E: e ∈ E
a: u
a_in_A: a ∈ A
fa: f a = e
n: β„•
n_in_N: n ∈ univ
gn: g n = a

right
f a = e

Goals accomplished! πŸ™
u, v: Type
A: Set u
E: Set v
h: Β¬countable E

(βˆƒ f, SurjOn f A E) β†’ Β¬countable A
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
fg_surj_N_E: SurjOn (f ∘ g) univ E

intro.intro
False

Goals accomplished! πŸ™
u, v: Type
A: Set u
E: Set v
h: Β¬countable E
f: u β†’ v
f_surj: SurjOn f A E
g: β„• β†’ u
g_surj: SurjOn g univ A
fg_surj_N_E: SurjOn (f ∘ g) univ E

intro.intro
False

Goals accomplished! πŸ™
u, v: Type
A: Set u
E: Set v
h: Β¬countable E

(βˆƒ f, SurjOn f A E) β†’ Β¬countable A

Goals accomplished! πŸ™
/-- Corrolary: if A βŠ† E is uncountable, then E is uncountable. -/ lemma subset_of_uncountable_set {u : Type} {E A : Set u} (h : A βŠ† E) (uncountable : Β¬ countable A) : Β¬ countable E :=

Goals accomplished! πŸ™
u: Type
E, A: Set u
h: A βŠ† E
uncountable: Β¬countable A

Β¬countable E
u: Type
E, A: Set u
h: A βŠ† E
uncountable: Β¬countable A
h_contr: countable E

False
u: Type
E, A: Set u
h: A βŠ† E
uncountable: Β¬countable A

Β¬countable E
u: Type
E, A: Set u
h: A βŠ† E
uncountable: Β¬countable A
h_contr: countable E
f:= fun e => e: u β†’ u

False
u: Type
E, A: Set u
h: A βŠ† E
uncountable: Β¬countable A

Β¬countable E
u: Type
E, A: Set u
h: A βŠ† E
uncountable: Β¬countable A
h_contr: countable E
f:= fun e => e: u β†’ u
f_surj: SurjOn f E A

False
u: Type
E, A: Set u
h: A βŠ† E
uncountable: Β¬countable A

Β¬countable E

Goals accomplished! πŸ™
------------------------------FORMALIZATION----------------------------------- /-- The power set of β„• is uncountable. (Example 4 p.3) -/ lemma powerset_N_uncountable : Β¬countable (𝒫 (univ : Set β„•)) :=

Goals accomplished! πŸ™

Β¬countable (𝒫 univ)
h: countable (𝒫 univ)

False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
h: SurjOn Ο• univ (𝒫 univ)

intro
False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
h: SurjOn Ο• univ (𝒫 univ)
A:= {n | n βˆ‰ Ο• n}: Set β„•

intro
False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
h: A ∈ Ο• '' univ

intro
False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A

intro.intro.intro
False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: Β¬a βˆ‰ A
False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: Β¬a βˆ‰ A
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A
a_in_phi: Β¬a βˆ‰ Ο• a

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A
a_in_phi: a ∈ Ο• a

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A
a_in_phi: a ∈ Ο• a

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A
a_in_phi: a ∈ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A
a_in_phi: a ∈ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A
a_in_phi: a ∈ A

pos
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a βˆ‰ A

pos
False

Goals accomplished! πŸ™

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a ∈ A

neg
False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a ∈ A
a_notin_phi_a: a βˆ‰ Ο• a

neg
False

Β¬countable (𝒫 univ)
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a ∈ A
a_notin_phi_a: a βˆ‰ Ο• a

neg
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a ∈ A
a_notin_phi_a: a βˆ‰ A

neg
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a ∈ A
a_notin_phi_a: a βˆ‰ A

neg
False
Ο•: β„• β†’ Set β„•
A:= {n | n βˆ‰ Ο• n}: Set β„•
a: β„•
left✝: a ∈ univ
ha: Ο• a = A
ain: a ∈ A
a_notin_phi_a: a βˆ‰ A

neg
False

Β¬countable (𝒫 univ)

Goals accomplished! πŸ™
/- - The set of all sequences in {0, 1} -/ def zero_one := {u: β„• β†’ β„• | βˆ€n, u n = 0 ∨ u n = 1} /-- The set of all sequences in {0, 1} is uncountable. (Example 5 p.3) -/ lemma zero_one_uncountable : Β¬countable zero_one :=

Goals accomplished! πŸ™

Β¬countable zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

Β¬countable zero_one

Β¬countable zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

Β¬countable zero_one

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ

A ∈ f '' zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

A ∈ f '' zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

h
Ο• ∈ zero_one ∧ f Ο• = A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

h
Ο• ∈ zero_one ∧ f Ο• = A

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•

Ο• n = 0 ∨ Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

pos
Ο• n = 0 ∨ Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A
Ο• n = 0 ∨ Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

pos
Ο• n = 0 ∨ Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

pos
Ο• n = 0 ∨ Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A
Ο• n = 0 ∨ Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

pos
Ο• n = 0 ∨ Ο• n = 1

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

n βˆ‰ A β†’ 1 = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

n βˆ‰ A β†’ 1 = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

Ο• n = 1

Goals accomplished! πŸ™

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

pos
Ο• n = 0 ∨ Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A
ind_eq_1: Ο• n = 1

pos.h
Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A
ind_eq_1: Ο• n = 1

pos.h
Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n ∈ A

pos
Ο• n = 0 ∨ Ο• n = 1

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

neg
Ο• n = 0 ∨ Ο• n = 1

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

Ο• n = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

Ο• n = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

Ο• n = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

Ο• n = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

n ∈ A β†’ 1 = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

n ∈ A β†’ 1 = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A

Ο• n = 0

Goals accomplished! πŸ™

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A
ind_eq_0: Ο• n = 0

neg.h
Ο• n = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
n: β„•
h: n βˆ‰ A
ind_eq_0: Ο• n = 0

neg.h
Ο• n = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•

Ο• ∈ zero_one

Goals accomplished! πŸ™

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one

h
f Ο• = A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h
n ∈ f Ο• ↔ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n ∈ A β†’ n ∈ f Ο•
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n ∈ A β†’ n ∈ f Ο•
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•

h.h.mp
n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•
Ο•n_eq_1: Ο• n = 1

h.h.mp
n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•
Ο•n_eq_1: Ο• n = 1

h.h.mp
n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•
Ο•n_eq_1: n βˆ‰ A β†’ 1 = 0

h.h.mp
n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•
Ο•n_eq_1: n βˆ‰ A β†’ 1 = 0

h.h.mp
n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•
Ο•n_eq_1: n βˆ‰ A β†’ 1 = 0

h.h.mp
n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•
Ο•n_eq_1: n βˆ‰ A β†’ 1 = 0
n_notin_A: ¬n ∈ A

h.h.mp
False
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_f_Ο•: n ∈ f Ο•
n_notin_A: ¬n ∈ A
Ο•n_eq_1: 1 = 0

h.h.mp
False
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•

h.h.mp
n ∈ f Ο• β†’ n ∈ A

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

h.h.mpr
n ∈ f Ο•
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

h.h.mpr
n ∈ f Ο•

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

n βˆ‰ A β†’ 1 = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

n βˆ‰ A β†’ 1 = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

Ο• n = 1
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A
n_notin_A: n βˆ‰ A

1 = 0
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•
A: Set β„•
a✝: A ∈ 𝒫 univ
Ο•:= A.indicator fun x => 1: β„• β†’ β„•
Ο•_in_zero_one: Ο• ∈ zero_one
n: β„•
n_in_A: n ∈ A

Ο• n = 1

Goals accomplished! πŸ™

Goals accomplished! πŸ™
f:= fun Ο• => {n | Ο• n = 1}: (β„• β†’ β„•) β†’ Set β„•

SurjOn f zero_one (𝒫 univ)

Goals accomplished! πŸ™

Goals accomplished! πŸ™

Β¬countable zero_one

Goals accomplished! πŸ™
/-- The set of all sequences to β„• is uncountable. -/ example : Β¬ countable (univ : Set (β„• β†’ β„•)) := subset_of_uncountable_set (Ξ» _ _ ↦ trivial) zero_one_uncountable /-- For any real number x and any positive number Ξ΅, it exists a rational q such that |x - q| < Ξ΅. -/ lemma Q_dense (x : ℝ) : βˆ€ Ξ΅ > 0, βˆƒ (q : β„š), |x - q| < Ξ΅ :=

Goals accomplished! πŸ™
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ q, |x - ↑q| < Ξ΅
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ q, |x - ↑q| < Ξ΅

Goals accomplished! πŸ™
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ q, |x - ↑q| < Ξ΅

Goals accomplished! πŸ™
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

intro.intro
βˆƒ q, |x - ↑q| < Ξ΅
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

h
|x - ↑q| < Ξ΅
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

h
|x - ↑q| < Ξ΅
Warning: unused variable `x_minus_q_neg` note: this linter can be disabled with `set_option linter.unusedVariables false`
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

h
|x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

h
|x - ↑q| < Ξ΅

Goals accomplished! πŸ™
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

h
|x - ↑q| < Ξ΅

Goals accomplished! πŸ™
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

h
|x - ↑q| < Ξ΅

Goals accomplished! πŸ™
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

|x - ↑q| = -(x - ↑q)
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

|x - ↑q| = -(x - ↑q)
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

|x - ↑q| = -(x - ↑q)
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

|x - ↑q| = -(x - ↑q)
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

x - ↑q ≀ 0
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

x - ↑q ≀ 0
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0

|x - ↑q| = -(x - ↑q)

Goals accomplished! πŸ™

Goals accomplished! πŸ™
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0
abs_eq_neg: |x - ↑q| = -(x - ↑q)

h
|x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0
abs_eq_neg: |x - ↑q| = -(x - ↑q)

h
-(x - ↑q) < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0
abs_eq_neg: |x - ↑q| = -(x - ↑q)

h
|x - ↑q| < Ξ΅
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0
abs_eq_neg: |x - ↑q| = -(x - ↑q)

h
-(x - ↑q) < Ξ΅

Goals accomplished! πŸ™
x, Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
h: x < x + Ξ΅
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
x_minus_q_neg: x - ↑q < 0
abs_eq_neg: |x - ↑q| = -(x - ↑q)

h
↑q - x < Ξ΅
x: ℝ

βˆ€ Ξ΅ > 0, βˆƒ q, |x - ↑q| < Ξ΅

Goals accomplished! πŸ™
/-- For any real number x, it exists a sequence of rational that tends to x. -/ example (x : ℝ) : βˆƒ (u : β„• β†’ β„š), Tendsto (Ξ» n ↦ ((u n) : ℝ)) atTop (𝓝 x) :=

Goals accomplished! πŸ™
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)

Goals accomplished! πŸ™
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š

βˆ€ (n : β„•), (A n).Nonempty
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š

βˆ€ (n : β„•), (A n).Nonempty
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š

βˆ€ (n : β„•), (A n).Nonempty
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
n: β„•

(A n).Nonempty
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š

βˆ€ (n : β„•), (A n).Nonempty
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
n: β„•
q: β„š
hq: |x - ↑q| < 1 / (↑n + 1)

intro
(A n).Nonempty
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š

βˆ€ (n : β„•), (A n).Nonempty

Goals accomplished! πŸ™

Goals accomplished! πŸ™
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š

h
Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š

h
Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š

h
βˆ€ Ξ΅ > 0, βˆƒ N, βˆ€ n > N, dist (↑(u n)) x < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š

h
βˆ€ Ξ΅ > 0, βˆƒ N, βˆ€ n > N, dist (↑(u n)) x < Ξ΅
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|

h
βˆ€ Ξ΅ > 0, βˆƒ N, βˆ€ n > N, dist (↑(u n)) x < Ξ΅
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|

h
βˆ€ Ξ΅ > 0, βˆƒ N, βˆ€ n > N, dist (↑(u n)) x < Ξ΅
[Meta.Tactic.simp.rewrite] dst:1000, dist (↑(u n)) x ==> |x - ↑(u n)|
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|

h
βˆ€ Ξ΅ > 0, βˆƒ N, βˆ€ n > N, |x - ↑(u n)| < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|

h
βˆ€ Ξ΅ > 0, βˆƒ N, βˆ€ n > N, |x - ↑(u n)| < Ξ΅
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

h
βˆƒ N, βˆ€ n > N, |x - ↑(u n)| < Ξ΅
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

h
βˆƒ N, βˆ€ n > N, |x - ↑(u n)| < Ξ΅

Goals accomplished! πŸ™
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ N, 1 / (↑N + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ N, 1 / (↑N + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ N, 1 / (↑N + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

h
1 / (β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ N, 1 / (↑N + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
1 / (β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ N, 1 / (↑N + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
1 / (β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
1 / (β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1) < Ξ΅

Goals accomplished! πŸ™
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
(β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1)⁻¹ < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ N, 1 / (↑N + 1) < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
(β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1)⁻¹ < Ξ΅
Warning: `inv_lt` has been deprecated, use `inv_lt_commβ‚€` instead
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
(β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1)⁻¹ < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
Ρ⁻¹ < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
(β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1)⁻¹ < Ξ΅
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
Ρ⁻¹ < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

Goals accomplished! πŸ™
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
R_pos: 0 < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1

h
1 / Ξ΅ < β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š + 1
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0

βˆƒ N, 1 / (↑N + 1) < Ξ΅

Goals accomplished! πŸ™

Goals accomplished! πŸ™
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
N: β„•
hn: 1 / (↑N + 1) < Ξ΅

h
βˆ€ n > N, |x - ↑(u n)| < Ξ΅
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
x: ℝ
A:= fun n => {q | |x - ↑q| < 1 / (↑n + 1)}: β„• β†’ Set β„š
non_empty: βˆ€ (n : β„•), (A n).Nonempty
u:= fun n => β‹―.some: β„• β†’ β„š
dst: βˆ€ (n : β„•), dist (↑(u n)) x = |x - ↑(u n)|
Ξ΅: ℝ
Ξ΅_pos: Ξ΅ > 0
N: β„•
hn: 1 / (↑N + 1) < Ξ΅
n: β„•
N_ltn: n > N

h
|x - ↑(u n)| < Ξ΅
x: ℝ

βˆƒ u, Tendsto (fun n => ↑(u n)) atTop (𝓝 x)

Goals accomplished! πŸ™
/-- Let A be a family of disjoint, non-empty, open sets of ℝ. Then A is countable. (Example 9 p.4) -/ example (A : NNReal β†’ Set ℝ) (h_nonempty : βˆ€ t, Set.Nonempty (A t)) (h_open : βˆ€ t, IsOpen (A t)) (h_disjoint : βˆ€ t1 t2, t1 β‰  t2 β†’ Disjoint (A t1) (A t2)) : countable {A t | t : NNReal} :=

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

countable {x | βˆƒ t, A t = x}

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal

(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t

intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: IsOpen (A t)

intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: IsOpen (A t)

intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t

intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t

intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t

intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t

intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t

intro.intro.intro
(q_A_t t).Nonempty

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

intro.intro.intro.intro.intro
(q_A_t t).Nonempty

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅

intro.intro.intro.intro.intro
(q_A_t t).Nonempty

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q - x < Ξ΅

intro.intro.intro.intro.intro
(q_A_t t).Nonempty

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q - x < Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q - x < Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: |↑q - x| < Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q - x < Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: |↑q - x| < Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: dist (↑q) x < Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q - x < Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q ∈ Metric.ball x Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q ∈ Metric.ball x Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
t: NNReal
x: ℝ
hx: x ∈ A t
h_open: βˆ€ x ∈ A t, βˆƒ Ξ΅ > 0, Metric.ball x Ξ΅ βŠ† A t
Ξ΅: ℝ
hΞ΅: Ξ΅ > 0
ball_in_At: Metric.ball x Ξ΅ βŠ† A t
q: β„š
hql: x < ↑q
hqr: ↑q < x + Ξ΅
q_dist: ↑q ∈ Metric.ball x Ξ΅
pos_abs: ↑q - x = |↑q - x|

intro.intro.intro.intro.intro
(q_A_t t).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š

βˆ€ (t : NNReal), (q_A_t t).Nonempty

Goals accomplished! πŸ™

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

countable {x | βˆƒ t, A t = x}

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
q: β„š
h: βˆƒ t, q ∈ q_A_t t

(q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
q: β„š
t: NNReal
hq: q ∈ q_A_t t

intro
(q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
q: β„š
t: NNReal
hq: q ∈ q_A_t t

h
A t = A t ∧ ↑q ∈ A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
q: β„š
t: NNReal
hq: q ∈ q_A_t t

h
↑q ∈ A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)

βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty

Goals accomplished! πŸ™

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

countable {x | βˆƒ t, A t = x}

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At

At ∈ f '' univ
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At

At ∈ f '' univ
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At

A t ∈ f '' univ
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At

A t ∈ f '' univ
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t

intro
A t ∈ f '' univ
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t

h
q ∈ univ ∧ f q = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t

h
f q = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t

h
f q = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t

h
f q = A t

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t

h
(if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0) = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
[Meta.Tactic.simp.rewrite] dif_pos:1000, if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0 ==> Ο• q h✝ [Meta.Tactic.simp.rewrite] dif_neg:1000, if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0 ==> A 0
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h✝: βˆƒ t, q ∈ q_A_t t

h.isTrue
Ο• q h✝ = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h✝: Β¬βˆƒ t, q ∈ q_A_t t
A 0 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h✝: βˆƒ t, q ∈ q_A_t t

h.isTrue
Ο• q h✝ = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h✝: Β¬βˆƒ t, q ∈ q_A_t t
A 0 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t

Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t

Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
rfl_Ο•: Ο• q h_if ∈ q_A q

Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t

Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

intro.intro
Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t

Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

intro.intro
Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

intro.intro
A t2 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

intro.intro
A t2 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t

Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

intro.intro
A t2 = A t

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
h_neg: Β¬A t = A t2

False
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
h_neg: Β¬A t = A t2

False
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
h_neg: A t β‰  A t2

False
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
h_neg: A t β‰  A t2
t_neq: t β‰  t2

False
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
h_neg: A t β‰  A t2
t_neq: t β‰  t2
disjoint: Disjoint (A t) (A t2)

False
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
h_neg: A t β‰  A t2
t_neq: t β‰  t2
disjoint: Disjoint (A t) (A t2)
q_not_in: ↑q βˆ‰ A t2

False
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2

A t = A t2

Goals accomplished! πŸ™

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t

Ο• q h_if = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
At_eq_At2: A t = A t2

intro.intro
A t2 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆƒ t, q ∈ q_A_t t
t2: NNReal
h_eq_t2: A t2 = Ο• q h_if
hq2: ↑q ∈ A t2
At_eq_At2: A t = A t2

intro.intro
A t2 = A t2

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ

SurjOn f univ {x | βˆƒ t, A t = x}
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h✝: Β¬βˆƒ t, q ∈ q_A_t t

h.isFalse
A 0 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: βˆ€ (t : NNReal), q βˆ‰ q_A_t t

A 0 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: Β¬βˆƒ t, q ∈ q_A_t t

A 0 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: q βˆ‰ q_A_t t

A 0 = A t
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)
q_A_t:= fun t => {q | ↑q ∈ A t}: NNReal β†’ Set β„š
nonempty_q_A_t: βˆ€ (t : NNReal), (q_A_t t).Nonempty
q_A:= fun q => {x | βˆƒ t, A t = x ∧ ↑q ∈ A t}: β„š β†’ Set (Set ℝ)
nonempty_q_A: βˆ€ (q : β„š), (βˆƒ t, q ∈ q_A_t t) β†’ (q_A q).Nonempty
Ο•:= fun q hq => β‹―.some: (q : β„š) β†’ (βˆƒ t, q ∈ q_A_t t) β†’ Set ℝ
f:= fun q => if h : βˆƒ t, q ∈ q_A_t t then Ο• q h else A 0: β„š β†’ Set ℝ
At: Set ℝ
t: NNReal
h: A t = At
q: β„š
hq: q ∈ q_A_t t
h_if: Β¬βˆƒ t, q ∈ q_A_t t

A 0 = A t

Goals accomplished! πŸ™

Goals accomplished! πŸ™
A: NNReal β†’ Set ℝ
h_nonempty: βˆ€ (t : NNReal), (A t).Nonempty
h_open: βˆ€ (t : NNReal), IsOpen (A t)
h_disjoint: βˆ€ (t1 t2 : NNReal), t1 β‰  t2 β†’ Disjoint (A t1) (A t2)

countable {x | βˆƒ t, A t = x}

Goals accomplished! πŸ™