[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
β : Type u_3
m : β → (i : ι) → α i
l : Filter β
⊢ Tendsto m l (pi f) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)
[PROOFSTEP]
simp only [pi, tendsto_iInf, tendsto_comap_iff]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
β : Type u_3
m : β → (i : ι) → α i
l : Filter β
⊢ (∀ (i : ι), Tendsto (eval i ∘ m) l (f i)) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)
[PROOFSTEP]
rfl
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
I : Set ι
hI : Set.Finite I
h : ∀ (i : ι), i ∈ I → s i ∈ f i
⊢ Set.pi I s ∈ pi f
[PROOFSTEP]
rw [pi_def, biInter_eq_iInter]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
I : Set ι
hI : Set.Finite I
h : ∀ (i : ι), i ∈ I → s i ∈ f i
⊢ ⋂ (x : ↑I), eval ↑x ⁻¹' s ↑x ∈ pi f
[PROOFSTEP]
refine' mem_iInf_of_iInter hI (fun i => _) Subset.rfl
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
I : Set ι
hI : Set.Finite I
h : ∀ (i : ι), i ∈ I → s i ∈ f i
i : ↑I
⊢ eval ↑i ⁻¹' s ↑i ∈ comap (eval ↑i) (f ↑i)
[PROOFSTEP]
exact preimage_mem_comap (h i i.2)
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
s : Set ((i : ι) → α i)
⊢ s ∈ pi f ↔ ∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ s
[PROOFSTEP]
constructor
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
s : Set ((i : ι) → α i)
⊢ s ∈ pi f → ∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ s
[PROOFSTEP]
simp only [pi, mem_iInf', mem_comap, pi_def]
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
s : Set ((i : ι) → α i)
⊢ (∃ I,
      Set.Finite I ∧
        ∃ V,
          (∀ (i : ι), ∃ t, t ∈ f i ∧ eval i ⁻¹' t ⊆ V i) ∧
            (∀ (i : ι), ¬i ∈ I → V i = univ) ∧ s = ⋂ (i : ι) (_ : i ∈ I), V i ∧ s = ⋂ (i : ι), V i) →
    ∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ ⋂ (a : ι) (_ : a ∈ I), eval a ⁻¹' t a ⊆ s
[PROOFSTEP]
rintro ⟨I, If, V, hVf, -, rfl, -⟩
[GOAL]
case mp.intro.intro.intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
I : Set ι
If : Set.Finite I
V : ι → Set ((i : ι) → α i)
hVf : ∀ (i : ι), ∃ t, t ∈ f i ∧ eval i ⁻¹' t ⊆ V i
⊢ ∃ I_1,
    Set.Finite I_1 ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ ⋂ (a : ι) (_ : a ∈ I_1), eval a ⁻¹' t a ⊆ ⋂ (i : ι) (_ : i ∈ I), V i
[PROOFSTEP]
choose t htf htV using hVf
[GOAL]
case mp.intro.intro.intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
I : Set ι
If : Set.Finite I
V : ι → Set ((i : ι) → α i)
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
htV : ∀ (i : ι), eval i ⁻¹' t i ⊆ V i
⊢ ∃ I_1,
    Set.Finite I_1 ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ ⋂ (a : ι) (_ : a ∈ I_1), eval a ⁻¹' t a ⊆ ⋂ (i : ι) (_ : i ∈ I), V i
[PROOFSTEP]
exact ⟨I, If, t, htf, iInter₂_mono fun i _ => htV i⟩
[GOAL]
case mpr
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
s : Set ((i : ι) → α i)
⊢ (∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ s) → s ∈ pi f
[PROOFSTEP]
rintro ⟨I, If, t, htf, hts⟩
[GOAL]
case mpr.intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
s : Set ((i : ι) → α i)
I : Set ι
If : Set.Finite I
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I t ⊆ s
⊢ s ∈ pi f
[PROOFSTEP]
exact mem_of_superset (pi_mem_pi If fun i _ => htf i) hts
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
⊢ s i ∈ f i
[PROOFSTEP]
rcases mem_pi.1 h with ⟨I', -, t, htf, hts⟩
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
⊢ s i ∈ f i
[PROOFSTEP]
refine' mem_of_superset (htf i) fun x hx => _
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
x : α i
hx : x ∈ t i
⊢ x ∈ s i
[PROOFSTEP]
have : ∀ i, (t i).Nonempty := fun i => nonempty_of_mem (htf i)
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
x : α i
hx : x ∈ t i
this : ∀ (i : ι), Set.Nonempty (t i)
⊢ x ∈ s i
[PROOFSTEP]
choose g hg using this
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
x : α i
hx : x ∈ t i
g : (i : ι) → α i
hg : ∀ (i : ι), g i ∈ t i
⊢ x ∈ s i
[PROOFSTEP]
have : update g i x ∈ I'.pi t := fun j _ => by rcases eq_or_ne j i with (rfl | hne) <;> simp [*]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
x : α i
hx : x ∈ t i
g : (i : ι) → α i
hg : ∀ (i : ι), g i ∈ t i
j : ι
x✝ : j ∈ I'
⊢ update g i x j ∈ t j
[PROOFSTEP]
rcases eq_or_ne j i with (rfl | hne)
[GOAL]
case inl
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
g : (i : ι) → α i
hg : ∀ (i : ι), g i ∈ t i
j : ι
x✝ : j ∈ I'
hi : j ∈ I
x : α j
hx : x ∈ t j
⊢ update g j x j ∈ t j
[PROOFSTEP]
simp [*]
[GOAL]
case inr
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
x : α i
hx : x ∈ t i
g : (i : ι) → α i
hg : ∀ (i : ι), g i ∈ t i
j : ι
x✝ : j ∈ I'
hne : j ≠ i
⊢ update g i x j ∈ t j
[PROOFSTEP]
simp [*]
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
h : Set.pi I s ∈ pi f
i : ι
hi : i ∈ I
I' : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I' t ⊆ Set.pi I s
x : α i
hx : x ∈ t i
g : (i : ι) → α i
hg : ∀ (i : ι), g i ∈ t i
this : update g i x ∈ Set.pi I' t
⊢ x ∈ s i
[PROOFSTEP]
simpa using hts this i hi
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
ι' : ι → Type
s : (i : ι) → ι' i → Set (α i)
p : (i : ι) → ι' i → Prop
h : ∀ (i : ι), HasBasis (f i) (p i) (s i)
⊢ HasBasis (pi f) (fun If => Set.Finite If.fst ∧ ∀ (i : ι), i ∈ If.fst → p i (Prod.snd If i)) fun If =>
    Set.pi If.fst fun i => s i (Prod.snd If i)
[PROOFSTEP]
simpa [Set.pi_def] using hasBasis_iInf' fun i => (h i).comap (eval i : (∀ j, α j) → α i)
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ pi f ⊓ 𝓟 (Set.pi univ s) = ⊥ ↔ ∃ i, f i ⊓ 𝓟 (s i) = ⊥
[PROOFSTEP]
constructor
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ pi f ⊓ 𝓟 (Set.pi univ s) = ⊥ → ∃ i, f i ⊓ 𝓟 (s i) = ⊥
[PROOFSTEP]
simp only [inf_principal_eq_bot, mem_pi]
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ (Set.pi univ s)ᶜ) → ∃ i, (s i)ᶜ ∈ f i
[PROOFSTEP]
contrapose!
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∀ (i : ι), ¬(s i)ᶜ ∈ f i) →
    ∀ (I : Set ι), Set.Finite I → ∀ (t : (i : ι) → Set (α i)), (∀ (i : ι), t i ∈ f i) → ¬Set.pi I t ⊆ (Set.pi univ s)ᶜ
