Theorem: PadicSeq.norm_nonarchimedean
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: have : 0 ≤ max f.norm g.norm := le_max_of_le_left (norm_nonneg _)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : f + g ≈ 0
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: simpa only [hfg, norm]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : f + g ≈ 0
this : 0 ≤ max (norm f) (norm g)
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: have hcfg : (f + g).norm = g.norm := norm_equiv hfg'
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : f ≈ 0
hfg' : f + g ≈ g
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: have hcl : f.norm = 0 := (norm_zero_iff f).2 hf
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : f ≈ 0
hfg' : f + g ≈ g
hcfg : norm (f + g) = norm g
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: have : max f.norm g.norm = g.norm := by rw [hcl]; exact max_eq_right (norm_nonneg _)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : f ≈ 0
hfg' : f + g ≈ g
hcfg : norm (f + g) = norm g
hcl : norm f = 0
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: rw [this, hcfg]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : f ≈ 0
hfg' : f + g ≈ g
hcfg : norm (f + g) = norm g
hcl : norm f = 0
this : max (norm f) (norm g) = norm g
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: change LimZero (f - 0) at hf
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : f ≈ 0
⊢ f + g ≈ g

tactic: show LimZero (f + g - g)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : LimZero (f - 0)
⊢ f + g ≈ g

tactic: simpa only [sub_zero, add_sub_cancel] using hf
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : LimZero (f - 0)
⊢ LimZero (f + g - g)

tactic: rw [hcl]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : f ≈ 0
hfg' : f + g ≈ g
hcfg : norm (f + g) = norm g
hcl : norm f = 0
⊢ max (norm f) (norm g) = norm g

tactic: exact max_eq_right (norm_nonneg _)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : f ≈ 0
hfg' : f + g ≈ g
hcfg : norm (f + g) = norm g
hcl : norm f = 0
⊢ max 0 (norm g) = norm g

tactic: have hcfg : (f + g).norm = f.norm := norm_equiv hfg'
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : g ≈ 0
hfg' : f + g ≈ f
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: have hcl : g.norm = 0 := (norm_zero_iff g).2 hg
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : g ≈ 0
hfg' : f + g ≈ f
hcfg : norm (f + g) = norm f
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: have : max f.norm g.norm = f.norm := by rw [hcl]; exact max_eq_left (norm_nonneg _)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : g ≈ 0
hfg' : f + g ≈ f
hcfg : norm (f + g) = norm f
hcl : norm g = 0
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: rw [this, hcfg]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : g ≈ 0
hfg' : f + g ≈ f
hcfg : norm (f + g) = norm f
hcl : norm g = 0
this : max (norm f) (norm g) = norm f
⊢ norm (f + g) ≤ max (norm f) (norm g)

tactic: change LimZero (g - 0) at hg
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : g ≈ 0
⊢ f + g ≈ f

tactic: show LimZero (f + g - f)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : LimZero (g - 0)
⊢ f + g ≈ f

tactic: simpa only [add_sub_cancel', sub_zero] using hg
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : LimZero (g - 0)
⊢ LimZero (f + g - f)

tactic: rw [hcl]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : g ≈ 0
hfg' : f + g ≈ f
hcfg : norm (f + g) = norm f
hcl : norm g = 0
⊢ max (norm f) (norm g) = norm f

tactic: exact max_eq_left (norm_nonneg _)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
f g : PadicSeq p
hfg : ¬f + g ≈ 0
hf : ¬f ≈ 0
hg : g ≈ 0
hfg' : f + g ≈ f
hcfg : norm (f + g) = norm f
hcl : norm g = 0
⊢ max (norm f) 0 = norm f