[PROOFSTEP]
rintro (hsf : ∀ i, ∃ᶠ x in f i, x ∈ s i) I - t htf hts
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
hsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i
I : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I t ⊆ (Set.pi univ s)ᶜ
⊢ False
[PROOFSTEP]
have : ∀ i, (s i ∩ t i).Nonempty := fun i => ((hsf i).and_eventually (htf i)).exists
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
hsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i
I : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I t ⊆ (Set.pi univ s)ᶜ
this : ∀ (i : ι), Set.Nonempty (s i ∩ t i)
⊢ False
[PROOFSTEP]
choose x hxs hxt using this
[GOAL]
case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
hsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i
I : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I t ⊆ (Set.pi univ s)ᶜ
x : (i : ι) → α i
hxs : ∀ (i : ι), x i ∈ s i
hxt : ∀ (i : ι), x i ∈ t i
⊢ False
[PROOFSTEP]
exact hts (fun i _ => hxt i) (mem_univ_pi.2 hxs)
[GOAL]
case mpr
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∃ i, f i ⊓ 𝓟 (s i) = ⊥) → pi f ⊓ 𝓟 (Set.pi univ s) = ⊥
[PROOFSTEP]
simp only [inf_principal_eq_bot]
[GOAL]
case mpr
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∃ i, (s i)ᶜ ∈ f i) → (Set.pi univ s)ᶜ ∈ pi f
[PROOFSTEP]
rintro ⟨i, hi⟩
[GOAL]
case mpr.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
i : ι
hi : (s i)ᶜ ∈ f i
⊢ (Set.pi univ s)ᶜ ∈ pi f
[PROOFSTEP]
filter_upwards [mem_pi_of_mem i hi] with x using mt fun h => h i trivial
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
⊢ pi f ⊓ 𝓟 (Set.pi I s) = ⊥ ↔ ∃ i, i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥
[PROOFSTEP]
rw [← univ_pi_piecewise_univ I, pi_inf_principal_univ_pi_eq_bot]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
⊢ (∃ i, f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥) ↔ ∃ i, i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥
[PROOFSTEP]
refine' exists_congr fun i => _
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
i : ι
⊢ f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥ ↔ i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥
[PROOFSTEP]
by_cases hi : i ∈ I
[GOAL]
case pos
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
i : ι
hi : i ∈ I
⊢ f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥ ↔ i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥
[PROOFSTEP]
simp [hi, NeBot.ne']
[GOAL]
case neg
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
i : ι
hi : ¬i ∈ I
⊢ f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥ ↔ i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥
[PROOFSTEP]
simp [hi, NeBot.ne']
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ NeBot (pi f ⊓ 𝓟 (Set.pi univ s)) ↔ ∀ (i : ι), NeBot (f i ⊓ 𝓟 (s i))
[PROOFSTEP]
simp [neBot_iff]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
I : Set ι
⊢ NeBot (pi f ⊓ 𝓟 (Set.pi I s)) ↔ ∀ (i : ι), i ∈ I → NeBot (f i ⊓ 𝓟 (s i))
[PROOFSTEP]
simp [neBot_iff]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ pi f = ⊥ ↔ ∃ i, f i = ⊥
[PROOFSTEP]
simpa using @pi_inf_principal_univ_pi_eq_bot ι α f fun _ => univ
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ NeBot (pi f) ↔ ∀ (i : ι), NeBot (f i)
[PROOFSTEP]
simp [neBot_iff]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f✝ f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
f : (i : ι) → Filter (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
i : ι
⊢ map (eval i) (pi f) = f i
[PROOFSTEP]
refine' le_antisymm (tendsto_eval_pi f i) fun s hs => _
[GOAL]
ι : Type u_1
α : ι → Type u_2
f✝ f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
f : (i : ι) → Filter (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
i : ι
s : Set (α i)
hs : s ∈ map (eval i) (pi f)
⊢ s ∈ f i
[PROOFSTEP]
rcases mem_pi.1 (mem_map.1 hs) with ⟨I, hIf, t, htf, hI⟩
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f✝ f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
f : (i : ι) → Filter (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
i : ι
s : Set (α i)
hs : s ∈ map (eval i) (pi f)
I : Set ι
hIf : Set.Finite I
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hI : Set.pi I t ⊆ eval i ⁻¹' s
⊢ s ∈ f i
[PROOFSTEP]
rw [← image_subset_iff] at hI
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f✝ f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
f : (i : ι) → Filter (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
i : ι
s : Set (α i)
hs : s ∈ map (eval i) (pi f)
I : Set ι
hIf : Set.Finite I
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hI : eval i '' Set.pi I t ⊆ s
⊢ s ∈ f i
[PROOFSTEP]
refine' mem_of_superset (htf i) ((subset_eval_image_pi _ _).trans hI)
[GOAL]
case intro.intro.intro.intro
ι : Type u_1
α : ι → Type u_2
f✝ f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
f : (i : ι) → Filter (α i)
inst✝ : ∀ (i : ι), NeBot (f i)
i : ι
s : Set (α i)
hs : s ∈ map (eval i) (pi f)
I : Set ι
hIf : Set.Finite I
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hI : eval i '' Set.pi I t ⊆ s
⊢ Set.Nonempty (Set.pi I t)
[PROOFSTEP]
exact nonempty_of_mem (pi_mem_pi hIf fun i _ => htf i)
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f₁ i)
⊢ pi f₁ = pi f₂ ↔ f₁ = f₂
[PROOFSTEP]
refine' ⟨fun h => _, congr_arg pi⟩
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f₁ i)
h : pi f₁ = pi f₂
⊢ f₁ = f₂
[PROOFSTEP]
have hle : f₁ ≤ f₂ := pi_le_pi.1 h.le
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f₁ i)
h : pi f₁ = pi f₂
hle : f₁ ≤ f₂
⊢ f₁ = f₂
[PROOFSTEP]
haveI : ∀ i, NeBot (f₂ i) := fun i => neBot_of_le (hle i)
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), NeBot (f₁ i)
h : pi f₁ = pi f₂
hle : f₁ ≤ f₂
this : ∀ (i : ι), NeBot (f₂ i)
⊢ f₁ = f₂
[PROOFSTEP]
exact hle.antisymm (pi_le_pi.1 h.ge)
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
s : Set ((i : ι) → α i)
⊢ s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ s
[PROOFSTEP]
simp [Filter.coprodᵢ]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
s : Set ((i : ι) → α i)
⊢ sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i
[PROOFSTEP]
simp only [Filter.coprodᵢ, mem_iSup, compl_mem_comap]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ NeBot (Filter.coprodᵢ f) ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, NeBot (f d)
[PROOFSTEP]
simp only [Filter.coprodᵢ, iSup_neBot, ← exists_and_left, ← comap_eval_neBot_iff']
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), Nonempty (α i)
⊢ NeBot (Filter.coprodᵢ f) ↔ ∃ d, NeBot (f d)
[PROOFSTEP]
simp [coprodᵢ_neBot_iff', *]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ Filter.coprodᵢ f = ⊥ ↔ (∃ i, IsEmpty (α i)) ∨ f = ⊥
[PROOFSTEP]
simpa only [not_neBot, not_and_or, funext_iff, not_forall, not_exists, not_nonempty_iff] using coprodᵢ_neBot_iff'.not
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), Nonempty (α i)
⊢ Filter.coprodᵢ f = ⊥ ↔ f = ⊥
[PROOFSTEP]
simpa [funext_iff] using coprodᵢ_neBot_iff.not
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
β : ι → Type u_3
m : (i : ι) → α i → β i
⊢ map (fun k i => m i (k i)) (Filter.coprodᵢ f) ≤ Filter.coprodᵢ fun i => map (m i) (f i)
[PROOFSTEP]
simp only [le_def, mem_map, mem_coprodᵢ_iff]
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
β : ι → Type u_3
m : (i : ι) → α i → β i
⊢ ∀ (x : Set ((i : ι) → β i)),
    (∀ (i : ι), ∃ t₁, m i ⁻¹' t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ x) →
      ∀ (i : ι), ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ (fun k i => m i (k i)) ⁻¹' x
[PROOFSTEP]
intro s h i
[GOAL]
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
β : ι → Type u_3
m : (i : ι) → α i → β i
s : Set ((i : ι) → β i)
h : ∀ (i : ι), ∃ t₁, m i ⁻¹' t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ s
i : ι
⊢ ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ (fun k i => m i (k i)) ⁻¹' s
[PROOFSTEP]
obtain ⟨t, H, hH⟩ := h i
[GOAL]
case intro.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s✝ : (i : ι) → Set (α i)
β : ι → Type u_3
m : (i : ι) → α i → β i
s : Set ((i : ι) → β i)
h : ∀ (i : ι), ∃ t₁, m i ⁻¹' t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ s
i : ι
t : Set (β i)
H : m i ⁻¹' t ∈ f i
hH : eval i ⁻¹' t ⊆ s
⊢ ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ (fun k i => m i (k i)) ⁻¹' s
[PROOFSTEP]
exact ⟨{x : α i | m i x ∈ t}, H, fun x hx => hH hx⟩


[GOAL]
α : Type u_1
n : ℕ
⊢ Even (card (Fin (bit0 n)))
[PROOFSTEP]
rw [Fintype.card_fin]
[GOAL]
α : Type u_1
n : ℕ
⊢ Even (bit0 n)
[PROOFSTEP]
exact even_bit0 _


[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
α β : A₁ ⟶ A₂
⊢ F.map (α.f + β.f) ≫ A₂.str = A₁.str ≫ (α.f + β.f)
[PROOFSTEP]
simp only [Functor.map_add, add_comp, Endofunctor.Algebra.Hom.h, comp_add]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (a b c : A₁ ⟶ A₂), a + b + c = a + (b + c)
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ b✝ c✝ : A₁ ⟶ A₂
⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ b✝ c✝ : A₁ ⟶ A₂
⊢ (a✝ + b✝ + c✝).f = (a✝ + (b✝ + c✝)).f
[PROOFSTEP]
apply add_assoc
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ F.map 0 ≫ A₂.str = A₁.str ≫ 0
[PROOFSTEP]
simp only [Functor.map_zero, zero_comp, comp_zero]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (a : A₁ ⟶ A₂), 0 + a = a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ 0 + a✝ = a✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ (0 + a✝).f = a✝.f
[PROOFSTEP]
apply zero_add
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (a : A₁ ⟶ A₂), a + 0 = a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ a✝ + 0 = a✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ (a✝ + 0).f = a✝.f
[PROOFSTEP]
apply add_zero
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n : ℕ
α : A₁ ⟶ A₂
⊢ F.map (n • α.f) ≫ A₂.str = A₁.str ≫ (n • α.f)
[PROOFSTEP]
rw [comp_nsmul, Functor.map_nsmul, nsmul_comp, Endofunctor.Algebra.Hom.h]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (x : A₁ ⟶ A₂), (fun n α => Algebra.Hom.mk (n • α.f)) 0 x = 0
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
x✝ : A₁ ⟶ A₂
⊢ (fun n α => Algebra.Hom.mk (n • α.f)) 0 x✝ = 0
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
x✝ : A₁ ⟶ A₂
⊢ ((fun n α => Algebra.Hom.mk (n • α.f)) 0 x✝).f = 0.f
[PROOFSTEP]
apply zero_smul
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (n : ℕ) (x : A₁ ⟶ A₂),
    (fun n α => Algebra.Hom.mk (n • α.f)) (n + 1) x = x + (fun n α => Algebra.Hom.mk (n • α.f)) n x
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
x✝ : A₁ ⟶ A₂
⊢ (fun n α => Algebra.Hom.mk (n • α.f)) (n✝ + 1) x✝ = x✝ + (fun n α => Algebra.Hom.mk (n • α.f)) n✝ x✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
x✝ : A₁ ⟶ A₂
⊢ ((fun n α => Algebra.Hom.mk (n • α.f)) (n✝ + 1) x✝).f = (x✝ + (fun n α => Algebra.Hom.mk (n • α.f)) n✝ x✝).f
[PROOFSTEP]
apply succ_nsmul
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
α : A₁ ⟶ A₂
⊢ F.map (-α.f) ≫ A₂.str = A₁.str ≫ (-α.f)
[PROOFSTEP]
simp only [Functor.map_neg, neg_comp, Endofunctor.Algebra.Hom.h, comp_neg]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
α β : A₁ ⟶ A₂
⊢ F.map (α.f - β.f) ≫ A₂.str = A₁.str ≫ (α.f - β.f)
[PROOFSTEP]
simp only [Functor.map_sub, sub_comp, Endofunctor.Algebra.Hom.h, comp_sub]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (a b : A₁ ⟶ A₂), a - b = a + -b
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ a✝ - b✝ = a✝ + -b✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ (a✝ - b✝).f = (a✝ + -b✝).f
[PROOFSTEP]
apply sub_eq_add_neg
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
r : ℤ
α : A₁ ⟶ A₂
⊢ F.map (r • α.f) ≫ A₂.str = A₁.str ≫ (r • α.f)
[PROOFSTEP]
rw [comp_zsmul, Functor.map_zsmul, zsmul_comp, Endofunctor.Algebra.Hom.h]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (a : A₁ ⟶ A₂), (fun r α => Algebra.Hom.mk (r • α.f)) 0 a = 0
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ (fun r α => Algebra.Hom.mk (r • α.f)) 0 a✝ = 0
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) 0 a✝).f = 0.f
[PROOFSTEP]
apply zero_smul
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),
    (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n)) a =
      a + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n) a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝ =
    a✝ + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝).f =
    (a✝ + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝).f
[PROOFSTEP]
dsimp
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ ↑(Nat.succ n✝) • a✝.f = (a✝ + Algebra.Hom.mk (↑n✝ • a✝.f)).f
[PROOFSTEP]
simp only [coe_nat_zsmul, succ_nsmul]
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ a✝.f + n✝ • a✝.f = (a✝ + Algebra.Hom.mk (n✝ • a✝.f)).f
[PROOFSTEP]
rfl
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),
    (fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n) a = -(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n)) a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ (fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝ = -(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝).f =
    (-(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝).f
[PROOFSTEP]
simp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (a : A₁ ⟶ A₂), -a + a = 0
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ -a✝ + a✝ = 0
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ : A₁ ⟶ A₂
⊢ (-a✝ + a✝).f = 0.f
[PROOFSTEP]
apply add_left_neg
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
⊢ ∀ (a b : A₁ ⟶ A₂), a + b = b + a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ a✝ + b✝ = b✝ + a✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Algebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ (a✝ + b✝).f = (b✝ + a✝).f
[PROOFSTEP]
apply add_comm
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
⊢ ∀ (P Q R : Algebra F) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Algebra F
f✝ f'✝ : P✝ ⟶ Q✝
g✝ : Q✝ ⟶ R✝
⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Algebra F
f✝ f'✝ : P✝ ⟶ Q✝
g✝ : Q✝ ⟶ R✝
⊢ ((f✝ + f'✝) ≫ g✝).f = (f✝ ≫ g✝ + f'✝ ≫ g✝).f
[PROOFSTEP]
apply add_comp
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
⊢ ∀ (P Q R : Algebra F) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Algebra F
f✝ : P✝ ⟶ Q✝
g✝ g'✝ : Q✝ ⟶ R✝
⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝
[PROOFSTEP]
apply Algebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Algebra F
f✝ : P✝ ⟶ Q✝
g✝ g'✝ : Q✝ ⟶ R✝
⊢ (f✝ ≫ (g✝ + g'✝)).f = (f✝ ≫ g✝ + f✝ ≫ g'✝).f
[PROOFSTEP]
apply comp_add
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
α β : A₁ ⟶ A₂
⊢ A₁.str ≫ F.map (α.f + β.f) = (α.f + β.f) ≫ A₂.str
[PROOFSTEP]
simp only [Functor.map_add, comp_add, Endofunctor.Coalgebra.Hom.h, add_comp]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (a b c : A₁ ⟶ A₂), a + b + c = a + (b + c)
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ b✝ c✝ : A₁ ⟶ A₂
⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ b✝ c✝ : A₁ ⟶ A₂
⊢ (a✝ + b✝ + c✝).f = (a✝ + (b✝ + c✝)).f
[PROOFSTEP]
apply add_assoc
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ A₁.str ≫ F.map 0 = 0 ≫ A₂.str
[PROOFSTEP]
simp only [Functor.map_zero, zero_comp, comp_zero]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (a : A₁ ⟶ A₂), 0 + a = a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ 0 + a✝ = a✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ (0 + a✝).f = a✝.f
[PROOFSTEP]
apply zero_add
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (a : A₁ ⟶ A₂), a + 0 = a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ a✝ + 0 = a✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ (a✝ + 0).f = a✝.f
[PROOFSTEP]
apply add_zero
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n : ℕ
α : A₁ ⟶ A₂
⊢ A₁.str ≫ F.map (n • α.f) = (n • α.f) ≫ A₂.str
[PROOFSTEP]
rw [Functor.map_nsmul, comp_nsmul, Endofunctor.Coalgebra.Hom.h, nsmul_comp]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (x : A₁ ⟶ A₂), (fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x = 0
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
x✝ : A₁ ⟶ A₂
⊢ (fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x✝ = 0
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
x✝ : A₁ ⟶ A₂
⊢ ((fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x✝).f = 0.f
[PROOFSTEP]
apply zero_smul
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (n : ℕ) (x : A₁ ⟶ A₂),
    (fun n α => Coalgebra.Hom.mk (n • α.f)) (n + 1) x = x + (fun n α => Coalgebra.Hom.mk (n • α.f)) n x
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
x✝ : A₁ ⟶ A₂
⊢ (fun n α => Coalgebra.Hom.mk (n • α.f)) (n✝ + 1) x✝ = x✝ + (fun n α => Coalgebra.Hom.mk (n • α.f)) n✝ x✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
x✝ : A₁ ⟶ A₂
⊢ ((fun n α => Coalgebra.Hom.mk (n • α.f)) (n✝ + 1) x✝).f = (x✝ + (fun n α => Coalgebra.Hom.mk (n • α.f)) n✝ x✝).f
[PROOFSTEP]
apply succ_nsmul
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
α : A₁ ⟶ A₂
⊢ A₁.str ≫ F.map (-α.f) = (-α.f) ≫ A₂.str
[PROOFSTEP]
simp only [Functor.map_neg, comp_neg, Endofunctor.Coalgebra.Hom.h, neg_comp]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
α β : A₁ ⟶ A₂
⊢ A₁.str ≫ F.map (α.f - β.f) = (α.f - β.f) ≫ A₂.str
[PROOFSTEP]
simp only [Functor.map_sub, comp_sub, Endofunctor.Coalgebra.Hom.h, sub_comp]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (a b : A₁ ⟶ A₂), a - b = a + -b
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ a✝ - b✝ = a✝ + -b✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ (a✝ - b✝).f = (a✝ + -b✝).f
[PROOFSTEP]
apply sub_eq_add_neg
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
r : ℤ
α : A₁ ⟶ A₂
⊢ A₁.str ≫ F.map (r • α.f) = (r • α.f) ≫ A₂.str
[PROOFSTEP]
rw [Functor.map_zsmul, comp_zsmul, Endofunctor.Coalgebra.Hom.h, zsmul_comp]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (a : A₁ ⟶ A₂), (fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a = 0
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a✝ = 0
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a✝).f = 0.f
[PROOFSTEP]
apply zero_smul
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),
    (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n)) a =
      a + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n) a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝ =
    a✝ + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝).f =
    (a✝ + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝).f
[PROOFSTEP]
dsimp
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ ↑(Nat.succ n✝) • a✝.f = (a✝ + Coalgebra.Hom.mk (↑n✝ • a✝.f)).f
[PROOFSTEP]
simp only [coe_nat_zsmul, succ_nsmul]
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ a✝.f + n✝ • a✝.f = (a✝ + Coalgebra.Hom.mk (n✝ • a✝.f)).f
[PROOFSTEP]
rfl
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),
    (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n) a =
      -(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n)) a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝ =
    -(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
n✝ : ℕ
a✝ : A₁ ⟶ A₂
⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝).f =
    (-(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝).f
[PROOFSTEP]
simp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (a : A₁ ⟶ A₂), -a + a = 0
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ -a✝ + a✝ = 0
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ : A₁ ⟶ A₂
⊢ (-a✝ + a✝).f = 0.f
[PROOFSTEP]
apply add_left_neg
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
⊢ ∀ (a b : A₁ ⟶ A₂), a + b = b + a
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ a✝ + b✝ = b✝ + a✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
A₁ A₂ : Coalgebra F
a✝ b✝ : A₁ ⟶ A₂
⊢ (a✝ + b✝).f = (b✝ + a✝).f
[PROOFSTEP]
apply add_comm
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
⊢ ∀ (P Q R : Coalgebra F) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Coalgebra F
f✝ f'✝ : P✝ ⟶ Q✝
g✝ : Q✝ ⟶ R✝
⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Coalgebra F
f✝ f'✝ : P✝ ⟶ Q✝
g✝ : Q✝ ⟶ R✝
⊢ ((f✝ + f'✝) ≫ g✝).f = (f✝ ≫ g✝ + f'✝ ≫ g✝).f
[PROOFSTEP]
apply add_comp
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
⊢ ∀ (P Q R : Coalgebra F) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'
[PROOFSTEP]
intros
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Coalgebra F
f✝ : P✝ ⟶ Q✝
g✝ g'✝ : Q✝ ⟶ R✝
⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝
[PROOFSTEP]
apply Coalgebra.Hom.ext
[GOAL]
case f
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
F : C ⥤ C
inst✝ : Functor.Additive F
P✝ Q✝ R✝ : Coalgebra F
f✝ : P✝ ⟶ Q✝
g✝ g'✝ : Q✝ ⟶ R✝
⊢ (f✝ ≫ (g✝ + g'✝)).f = (f✝ ≫ g✝ + f✝ ≫ g'✝).f
[PROOFSTEP]
apply comp_add


[GOAL]
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1✝ D2✝ : Derivation R A A
a✝ : A
D1 D2 : Derivation R A A
a b : A
⊢ ↑⁅↑D1, ↑D2⁆ (a * b) = a • ↑⁅↑D1, ↑D2⁆ b + b • ↑⁅↑D1, ↑D2⁆ a
[PROOFSTEP]
simp only [Ring.lie_def, map_add, Algebra.id.smul_eq_mul, LinearMap.mul_apply, leibniz, coeFn_coe, LinearMap.sub_apply]
[GOAL]
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1✝ D2✝ : Derivation R A A
a✝ : A
D1 D2 : Derivation R A A
a b : A
⊢ a * ↑D1 (↑D2 b) + ↑D2 b * ↑D1 a + (b * ↑D1 (↑D2 a) + ↑D2 a * ↑D1 b) -
      (a * ↑D2 (↑D1 b) + ↑D1 b * ↑D2 a + (b * ↑D2 (↑D1 a) + ↑D1 a * ↑D2 b)) =
    a * (↑D1 (↑D2 b) - ↑D2 (↑D1 b)) + b * (↑D1 (↑D2 a) - ↑D2 (↑D1 a))
[PROOFSTEP]
ring
[GOAL]
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a : A
d e f : Derivation R A A
⊢ ⁅d + e, f⁆ = ⁅d, f⁆ + ⁅e, f⁆
[PROOFSTEP]
ext a
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d e f : Derivation R A A
a : A
⊢ ↑⁅d + e, f⁆ a = ↑(⁅d, f⁆ + ⁅e, f⁆) a
[PROOFSTEP]
simp only [commutator_apply, add_apply, map_add]
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d e f : Derivation R A A
a : A
⊢ ↑d (↑f a) + ↑e (↑f a) - (↑f (↑d a) + ↑f (↑e a)) = ↑d (↑f a) - ↑f (↑d a) + (↑e (↑f a) - ↑f (↑e a))
[PROOFSTEP]
ring
[GOAL]
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a : A
d e f : Derivation R A A
⊢ ⁅d, e + f⁆ = ⁅d, e⁆ + ⁅d, f⁆
[PROOFSTEP]
ext a
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d e f : Derivation R A A
a : A
⊢ ↑⁅d, e + f⁆ a = ↑(⁅d, e⁆ + ⁅d, f⁆) a
[PROOFSTEP]
simp only [commutator_apply, add_apply, map_add]
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d e f : Derivation R A A
a : A
⊢ ↑d (↑e a) + ↑d (↑f a) - (↑e (↑d a) + ↑f (↑d a)) = ↑d (↑e a) - ↑e (↑d a) + (↑d (↑f a) - ↑f (↑d a))
[PROOFSTEP]
ring
[GOAL]
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a : A
d : Derivation R A A
⊢ ⁅d, d⁆ = 0
[PROOFSTEP]
ext a
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d : Derivation R A A
a : A
⊢ ↑⁅d, d⁆ a = ↑0 a
[PROOFSTEP]
simp only [commutator_apply, add_apply, map_add]
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d : Derivation R A A
a : A
⊢ ↑d (↑d a) - ↑d (↑d a) = ↑0 a
[PROOFSTEP]
ring_nf
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d : Derivation R A A
a : A
⊢ 0 = ↑0 a
[PROOFSTEP]
simp
[GOAL]
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a : A
d e f : Derivation R A A
⊢ ⁅d, ⁅e, f⁆⁆ = ⁅⁅d, e⁆, f⁆ + ⁅e, ⁅d, f⁆⁆
[PROOFSTEP]
ext a
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d e f : Derivation R A A
a : A
⊢ ↑⁅d, ⁅e, f⁆⁆ a = ↑(⁅⁅d, e⁆, f⁆ + ⁅e, ⁅d, f⁆⁆) a
[PROOFSTEP]
simp only [commutator_apply, add_apply, sub_apply, map_sub]
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
d e f : Derivation R A A
a : A
⊢ ↑d (↑e (↑f a)) - ↑d (↑f (↑e a)) - (↑e (↑f (↑d a)) - ↑f (↑e (↑d a))) =
    ↑d (↑e (↑f a)) - ↑e (↑d (↑f a)) - (↑f (↑d (↑e a)) - ↑f (↑e (↑d a))) +
      (↑e (↑d (↑f a)) - ↑e (↑f (↑d a)) - (↑d (↑f (↑e a)) - ↑f (↑d (↑e a))))
[PROOFSTEP]
ring
[GOAL]
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a : A
src✝ : Module R (Derivation R A A) := instModule
r : R
d e : Derivation R A A
⊢ ⁅d, r • e⁆ = r • ⁅d, e⁆
[PROOFSTEP]
ext a
[GOAL]
case H
R : Type u_1
inst✝² : CommRing R
A : Type u_2
inst✝¹ : CommRing A
inst✝ : Algebra R A
D D1 D2 : Derivation R A A
a✝ : A
src✝ : Module R (Derivation R A A) := instModule
r : R
d e : Derivation R A A
a : A
⊢ ↑⁅d, r • e⁆ a = ↑(r • ⁅d, e⁆) a
[PROOFSTEP]
simp only [commutator_apply, map_smul, smul_sub, smul_apply]


[GOAL]
ι : Type u
hi : Nonempty ι
R : Type v
inst✝¹ : Semiring R
p : ℕ
inst✝ : CharP R p
x : ℕ
i : ι
h : ↑x = 0
j : ι
⊢ ↑(Pi.evalRingHom (fun x => R) j) ↑x = 0
[PROOFSTEP]
rw [map_natCast, h]
[GOAL]
ι : Type u
hi : Nonempty ι
R : Type v
inst✝¹ : Semiring R
p : ℕ
inst✝ : CharP R p
x : ℕ
i : ι
h : ↑x = 0
⊢ ↑(Pi.evalRingHom (fun x => R) i) ↑x = 0
[PROOFSTEP]
rw [h, RingHom.map_zero]


[GOAL]
m n : ℤ
⊢ ¬n % 2 = 1 ↔ n % 2 = 0
[PROOFSTEP]
cases' emod_two_eq_zero_or_one n with h h
[GOAL]
case inl
m n : ℤ
h : n % 2 = 0
⊢ ¬n % 2 = 1 ↔ n % 2 = 0
[PROOFSTEP]
simp [h]
[GOAL]
case inr
m n : ℤ
h : n % 2 = 1
⊢ ¬n % 2 = 1 ↔ n % 2 = 0
[PROOFSTEP]
simp [h]
[GOAL]
m n : ℤ
⊢ ¬n % 2 = 0 ↔ n % 2 = 1
[PROOFSTEP]
cases' emod_two_eq_zero_or_one n with h h
[GOAL]
case inl
m n : ℤ
h : n % 2 = 0
⊢ ¬n % 2 = 0 ↔ n % 2 = 1
[PROOFSTEP]
simp [h]
[GOAL]
case inr
m n : ℤ
h : n % 2 = 1
⊢ ¬n % 2 = 0 ↔ n % 2 = 1
[PROOFSTEP]
simp [h]
[GOAL]
m✝ n : ℤ
x✝ : Even n
m : ℤ
hm : n = m + m
⊢ n % 2 = 0
[PROOFSTEP]
simp [← two_mul, hm]
[GOAL]
m n : ℤ
h : n % 2 = 0
⊢ n % 2 + 2 * (n / 2) = n / 2 + n / 2
[PROOFSTEP]
simp [← two_mul, h]
[GOAL]
m✝ n : ℤ
x✝ : Odd n
m : ℤ
hm : n = 2 * m + 1
⊢ n % 2 = 1
[PROOFSTEP]
rw [hm, add_emod]
[GOAL]
m✝ n : ℤ
x✝ : Odd n
m : ℤ
hm : n = 2 * m + 1
⊢ (2 * m % 2 + 1 % 2) % 2 = 1
[PROOFSTEP]
norm_num
[GOAL]
m n : ℤ
h : n % 2 = 1
⊢ n % 2 + 2 * (n / 2) = 2 * (n / 2) + 1
[PROOFSTEP]
rw [h]
[GOAL]
m n : ℤ
h : n % 2 = 1
⊢ 1 + 2 * (n / 2) = 2 * (n / 2) + 1
[PROOFSTEP]
abel
[GOAL]
m n : ℤ
h : n % 2 = 1
⊢ 1 + 2 * (n / 2) = 2 * (n / 2) + 1
[PROOFSTEP]
abel
[GOAL]
m n : ℤ
⊢ ¬Even n ↔ n % 2 = 1
[PROOFSTEP]
rw [even_iff, emod_two_ne_zero]
[GOAL]
m n : ℤ
⊢ ¬Odd n ↔ n % 2 = 0
[PROOFSTEP]
rw [odd_iff, emod_two_ne_one]
[GOAL]
m n : ℤ
⊢ Even n ↔ ¬Odd n
[PROOFSTEP]
rw [not_odd_iff, even_iff]
[GOAL]
m n : ℤ
⊢ Odd n ↔ ¬Even n
[PROOFSTEP]
rw [not_even_iff, odd_iff]
[GOAL]
m n : ℤ
⊢ IsCompl {n | Even n} {n | Odd n}
[PROOFSTEP]
simp [← Set.compl_setOf, isCompl_compl]
[GOAL]
m n✝ n : ℤ
⊢ ∃ k, n = 2 * k ∨ n = 2 * k + 1
[PROOFSTEP]
simpa only [two_mul, exists_or, Odd, Even] using even_or_odd n
[GOAL]
m n✝ n : ℤ
⊢ Xor' (Even n) (Odd n)
[PROOFSTEP]
cases even_or_odd n with
| inl h => exact Or.inl ⟨h, even_iff_not_odd.mp h⟩
| inr h => exact Or.inr ⟨h, odd_iff_not_even.mp h⟩
[GOAL]
m n✝ n : ℤ
x✝ : Even n ∨ Odd n
⊢ Xor' (Even n) (Odd n)
[PROOFSTEP]
cases even_or_odd n with
| inl h => exact Or.inl ⟨h, even_iff_not_odd.mp h⟩
| inr h => exact Or.inr ⟨h, odd_iff_not_even.mp h⟩
[GOAL]
case inl
m n✝ n : ℤ
h : Even n
⊢ Xor' (Even n) (Odd n)
[PROOFSTEP]

| inl h => exact Or.inl ⟨h, even_iff_not_odd.mp h⟩
[GOAL]
case inl
m n✝ n : ℤ
h : Even n
⊢ Xor' (Even n) (Odd n)
[PROOFSTEP]
exact Or.inl ⟨h, even_iff_not_odd.mp h⟩
[GOAL]
case inr
m n✝ n : ℤ
h : Odd n
⊢ Xor' (Even n) (Odd n)
[PROOFSTEP]

| inr h => exact Or.inr ⟨h, odd_iff_not_even.mp h⟩
[GOAL]
case inr
m n✝ n : ℤ
h : Odd n
⊢ Xor' (Even n) (Odd n)
[PROOFSTEP]
exact Or.inr ⟨h, odd_iff_not_even.mp h⟩
[GOAL]
m n✝ n : ℤ
⊢ ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1)
[PROOFSTEP]
rcases even_or_odd n with (⟨k, rfl⟩ | ⟨k, rfl⟩)
[GOAL]
case inl.intro
m n k : ℤ
⊢ ∃ k_1, Xor' (k + k = 2 * k_1) (k + k = 2 * k_1 + 1)
[PROOFSTEP]
use k
[GOAL]
case inr.intro
m n k : ℤ
⊢ ∃ k_1, Xor' (2 * k + 1 = 2 * k_1) (2 * k + 1 = 2 * k_1 + 1)
[PROOFSTEP]
use k
[GOAL]
case h
m n k : ℤ
⊢ Xor' (k + k = 2 * k) (k + k = 2 * k + 1)
[PROOFSTEP]
simpa only [← two_mul, Xor', true_and_iff, eq_self_iff_true, not_true, or_false_iff, and_false_iff] using
  (succ_ne_self (2 * k)).symm
[GOAL]
case h
m n k : ℤ
⊢ Xor' (2 * k + 1 = 2 * k) (2 * k + 1 = 2 * k + 1)
[PROOFSTEP]
simp only [Xor', add_right_eq_self, false_or_iff, eq_self_iff_true, not_true, not_false_iff, one_ne_zero, and_self_iff]
[GOAL]
m n : ℤ
⊢ ¬Even 1
[PROOFSTEP]
rw [even_iff]
[GOAL]
m n : ℤ
⊢ ¬1 % 2 = 0
[PROOFSTEP]
norm_num
[GOAL]
m n : ℤ
⊢ Even (m + n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
cases' emod_two_eq_zero_or_one m with h₁ h₁
[GOAL]
case inl
m n : ℤ
h₁ : m % 2 = 0
⊢ Even (m + n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
cases' emod_two_eq_zero_or_one n with h₂ h₂
[GOAL]
case inr
m n : ℤ
h₁ : m % 2 = 1
⊢ Even (m + n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
cases' emod_two_eq_zero_or_one n with h₂ h₂
[GOAL]
case inl.inl
m n : ℤ
h₁ : m % 2 = 0
h₂ : n % 2 = 0
⊢ Even (m + n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.add_emod]
[GOAL]
case inl.inr
m n : ℤ
h₁ : m % 2 = 0
h₂ : n % 2 = 1
⊢ Even (m + n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.add_emod]
[GOAL]
case inr.inl
m n : ℤ
h₁ : m % 2 = 1
h₂ : n % 2 = 0
⊢ Even (m + n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.add_emod]
[GOAL]
case inr.inr
m n : ℤ
h₁ : m % 2 = 1
h₂ : n % 2 = 1
⊢ Even (m + n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.add_emod]
[GOAL]
m n : ℤ
⊢ Even (m + n) ↔ (Odd m ↔ Odd n)
[PROOFSTEP]
rw [even_add, even_iff_not_odd, even_iff_not_odd, not_iff_not]
[GOAL]
m n✝ n : ℤ
⊢ ¬Even (bit1 n)
[PROOFSTEP]
simp [bit1, parity_simps]
[GOAL]
m n✝ n : ℤ
⊢ ¬2 ∣ 2 * n + 1
[PROOFSTEP]
simp [add_emod]
[GOAL]
m n : ℤ
⊢ Even (m - n) ↔ (Even m ↔ Even n)
[PROOFSTEP]
simp [sub_eq_add_neg, parity_simps]
[GOAL]
m n : ℤ
⊢ Even (m - n) ↔ (Odd m ↔ Odd n)
[PROOFSTEP]
rw [even_sub, even_iff_not_odd, even_iff_not_odd, not_iff_not]
[GOAL]
m n : ℤ
⊢ Even (n + 1) ↔ ¬Even n
[PROOFSTEP]
simp [even_add]
[GOAL]
m n : ℤ
⊢ Even (m * n) ↔ Even m ∨ Even n
[PROOFSTEP]
cases' emod_two_eq_zero_or_one m with h₁ h₁
[GOAL]
case inl
m n : ℤ
h₁ : m % 2 = 0
⊢ Even (m * n) ↔ Even m ∨ Even n
[PROOFSTEP]
cases' emod_two_eq_zero_or_one n with h₂ h₂
[GOAL]
case inr
m n : ℤ
h₁ : m % 2 = 1
⊢ Even (m * n) ↔ Even m ∨ Even n
[PROOFSTEP]
cases' emod_two_eq_zero_or_one n with h₂ h₂
[GOAL]
case inl.inl
m n : ℤ
h₁ : m % 2 = 0
h₂ : n % 2 = 0
⊢ Even (m * n) ↔ Even m ∨ Even n
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.mul_emod]
[GOAL]
case inl.inr
m n : ℤ
h₁ : m % 2 = 0
h₂ : n % 2 = 1
⊢ Even (m * n) ↔ Even m ∨ Even n
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.mul_emod]
[GOAL]
case inr.inl
m n : ℤ
h₁ : m % 2 = 1
h₂ : n % 2 = 0
⊢ Even (m * n) ↔ Even m ∨ Even n
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.mul_emod]
[GOAL]
case inr.inr
m n : ℤ
h₁ : m % 2 = 1
h₂ : n % 2 = 1
⊢ Even (m * n) ↔ Even m ∨ Even n
[PROOFSTEP]
simp [even_iff, h₁, h₂, Int.mul_emod]
[GOAL]
m n : ℤ
⊢ Odd (m * n) ↔ Odd m ∧ Odd n
[PROOFSTEP]
simp [not_or, parity_simps]
[GOAL]
m n✝ : ℤ
n : ℕ
⊢ Even (m ^ n) ↔ Even m ∧ n ≠ 0
[PROOFSTEP]
induction' n with n ih
[GOAL]
case zero
m n : ℤ
⊢ Even (m ^ Nat.zero) ↔ Even m ∧ Nat.zero ≠ 0
[PROOFSTEP]
simp [*, even_mul, pow_succ]
[GOAL]
case succ
m n✝ : ℤ
n : ℕ
ih : Even (m ^ n) ↔ Even m ∧ n ≠ 0
⊢ Even (m ^ Nat.succ n) ↔ Even m ∧ Nat.succ n ≠ 0
[PROOFSTEP]
simp [*, even_mul, pow_succ]
[GOAL]
case succ
m n✝ : ℤ
n : ℕ
ih : Even (m ^ n) ↔ Even m ∧ n ≠ 0
⊢ Even m → ¬n = 0 → Even m
[PROOFSTEP]
tauto
[GOAL]
m n✝ : ℤ
n : ℕ
⊢ Odd (m ^ n) ↔ Odd m ∨ n = 0
[PROOFSTEP]
rw [← not_iff_not, ← Int.even_iff_not_odd, not_or, ← Int.even_iff_not_odd, Int.even_pow]
[GOAL]
m n : ℤ
⊢ Odd (m + n) ↔ (Odd m ↔ Even n)
[PROOFSTEP]
rw [odd_iff_not_even, even_add, not_iff, odd_iff_not_even]
[GOAL]
m n : ℤ
⊢ Odd (m + n) ↔ (Odd n ↔ Even m)
[PROOFSTEP]
rw [add_comm, odd_add]
[GOAL]
m n : ℤ
h : Odd (m + n)
hnot : m = n
⊢ False
[PROOFSTEP]
simp [hnot, parity_simps] at h
[GOAL]
m n : ℤ
⊢ Odd (m - n) ↔ (Odd m ↔ Even n)
[PROOFSTEP]
rw [odd_iff_not_even, even_sub, not_iff, odd_iff_not_even]
[GOAL]
m n : ℤ
⊢ Odd (m - n) ↔ (Odd n ↔ Even m)
[PROOFSTEP]
rw [odd_iff_not_even, even_sub, not_iff, not_iff_comm, odd_iff_not_even]
[GOAL]
m n✝ n : ℤ
⊢ Even (n * (n + 1))
[PROOFSTEP]
simpa [even_mul, parity_simps] using n.even_or_odd
[GOAL]
m n✝ : ℤ
n : ℕ
⊢ Even ↑n ↔ Even n
[PROOFSTEP]
rw_mod_cast [even_iff, Nat.even_iff]
[GOAL]
m n✝ : ℤ
n : ℕ
⊢ Odd ↑n ↔ Odd n
[PROOFSTEP]
rw [odd_iff_not_even, Nat.odd_iff_not_even, even_coe_nat]
[GOAL]
m n : ℤ
⊢ Even (natAbs n) ↔ Even n
[PROOFSTEP]
simp [even_iff_two_dvd, dvd_natAbs, coe_nat_dvd_left.symm]
[GOAL]
m n : ℤ
⊢ Odd (natAbs n) ↔ Odd n
[PROOFSTEP]
rw [odd_iff_not_even, Nat.odd_iff_not_even, natAbs_even]
[GOAL]
m n a b : ℤ
ha : Odd a
hb : Odd b
⊢ 4 ∣ a + b ∨ 4 ∣ a - b
[PROOFSTEP]
obtain ⟨m, rfl⟩ := ha
[GOAL]
case intro
m✝ n b : ℤ
hb : Odd b
m : ℤ
⊢ 4 ∣ 2 * m + 1 + b ∨ 4 ∣ 2 * m + 1 - b
[PROOFSTEP]
obtain ⟨n, rfl⟩ := hb
[GOAL]
case intro.intro
m✝ n✝ m n : ℤ
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
[PROOFSTEP]
obtain h | h := Int.even_or_odd (m + n)
[GOAL]
case intro.intro.inl
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
[PROOFSTEP]
right
[GOAL]
case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
[PROOFSTEP]
rw [Int.even_add, ← Int.even_sub] at h
[GOAL]
case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m - n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
[PROOFSTEP]
obtain ⟨k, hk⟩ := h
[GOAL]
case intro.intro.inl.h.intro
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
[PROOFSTEP]
convert dvd_mul_right 4 k using 1
[GOAL]
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * m + 1 - (2 * n + 1) = 4 * k
[PROOFSTEP]
rw [eq_add_of_sub_eq hk, mul_add, add_assoc, add_sub_cancel, ← two_mul, ← mul_assoc]
[GOAL]
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * 2 * k = 4 * k
[PROOFSTEP]
rfl
[GOAL]
case intro.intro.inr
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
[PROOFSTEP]
left
[GOAL]
case intro.intro.inr.h
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)
[PROOFSTEP]
obtain ⟨k, hk⟩ := h
[GOAL]
case intro.intro.inr.h.intro
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)
[PROOFSTEP]
convert dvd_mul_right 4 (k + 1) using 1
[GOAL]
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * m + 1 + (2 * n + 1) = 4 * (k + 1)
[PROOFSTEP]
rw [eq_sub_of_add_eq hk, add_right_comm, ← add_sub, mul_add, mul_sub, add_assoc, add_assoc, sub_add, add_assoc, ←
  sub_sub (2 * n), sub_self, zero_sub, sub_neg_eq_add, ← mul_assoc, mul_add]
[GOAL]
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * 2 * k + (2 * 1 + (1 + 1)) = 4 * k + 4 * 1
[PROOFSTEP]
rfl
[GOAL]
m n : ℤ
⊢ Odd n → 2 * (n / 2) + 1 = n
[PROOFSTEP]
rintro ⟨c, rfl⟩
[GOAL]
case intro
m c : ℤ
⊢ 2 * ((2 * c + 1) / 2) + 1 = 2 * c + 1
[PROOFSTEP]
rw [mul_comm]
[GOAL]
case intro
m c : ℤ
⊢ (2 * c + 1) / 2 * 2 + 1 = 2 * c + 1
[PROOFSTEP]
convert Int.ediv_add_emod' (2 * c + 1) 2
[GOAL]
case h.e'_2.h.e'_6
m c : ℤ
⊢ 1 = (2 * c + 1) % 2
[PROOFSTEP]
simp [Int.add_emod]
[GOAL]
m n : ℤ
⊢ Odd n → n / 2 * 2 + 1 = n
[PROOFSTEP]
rintro ⟨c, rfl⟩
[GOAL]
case intro
m c : ℤ
⊢ (2 * c + 1) / 2 * 2 + 1 = 2 * c + 1
[PROOFSTEP]
convert Int.ediv_add_emod' (2 * c + 1) 2
[GOAL]
case h.e'_2.h.e'_6
m c : ℤ
⊢ 1 = (2 * c + 1) % 2
[PROOFSTEP]
simp [Int.add_emod]
[GOAL]
m n : ℤ
⊢ Odd n → 1 + n / 2 * 2 = n
[PROOFSTEP]
rintro ⟨c, rfl⟩
[GOAL]
case intro
m c : ℤ
⊢ 1 + (2 * c + 1) / 2 * 2 = 2 * c + 1
[PROOFSTEP]
rw [add_comm]
[GOAL]
case intro
m c : ℤ
⊢ (2 * c + 1) / 2 * 2 + 1 = 2 * c + 1
[PROOFSTEP]
convert Int.ediv_add_emod' (2 * c + 1) 2
[GOAL]
case h.e'_2.h.e'_6
m c : ℤ
⊢ 1 = (2 * c + 1) % 2
[PROOFSTEP]
simp [Int.add_emod]
[GOAL]
m✝ n✝ m n : ℤ
h : Even m
⊢ ¬Even (n + 3) ↔ Even (m ^ 2 + m + n)
[PROOFSTEP]
simp [*, (by decide : ¬2 = 0), parity_simps]
[GOAL]
m✝ n✝ m n : ℤ
h : Even m
⊢ ¬2 = 0
[PROOFSTEP]
decide
[GOAL]
m n : ℤ
⊢ ¬Even 25394535
[PROOFSTEP]
simp


[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p q : S
h : Commute p q
h₁ : IsIdempotentElem p
h₂ : IsIdempotentElem q
⊢ IsIdempotentElem (p * q)
[PROOFSTEP]
rw [IsIdempotentElem, mul_assoc, ← mul_assoc q, ← h.eq, mul_assoc p, h₂.eq, ← mul_assoc, h₁.eq]
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : R
h : IsIdempotentElem p
⊢ IsIdempotentElem (1 - p)
[PROOFSTEP]
rw [IsIdempotentElem, mul_sub, mul_one, sub_mul, one_mul, h.eq, sub_self, sub_zero]
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : N
n✝ : ℕ
h : IsIdempotentElem p
n : ℕ
x✝ : IsIdempotentElem (p ^ n)
⊢ p ^ Nat.succ n * p ^ Nat.succ n = p ^ Nat.succ n
[PROOFSTEP]
conv_rhs =>
  rw [← h.eq]
    --Porting note: was `nth_rw 3 [← h.eq]`
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : N
n✝ : ℕ
h : IsIdempotentElem p
n : ℕ
x✝ : IsIdempotentElem (p ^ n)
| p ^ Nat.succ n
[PROOFSTEP]
rw [← h.eq]
    --Porting note: was `nth_rw 3 [← h.eq]`
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : N
n✝ : ℕ
h : IsIdempotentElem p
n : ℕ
x✝ : IsIdempotentElem (p ^ n)
| p ^ Nat.succ n
[PROOFSTEP]
rw [← h.eq]
    --Porting note: was `nth_rw 3 [← h.eq]`
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : N
n✝ : ℕ
h : IsIdempotentElem p
n : ℕ
x✝ : IsIdempotentElem (p ^ n)
| p ^ Nat.succ n
[PROOFSTEP]
rw [← h.eq]
  --Porting note: was `nth_rw 3 [← h.eq]`
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : N
n✝ : ℕ
h : IsIdempotentElem p
n : ℕ
x✝ : IsIdempotentElem (p ^ n)
⊢ p ^ Nat.succ n * p ^ Nat.succ n = (p * p) ^ Nat.succ n
[PROOFSTEP]
rw [← sq, ← sq, ← pow_mul, ← pow_mul']
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : N
n✝ : ℕ
h : IsIdempotentElem p
n : ℕ
ih : p ^ (n + 1) = p
⊢ p ^ (Nat.succ n + 1) = p
[PROOFSTEP]
rw [pow_succ, ih, h.eq]
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : G₀
⊢ IsIdempotentElem p ↔ p = 0 ∨ p = 1
[PROOFSTEP]
refine'
  Iff.intro (fun h => or_iff_not_imp_left.mpr fun hp => _) fun h =>
    h.elim (fun hp => hp.symm ▸ zero) fun hp => hp.symm ▸ one
[GOAL]
M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : G₀
h : IsIdempotentElem p
hp : ¬p = 0
⊢ p = 1
[PROOFSTEP]
exact mul_left_cancel₀ hp (h.trans (mul_one p).symm)


[GOAL]
C : Type u
inst✝ : Groupoid C
X Y : C
f : X ⟶ Y
⊢ inv (inv f) = f
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝ : Groupoid C
X Y : C
f : Y ⟶ X
⊢ inv (inv f) = f
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝ : Groupoid C
X Y a✝ b✝ : C
f : a✝ ⟶ b✝
⊢ Quiver.reverse (Quiver.reverse f) = f
[PROOFSTEP]
dsimp [Quiver.reverse]
[GOAL]
C : Type u
inst✝ : Groupoid C
X Y a✝ b✝ : C
f : a✝ ⟶ b✝
⊢ Groupoid.inv (Groupoid.inv f) = f
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝¹ : Groupoid C
X Y : C
D : Type u_1
inst✝ : Groupoid D
F : C ⥤ D
u✝ v✝ : C
f : u✝ ⟶ v✝
⊢ F.map (Quiver.reverse f) = Quiver.reverse (F.map f)
[PROOFSTEP]
simp only [Quiver.reverse, Quiver.HasReverse.reverse', Groupoid.inv_eq_inv, Functor.map_inv]
[GOAL]
C : Type u
inst✝ : Groupoid C
X Y : C
f : X ⟶ Y
⊢ f ≫ inv f = 𝟙 X
[PROOFSTEP]
aesop_cat
[GOAL]
C : Type u
inst✝ : Groupoid C
X Y : C
f : X ⟶ Y
⊢ inv f ≫ f = 𝟙 Y
[PROOFSTEP]
aesop_cat
[GOAL]
I : Type u
J : I → Type u₂
inst✝ : (i : I) → Groupoid (J i)
X✝ Y✝ : (i : I) → J i
f : X✝ ⟶ Y✝
⊢ (fun {X Y} f i => Groupoid.inv (f i)) f ≫ f = 𝟙 Y✝
[PROOFSTEP]
funext i
[GOAL]
case h
I : Type u
J : I → Type u₂
inst✝ : (i : I) → Groupoid (J i)
X✝ Y✝ : (i : I) → J i
f : X✝ ⟶ Y✝
i : I
⊢ ((fun {X Y} f i => Groupoid.inv (f i)) f ≫ f) i = 𝟙 Y✝ i
[PROOFSTEP]
apply Groupoid.inv_comp
[GOAL]
I : Type u
J : I → Type u₂
inst✝ : (i : I) → Groupoid (J i)
X✝ Y✝ : (i : I) → J i
f : X✝ ⟶ Y✝
⊢ f ≫ (fun {X Y} f i => Groupoid.inv (f i)) f = 𝟙 X✝
[PROOFSTEP]
funext i
[GOAL]
case h
I : Type u
J : I → Type u₂
inst✝ : (i : I) → Groupoid (J i)
X✝ Y✝ : (i : I) → J i
f : X✝ ⟶ Y✝
i : I
⊢ (f ≫ (fun {X Y} f i => Groupoid.inv (f i)) f) i = 𝟙 X✝ i
[PROOFSTEP]
apply Groupoid.comp_inv


[GOAL]
m : ℝ
hm : 1 < m
k : ℕ
⊢ Summable fun i => 1 / m ^ (i + (k + 1))!
[PROOFSTEP]
convert (summable_nat_add_iff (k + 1)).2 (LiouvilleNumber.summable hm)
[GOAL]
m : ℝ
hm : 1 < m
k x✝ : ℕ
⊢ 0 ≤ 1 / m ^ (x✝ + (k + 1))!
[PROOFSTEP]
positivity
[GOAL]
m : ℝ
hm : 1 < m
k : ℕ
⊢ 0 < 1 / m ^ (0 + (k + 1))!
[PROOFSTEP]
positivity
[GOAL]
n : ℕ
m : ℝ
m1 : 1 < m
m0 : 0 < m
mi : 1 / m < 1
⊢ ∑' (i : ℕ), 1 / m ^ (i + (n + 1)!) = ∑' (i : ℕ), (1 / m) ^ i * (1 / m ^ (n + 1)!)
[PROOFSTEP]
simp only [pow_add, one_div, mul_inv, inv_pow]
  -- factor the constant `(1 / m ^ (n + 1)!)` out of the series
[GOAL]
n : ℕ
m : ℝ
m1 : 1 < m
m0 : 0 < m
mi : 1 / m < 1
⊢ (∑' (i : ℕ), (1 / m) ^ i) * (1 / m ^ (n + 1)!) = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!)
[PROOFSTEP]
rw [tsum_geometric_of_lt_1 (by positivity) mi]
[GOAL]
n : ℕ
m : ℝ
m1 : 1 < m
m0 : 0 < m
mi : 1 / m < 1
⊢ 0 ≤ 1 / m
[PROOFSTEP]
positivity
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 ≤ 1 / m ^ (n + 1)!
[PROOFSTEP]
positivity
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 / m ^ (n ! * (n + 1)) ≤ 1 / m ^ (n ! * n)
[PROOFSTEP]
apply (div_le_div_iff _ _).mpr
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 * m ^ (n ! * n) ≤ 1 * m ^ (n ! * (n + 1))
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))
n : ℕ m : ℝ hm : 2 ≤ m ⊢ 0 < m ^ (n ! * n)
[PROOFSTEP]
conv_rhs =>
  rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]
    -- the second factors coincide, so we prove the inequality of the first factors*
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
| 1 * m ^ (n ! * (n + 1))
[PROOFSTEP]
rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]
    -- the second factors coincide, so we prove the inequality of the first factors*
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
| 1 * m ^ (n ! * (n + 1))
[PROOFSTEP]
rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]
    -- the second factors coincide, so we prove the inequality of the first factors*
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
| 1 * m ^ (n ! * (n + 1))
[PROOFSTEP]
rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]
  -- the second factors coincide, so we prove the inequality of the first factors*
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 * m ^ (n ! * n) ≤ m ^ n ! * m ^ (n ! * n)
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))
n : ℕ m : ℝ hm : 2 ≤ m ⊢ 0 < m ^ (n ! * n)
[PROOFSTEP]
refine'
  (mul_le_mul_right _).mpr
    _
      -- solve all the inequalities `0 < m ^ ??`
[GOAL]
case refine'_1
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)
case refine'_2
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 ≤ m ^ n !
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))
n : ℕ m : ℝ hm : 2 ≤ m ⊢ 0 < m ^ (n ! * n)
[PROOFSTEP]
any_goals
  exact
    pow_pos (zero_lt_two.trans_le hm)
      _
        -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
[GOAL]
case refine'_1
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)
[PROOFSTEP]
exact
  pow_pos (zero_lt_two.trans_le hm)
    _
      -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
[GOAL]
case refine'_2
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 ≤ m ^ n !
[PROOFSTEP]
exact
  pow_pos (zero_lt_two.trans_le hm)
    _
      -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))
[PROOFSTEP]
exact
  pow_pos (zero_lt_two.trans_le hm)
    _
      -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
[GOAL]
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)
[PROOFSTEP]
exact
  pow_pos (zero_lt_two.trans_le hm)
    _
      -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
[GOAL]
case refine'_2
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 ≤ m ^ n !
[PROOFSTEP]
exact _root_.trans (_root_.trans hm (pow_one _).symm.le) (pow_mono (one_le_two.trans hm) n.factorial_pos)
[GOAL]
m : ℕ
hm : 0 < m
k : ℕ
⊢ ∃ p, partialSum (↑m) k = ↑p / ↑(m ^ k !)
[PROOFSTEP]
induction' k with k h
[GOAL]
case zero
m : ℕ
hm : 0 < m
⊢ ∃ p, partialSum (↑m) Nat.zero = ↑p / ↑(m ^ Nat.zero !)
[PROOFSTEP]
exact ⟨1, by rw [partialSum, range_one, sum_singleton, Nat.cast_one, Nat.factorial, pow_one, pow_one]⟩
[GOAL]
m : ℕ
hm : 0 < m
⊢ partialSum (↑m) Nat.zero = ↑1 / ↑(m ^ Nat.zero !)
[PROOFSTEP]
rw [partialSum, range_one, sum_singleton, Nat.cast_one, Nat.factorial, pow_one, pow_one]
[GOAL]
case succ
m : ℕ
hm : 0 < m
k : ℕ
h : ∃ p, partialSum (↑m) k = ↑p / ↑(m ^ k !)
⊢ ∃ p, partialSum (↑m) (Nat.succ k) = ↑p / ↑(m ^ (Nat.succ k)!)
[PROOFSTEP]
rcases h with ⟨p_k, h_k⟩
[GOAL]
case succ.intro
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ∃ p, partialSum (↑m) (Nat.succ k) = ↑p / ↑(m ^ (Nat.succ k)!)
[PROOFSTEP]
use p_k * m ^ ((k + 1)! - k !) + 1
[GOAL]
case h
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ partialSum (↑m) (Nat.succ k) = ↑(p_k * m ^ ((k + 1)! - k !) + 1) / ↑(m ^ (Nat.succ k)!)
[PROOFSTEP]
rw [partialSum_succ, h_k, div_add_div, div_eq_div_iff, add_mul]
[GOAL]
case h
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑p_k * ↑m ^ (k + 1)! * ↑(m ^ (Nat.succ k)!) + ↑(m ^ k !) * 1 * ↑(m ^ (Nat.succ k)!) =
    ↑(p_k * m ^ ((k + 1)! - k !) + 1) * (↑(m ^ k !) * ↑m ^ (k + 1)!)
[PROOFSTEP]
norm_cast
[GOAL]
case h
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ p_k * m ^ (k + 1)! * m ^ (Nat.succ k)! + m ^ k ! * 1 * m ^ (Nat.succ k)! =
    (p_k * m ^ ((k + 1)! - k !) + 1) * (m ^ k ! * m ^ (k + 1)!)
[PROOFSTEP]
rw [add_mul, one_mul, Nat.factorial_succ, add_mul, one_mul, add_tsub_cancel_right, pow_add]
[GOAL]
case h
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ p_k * (m ^ (k * k !) * m ^ k !) * (m ^ (k * k !) * m ^ k !) + m ^ k ! * 1 * (m ^ (k * k !) * m ^ k !) =
    p_k * m ^ (k * k !) * (m ^ k ! * (m ^ (k * k !) * m ^ k !)) + m ^ k ! * (m ^ (k * k !) * m ^ k !)
[PROOFSTEP]
simp [mul_assoc]
[GOAL]
case h.hb
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑(m ^ k !) * ↑m ^ (k + 1)! ≠ 0
case h.hd
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑(m ^ (Nat.succ k)!) ≠ 0
case h.hb
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑(m ^ k !) ≠ 0
case h.hd m : ℕ hm : 0 < m k p_k : ℕ h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !) ⊢ ↑m ^ (k + 1)! ≠ 0
[PROOFSTEP]
all_goals positivity
[GOAL]
case h.hb
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑(m ^ k !) * ↑m ^ (k + 1)! ≠ 0
[PROOFSTEP]
positivity
[GOAL]
case h.hd
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑(m ^ (Nat.succ k)!) ≠ 0
[PROOFSTEP]
positivity
[GOAL]
case h.hb
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑(m ^ k !) ≠ 0
[PROOFSTEP]
positivity
[GOAL]
case h.hd
m : ℕ
hm : 0 < m
k p_k : ℕ
h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)
⊢ ↑m ^ (k + 1)! ≠ 0
[PROOFSTEP]
positivity
[GOAL]
m : ℕ
hm : 2 ≤ m
⊢ Liouville (liouvilleNumber ↑m)
[PROOFSTEP]
have mZ1 : 1 < (m : ℤ) := by norm_cast
[GOAL]
m : ℕ
hm : 2 ≤ m
⊢ 1 < ↑m
[PROOFSTEP]
norm_cast
[GOAL]
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
⊢ Liouville (liouvilleNumber ↑m)
[PROOFSTEP]
have m1 : 1 < (m : ℝ) := by norm_cast
[GOAL]
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
⊢ 1 < ↑m
[PROOFSTEP]
norm_cast
[GOAL]
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
⊢ Liouville (liouvilleNumber ↑m)
[PROOFSTEP]
intro n
[GOAL]
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n : ℕ
⊢ ∃ a b, 1 < b ∧ liouvilleNumber ↑m ≠ ↑a / ↑b ∧ |liouvilleNumber ↑m - ↑a / ↑b| < 1 / ↑b ^ n
[PROOFSTEP]
rcases partialSum_eq_rat (zero_lt_two.trans_le hm) n with ⟨p, hp⟩
[GOAL]
case intro
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑(m ^ n !)
⊢ ∃ a b, 1 < b ∧ liouvilleNumber ↑m ≠ ↑a / ↑b ∧ |liouvilleNumber ↑m - ↑a / ↑b| < 1 / ↑b ^ n
[PROOFSTEP]
refine' ⟨p, m ^ n !, by rw [Nat.cast_pow]; exact one_lt_pow mZ1 n.factorial_ne_zero, _⟩
[GOAL]
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑(m ^ n !)
⊢ 1 < ↑(m ^ n !)
[PROOFSTEP]
rw [Nat.cast_pow]
[GOAL]
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑(m ^ n !)
⊢ 1 < ↑m ^ n !
[PROOFSTEP]
exact one_lt_pow mZ1 n.factorial_ne_zero
[GOAL]
case intro
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑(m ^ n !)
⊢ liouvilleNumber ↑m ≠ ↑↑p / ↑↑(m ^ n !) ∧ |liouvilleNumber ↑m - ↑↑p / ↑↑(m ^ n !)| < 1 / ↑↑(m ^ n !) ^ n
[PROOFSTEP]
push_cast
[GOAL]
case intro
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑(m ^ n !)
⊢ liouvilleNumber ↑m ≠ ↑p / ↑m ^ n ! ∧ |liouvilleNumber ↑m - ↑p / ↑m ^ n !| < 1 / (↑m ^ n !) ^ n
[PROOFSTEP]
rw [Nat.cast_pow] at hp
[GOAL]
case intro
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑m ^ n !
⊢ liouvilleNumber ↑m ≠ ↑p / ↑m ^ n ! ∧ |liouvilleNumber ↑m - ↑p / ↑m ^ n !| < 1 / (↑m ^ n !) ^ n
[PROOFSTEP]
rw [← partialSum_add_remainder m1 n, ← hp]
[GOAL]
case intro
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑m ^ n !
⊢ partialSum (↑m) n + remainder (↑m) n ≠ partialSum (↑m) n ∧
    |partialSum (↑m) n + remainder (↑m) n - partialSum (↑m) n| < 1 / (↑m ^ n !) ^ n
[PROOFSTEP]
have hpos := remainder_pos m1 n
[GOAL]
case intro
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑m ^ n !
hpos : 0 < remainder (↑m) n
⊢ partialSum (↑m) n + remainder (↑m) n ≠ partialSum (↑m) n ∧
    |partialSum (↑m) n + remainder (↑m) n - partialSum (↑m) n| < 1 / (↑m ^ n !) ^ n
[PROOFSTEP]
simpa [abs_of_pos hpos, hpos.ne'] using @remainder_lt n m (by assumption_mod_cast)
[GOAL]
m : ℕ
hm : 2 ≤ m
mZ1 : 1 < ↑m
m1 : 1 < ↑m
n p : ℕ
hp : partialSum (↑m) n = ↑p / ↑m ^ n !
hpos : 0 < remainder (↑m) n
⊢ 2 ≤ ↑m
[PROOFSTEP]
assumption_mod_cast