{"text": "[GOAL]\nn : ℕ\nx : ℤ\n⊢ (↑n + 1) * x = x + ↑n * x\n[PROOFSTEP]\nrw [Int.add_mul, Int.add_comm, Int.one_mul]\n[GOAL]\nx✝¹ : ℕ\nx✝ : ℤ\n⊢ (fun n x => x ^ n) (x✝¹ + 1) x✝ = x✝ * (fun n x => x ^ n) x✝¹ x✝\n[PROOFSTEP]\nrw [Int.mul_comm]\n[GOAL]\nx✝¹ : ℕ\nx✝ : ℤ\n⊢ (fun n x => x ^ n) (x✝¹ + 1) x✝ = (fun n x => x ^ n) x✝¹ x✝ * x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nm : ℕ\nn : ℤ\n⊢ (fun x x_1 => x * x_1) (ofNat (succ m)) n = n + (fun x x_1 => x * x_1) (ofNat m) n\n[PROOFSTEP]\nsimp only [ofNat_eq_coe, ofNat_succ, Int.add_mul, Int.add_comm, Int.one_mul]\n[GOAL]\nm : ℕ\nn : ℤ\n⊢ (fun x x_1 => x * x_1) -[m+1] n = -(fun x x_1 => x * x_1) (↑(succ m)) n\n[PROOFSTEP]\nsimp only [negSucc_coe, ofNat_succ, Int.neg_mul]\n[GOAL]\n⊢ AddCommMonoid ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ AddMonoid ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Monoid ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CommMonoid ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CommSemigroup ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Semigroup ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ AddCommGroup ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ AddGroup ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ AddCommSemigroup ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ AddSemigroup ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CommSemiring ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Semiring ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Ring ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Distrib ℤ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na : ℤ\n⊢ succ (-succ a) = -a\n[PROOFSTEP]\nrw [neg_succ, succ_pred]\n[GOAL]\na : ℤ\n⊢ -pred a = succ (-a)\n[PROOFSTEP]\nrw [neg_eq_iff_eq_neg.mp (neg_succ (-a)), neg_neg]\n[GOAL]\na : ℤ\n⊢ pred (-pred a) = -a\n[PROOFSTEP]\nrw [neg_pred, pred_succ]\n[GOAL]\nn : ℕ\nh : 0 < n\n⊢ ↑(n - 1) = ↑n - 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nh : 0 < zero\n⊢ ↑(zero - 1) = ↑zero - 1\ncase succ n✝ : ℕ h : 0 < Nat.succ n✝ ⊢ ↑(Nat.succ n✝ - 1) = ↑(Nat.succ n✝) - 1\n[PROOFSTEP]\ncases h\n[GOAL]\ncase succ\nn✝ : ℕ\nh : 0 < Nat.succ n✝\n⊢ ↑(Nat.succ n✝ - 1) = ↑(Nat.succ n✝) - 1\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℤ → Prop\ni : ℤ\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\n⊢ p i\n[PROOFSTEP]\ninduction i with\n| ofNat i =>\n induction i with\n | zero => exact hz\n | succ i ih => exact hp _ ih\n| negSucc i =>\n suffices ∀ n : ℕ, p (-n) from this (i + 1)\n intro n;\n induction n with\n | zero => simp [hz, Nat.cast_zero]\n | succ n ih => convert hn _ ih using 1; simp [sub_eq_neg_add]\n[GOAL]\np : ℤ → Prop\ni : ℤ\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\n⊢ p i\n[PROOFSTEP]\ninduction i with\n| ofNat i =>\n induction i with\n | zero => exact hz\n | succ i ih => exact hp _ ih\n| negSucc i =>\n suffices ∀ n : ℕ, p (-n) from this (i + 1)\n intro n;\n induction n with\n | zero => simp [hz, Nat.cast_zero]\n | succ n ih => convert hn _ ih using 1; simp [sub_eq_neg_add]\n[GOAL]\ncase ofNat\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ p (ofNat i)\n[PROOFSTEP]\n\n| ofNat i =>\n induction i with\n | zero => exact hz\n | succ i ih => exact hp _ ih\n[GOAL]\ncase ofNat\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ p (ofNat i)\n[PROOFSTEP]\ninduction i with\n| zero => exact hz\n| succ i ih => exact hp _ ih\n[GOAL]\ncase ofNat\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ p (ofNat i)\n[PROOFSTEP]\ninduction i with\n| zero => exact hz\n| succ i ih => exact hp _ ih\n[GOAL]\ncase ofNat.zero\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\n⊢ p (ofNat zero)\n[PROOFSTEP]\n\n| zero => exact hz\n[GOAL]\ncase ofNat.zero\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\n⊢ p (ofNat zero)\n[PROOFSTEP]\nexact hz\n[GOAL]\ncase ofNat.succ\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\nih : p (ofNat i)\n⊢ p (ofNat (Nat.succ i))\n[PROOFSTEP]\n\n| succ i ih => exact hp _ ih\n[GOAL]\ncase ofNat.succ\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\nih : p (ofNat i)\n⊢ p (ofNat (Nat.succ i))\n[PROOFSTEP]\nexact hp _ ih\n[GOAL]\ncase negSucc\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ p -[i+1]\n[PROOFSTEP]\n\n| negSucc i =>\n suffices ∀ n : ℕ, p (-n) from this (i + 1)\n intro n;\n induction n with\n | zero => simp [hz, Nat.cast_zero]\n | succ n ih => convert hn _ ih using 1; simp [sub_eq_neg_add]\n[GOAL]\ncase negSucc\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ p -[i+1]\n[PROOFSTEP]\nsuffices ∀ n : ℕ, p (-n) from this (i + 1)\n[GOAL]\ncase negSucc\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ ∀ (n : ℕ), p (-↑n)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase negSucc\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni n : ℕ\n⊢ p (-↑n)\n[PROOFSTEP]\ninduction n with\n| zero => simp [hz, Nat.cast_zero]\n| succ n ih => convert hn _ ih using 1; simp [sub_eq_neg_add]\n[GOAL]\ncase negSucc\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni n : ℕ\n⊢ p (-↑n)\n[PROOFSTEP]\ninduction n with\n| zero => simp [hz, Nat.cast_zero]\n| succ n ih => convert hn _ ih using 1; simp [sub_eq_neg_add]\n[GOAL]\ncase negSucc.zero\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ p (-↑zero)\n[PROOFSTEP]\n\n| zero => simp [hz, Nat.cast_zero]\n[GOAL]\ncase negSucc.zero\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni : ℕ\n⊢ p (-↑zero)\n[PROOFSTEP]\nsimp [hz, Nat.cast_zero]\n[GOAL]\ncase negSucc.succ\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni n : ℕ\nih : p (-↑n)\n⊢ p (-↑(Nat.succ n))\n[PROOFSTEP]\n\n| succ n ih => convert hn _ ih using 1; simp [sub_eq_neg_add]\n[GOAL]\ncase negSucc.succ\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni n : ℕ\nih : p (-↑n)\n⊢ p (-↑(Nat.succ n))\n[PROOFSTEP]\nconvert hn _ ih using 1\n[GOAL]\ncase h.e'_1\np : ℤ → Prop\nhz : p 0\nhp : ∀ (i : ℕ), p ↑i → p (↑i + 1)\nhn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1)\ni n : ℕ\nih : p (-↑n)\n⊢ -↑(Nat.succ n) = -↑n - 1\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\na b : ℤ\nm n : ℕ\nHa : -[m+1] < 0\nHb : 0 < ↑(Nat.succ n)\n⊢ ediv -[m+1] ↑(Nat.succ n) = -((- -[m+1] - 1) / ↑(Nat.succ n) + 1)\n[PROOFSTEP]\nrw [show (- -[m+1] : ℤ) = (m + 1 : ℤ) by rfl]\n[GOAL]\na b : ℤ\nm n : ℕ\nHa : -[m+1] < 0\nHb : 0 < ↑(Nat.succ n)\n⊢ - -[m+1] = ↑m + 1\n[PROOFSTEP]\nrfl\n[GOAL]\na b : ℤ\nm n : ℕ\nHa : -[m+1] < 0\nHb : 0 < ↑(Nat.succ n)\n⊢ ediv -[m+1] ↑(Nat.succ n) = -((↑m + 1 - 1) / ↑(Nat.succ n) + 1)\n[PROOFSTEP]\nrw [add_sub_cancel]\n[GOAL]\na b : ℤ\nm n : ℕ\nHa : -[m+1] < 0\nHb : 0 < ↑(Nat.succ n)\n⊢ ediv -[m+1] ↑(Nat.succ n) = -(↑m / ↑(Nat.succ n) + 1)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Basic", "llama_tokens": 4000, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8705972583359805, "lm_q2_score": 0.7461389930307512, "lm_q1q2_score": 0.6495865616701412}} {"text": "[GOAL]\nm : Type u_1\nn : Type u_2\nα : Type u_3\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\nA : Matrix n n α\nB : Matrix n m α\ninst✝ : Invertible A\n⊢ ⅟A * (A * B) = B\n[PROOFSTEP]\nrw [← Matrix.mul_assoc, invOf_mul_self, Matrix.one_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\nα : Type u_3\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\nA : Matrix n n α\nB : Matrix n m α\ninst✝ : Invertible A\n⊢ A * (⅟A * B) = B\n[PROOFSTEP]\nrw [← Matrix.mul_assoc, mul_invOf_self, Matrix.one_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\nα : Type u_3\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\nA : Matrix m n α\nB : Matrix n n α\ninst✝ : Invertible B\n⊢ A * ⅟B * B = A\n[PROOFSTEP]\nrw [Matrix.mul_assoc, invOf_mul_self, Matrix.mul_one]\n[GOAL]\nm : Type u_1\nn : Type u_2\nα : Type u_3\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\nA : Matrix m n α\nB : Matrix n n α\ninst✝ : Invertible B\n⊢ A * B * ⅟B = A\n[PROOFSTEP]\nrw [Matrix.mul_assoc, mul_invOf_self, Matrix.mul_one]\n", "meta": {"mathlib_filename": "Mathlib.Data.Matrix.Invertible", "llama_tokens": 505, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8740772351648677, "lm_q2_score": 0.743167997235783, "lm_q1q2_score": 0.6495862282868652}} {"text": "[GOAL]\np : Sort u_1\na : ℤ\nn : ℕ\nhn : Nat.ble 1 n = true\nH : OnModCases n a 0 p\n⊢ 0 ≤ toNat (a % ↑n) ∧ toNat (a % ↑n) < n ∧ a ≡ ↑(toNat (a % ↑n)) [ZMOD ↑n]\n[PROOFSTEP]\nhave := ofNat_pos.2 <| Nat.le_of_ble_eq_true hn\n[GOAL]\np : Sort u_1\na : ℤ\nn : ℕ\nhn : Nat.ble 1 n = true\nH : OnModCases n a 0 p\nthis : 0 < ↑n\n⊢ 0 ≤ toNat (a % ↑n) ∧ toNat (a % ↑n) < n ∧ a ≡ ↑(toNat (a % ↑n)) [ZMOD ↑n]\n[PROOFSTEP]\nhave nonneg := emod_nonneg a <| Int.ne_of_gt this\n[GOAL]\np : Sort u_1\na : ℤ\nn : ℕ\nhn : Nat.ble 1 n = true\nH : OnModCases n a 0 p\nthis : 0 < ↑n\nnonneg : 0 ≤ a % ↑n\n⊢ 0 ≤ toNat (a % ↑n) ∧ toNat (a % ↑n) < n ∧ a ≡ ↑(toNat (a % ↑n)) [ZMOD ↑n]\n[PROOFSTEP]\nrefine ⟨Nat.zero_le _, ?_, ?_⟩\n[GOAL]\ncase refine_1\np : Sort u_1\na : ℤ\nn : ℕ\nhn : Nat.ble 1 n = true\nH : OnModCases n a 0 p\nthis : 0 < ↑n\nnonneg : 0 ≤ a % ↑n\n⊢ toNat (a % ↑n) < n\n[PROOFSTEP]\nrw [Int.toNat_lt nonneg]\n[GOAL]\ncase refine_1\np : Sort u_1\na : ℤ\nn : ℕ\nhn : Nat.ble 1 n = true\nH : OnModCases n a 0 p\nthis : 0 < ↑n\nnonneg : 0 ≤ a % ↑n\n⊢ a % ↑n < ↑n\n[PROOFSTEP]\nexact Int.emod_lt_of_pos _ this\n[GOAL]\ncase refine_2\np : Sort u_1\na : ℤ\nn : ℕ\nhn : Nat.ble 1 n = true\nH : OnModCases n a 0 p\nthis : 0 < ↑n\nnonneg : 0 ≤ a % ↑n\n⊢ a ≡ ↑(toNat (a % ↑n)) [ZMOD ↑n]\n[PROOFSTEP]\nrw [Int.ModEq, Int.toNat_of_nonneg nonneg, emod_emod]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.ModCases", "llama_tokens": 770, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8539127529517043, "lm_q2_score": 0.7606506472514406, "lm_q1q2_score": 0.6495292882289734}} {"text": "[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nc : 𝕜 → 𝕜\nc' : 𝕜\nn : ℕ\nx : 𝕜\n⊢ HasStrictDerivAt (fun x => x ^ 0) (↑0 * x ^ (0 - 1)) x\n[PROOFSTEP]\nsimp [hasStrictDerivAt_const]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nc : 𝕜 → 𝕜\nc' : 𝕜\nn : ℕ\nx : 𝕜\n⊢ HasStrictDerivAt (fun x => x ^ 1) (↑1 * x ^ (1 - 1)) x\n[PROOFSTEP]\nsimpa using hasStrictDerivAt_id x\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nc : 𝕜 → 𝕜\nc' : 𝕜\nn✝ n : ℕ\nx : 𝕜\n⊢ HasStrictDerivAt (fun x => x ^ (n + 1 + 1)) (↑(n + 1 + 1) * x ^ (n + 1 + 1 - 1)) x\n[PROOFSTEP]\nsimpa [pow_succ', add_mul, mul_assoc] using (hasStrictDerivAt_pow (n + 1) x).mul (hasStrictDerivAt_id x)\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nc : 𝕜 → 𝕜\nc' : 𝕜\nn : ℕ\nhc : HasDerivAt c c' x\n⊢ HasDerivAt (fun y => c y ^ n) (↑n * c x ^ (n - 1) * c') x\n[PROOFSTEP]\nrw [← hasDerivWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nc : 𝕜 → 𝕜\nc' : 𝕜\nn : ℕ\nhc : HasDerivWithinAt c c' univ x\n⊢ HasDerivWithinAt (fun y => c y ^ n) (↑n * c x ^ (n - 1) * c') univ x\n[PROOFSTEP]\nexact hc.pow n\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Deriv.Pow", "llama_tokens": 1135, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867873410141, "lm_q2_score": 0.8128673201042493, "lm_q1q2_score": 0.6488199547685105}} {"text": "[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ns : Finset α\nP : Finpartition s\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\n⊢ 0 ≤ energy P G\n[PROOFSTEP]\nrefine' div_nonneg (Finset.sum_nonneg fun _ _ => sq_nonneg _) <| sq_nonneg _\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ns : Finset α\nP : Finpartition s\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\n⊢ ↑(card (offDiag P.parts)) ≤ 1 * ↑(card P.parts) ^ 2\n[PROOFSTEP]\nrw [offDiag_card, one_mul]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ns : Finset α\nP : Finpartition s\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\n⊢ ↑(card P.parts * card P.parts - card P.parts) ≤ ↑(card P.parts) ^ 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ns : Finset α\nP : Finpartition s\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\n⊢ card P.parts * card P.parts - card P.parts ≤ card P.parts ^ 2\n[PROOFSTEP]\nrw [sq]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ns : Finset α\nP : Finpartition s\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\n⊢ card P.parts * card P.parts - card P.parts ≤ card P.parts * card P.parts\n[PROOFSTEP]\nexact tsub_le_self\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ns : Finset α\nP : Finpartition s\nG : SimpleGraph α\ninst✝¹ : DecidableRel G.Adj\n𝕜 : Type u_2\ninst✝ : LinearOrderedField 𝕜\n⊢ ↑(energy P G) = (∑ uv in offDiag P.parts, ↑(SimpleGraph.edgeDensity G uv.fst uv.snd) ^ 2) / ↑(card P.parts) ^ 2\n[PROOFSTEP]\nrw [energy]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ns : Finset α\nP : Finpartition s\nG : SimpleGraph α\ninst✝¹ : DecidableRel G.Adj\n𝕜 : Type u_2\ninst✝ : LinearOrderedField 𝕜\n⊢ ↑((∑ uv in offDiag P.parts, SimpleGraph.edgeDensity G uv.fst uv.snd ^ 2) / ↑(card P.parts) ^ 2) =\n (∑ uv in offDiag P.parts, ↑(SimpleGraph.edgeDensity G uv.fst uv.snd) ^ 2) / ↑(card P.parts) ^ 2\n[PROOFSTEP]\nnorm_cast\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Regularity.Energy", "llama_tokens": 845, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424334245618, "lm_q2_score": 0.7662936377487304, "lm_q1q2_score": 0.6482403046349205}} {"text": "[GOAL]\nX Y : TopCat\nf : X ⟶ Y\n⊢ Epi f ↔ Function.Surjective ↑f\n[PROOFSTEP]\nsuffices Epi f ↔ Epi ((forget TopCat).map f)\n by\n rw [this, CategoryTheory.epi_iff_surjective]\n rfl\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nthis : Epi f ↔ Epi ((forget TopCat).map f)\n⊢ Epi f ↔ Function.Surjective ↑f\n[PROOFSTEP]\nrw [this, CategoryTheory.epi_iff_surjective]\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nthis : Epi f ↔ Epi ((forget TopCat).map f)\n⊢ Function.Surjective ((forget TopCat).map f) ↔ Function.Surjective ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\n⊢ Epi f ↔ Epi ((forget TopCat).map f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX Y : TopCat\nf : X ⟶ Y\n⊢ Epi f → Epi ((forget TopCat).map f)\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nX Y : TopCat\nf : X ⟶ Y\na✝ : Epi f\n⊢ Epi ((forget TopCat).map f)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mpr\nX Y : TopCat\nf : X ⟶ Y\n⊢ Epi ((forget TopCat).map f) → Epi f\n[PROOFSTEP]\napply Functor.epi_of_epi_map\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\n⊢ Mono f ↔ Function.Injective ↑f\n[PROOFSTEP]\nsuffices Mono f ↔ Mono ((forget TopCat).map f)\n by\n rw [this, CategoryTheory.mono_iff_injective]\n rfl\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nthis : Mono f ↔ Mono ((forget TopCat).map f)\n⊢ Mono f ↔ Function.Injective ↑f\n[PROOFSTEP]\nrw [this, CategoryTheory.mono_iff_injective]\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nthis : Mono f ↔ Mono ((forget TopCat).map f)\n⊢ Function.Injective ((forget TopCat).map f) ↔ Function.Injective ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\n⊢ Mono f ↔ Mono ((forget TopCat).map f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX Y : TopCat\nf : X ⟶ Y\n⊢ Mono f → Mono ((forget TopCat).map f)\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nX Y : TopCat\nf : X ⟶ Y\na✝ : Mono f\n⊢ Mono ((forget TopCat).map f)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mpr\nX Y : TopCat\nf : X ⟶ Y\n⊢ Mono ((forget TopCat).map f) → Mono f\n[PROOFSTEP]\napply Functor.mono_of_mono_map\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.TopCat.EpiMono", "llama_tokens": 876, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835371034368, "lm_q2_score": 0.7745833841649233, "lm_q1q2_score": 0.6471516655836603}} {"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\na b x : (i : ι) → α i\n⊢ x ∈ (fun a b => piFinset fun i => Icc (a i) (b i)) a b ↔ a ≤ x ∧ x ≤ b\n[PROOFSTEP]\nsimp_rw [mem_piFinset, mem_Icc, le_def, forall_and]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\na b : (i : ι) → α i\n⊢ Finset.card (Ico a b) = ∏ i : ι, Finset.card (Icc (a i) (b i)) - 1\n[PROOFSTEP]\nrw [card_Ico_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\na b : (i : ι) → α i\n⊢ Finset.card (Ioc a b) = ∏ i : ι, Finset.card (Icc (a i) (b i)) - 1\n[PROOFSTEP]\nrw [card_Ioc_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\na b : (i : ι) → α i\n⊢ Finset.card (Ioo a b) = ∏ i : ι, Finset.card (Icc (a i) (b i)) - 2\n[PROOFSTEP]\nrw [card_Ioo_eq_card_Icc_sub_two, card_Icc]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrderBot (α i)\nb✝ b x : (i : ι) → α i\n⊢ x ∈ (fun b => piFinset fun i => Iic (b i)) b ↔ x ≤ b\n[PROOFSTEP]\nsimp_rw [mem_piFinset, mem_Iic, le_def]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrderBot (α i)\nb : (i : ι) → α i\n⊢ Finset.card (Iio b) = ∏ i : ι, Finset.card (Iic (b i)) - 1\n[PROOFSTEP]\nrw [card_Iio_eq_card_Iic_sub_one, card_Iic]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrderTop (α i)\na✝ a x : (i : ι) → α i\n⊢ x ∈ (fun a => piFinset fun i => Ici (a i)) a ↔ a ≤ x\n[PROOFSTEP]\nsimp_rw [mem_piFinset, mem_Ici, le_def]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrderTop (α i)\na : (i : ι) → α i\n⊢ Finset.card (Ioi a) = ∏ i : ι, Finset.card (Ici (a i)) - 1\n[PROOFSTEP]\nrw [card_Ioi_eq_card_Ici_sub_one, card_Ici]\n", "meta": {"mathlib_filename": "Mathlib.Data.Pi.Interval", "llama_tokens": 1539, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8774767906859264, "lm_q2_score": 0.7371581626286834, "lm_q1q2_score": 0.6468391787713513}} {"text": "[GOAL]\nK : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nι₁ : Type u_4\nι₂ : Type u_5\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : Module K V₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module K V₂\ninst✝³ : Fintype ι₁\ninst✝² : Fintype ι₂\ninst✝¹ : DecidableEq ι₁\ninst✝ : DecidableEq ι₂\nB₁ : Basis ι₁ K V₁\nB₂ : Basis ι₂ K V₂\nu : V₁ →ₗ[K] V₂\n⊢ ↑(toMatrix (Basis.dualBasis B₂) (Basis.dualBasis B₁)) (↑Module.Dual.transpose u) = (↑(toMatrix B₁ B₂) u)ᵀ\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nK : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nι₁ : Type u_4\nι₂ : Type u_5\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : Module K V₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module K V₂\ninst✝³ : Fintype ι₁\ninst✝² : Fintype ι₂\ninst✝¹ : DecidableEq ι₁\ninst✝ : DecidableEq ι₂\nB₁ : Basis ι₁ K V₁\nB₂ : Basis ι₂ K V₂\nu : V₁ →ₗ[K] V₂\ni : ι₁\nj : ι₂\n⊢ ↑(toMatrix (Basis.dualBasis B₂) (Basis.dualBasis B₁)) (↑Module.Dual.transpose u) i j = (↑(toMatrix B₁ B₂) u)ᵀ i j\n[PROOFSTEP]\nsimp only [LinearMap.toMatrix_apply, Module.Dual.transpose_apply, B₁.dualBasis_repr, B₂.dualBasis_apply,\n Matrix.transpose_apply, LinearMap.comp_apply]\n[GOAL]\nK : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nι₁ : Type u_4\nι₂ : Type u_5\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : Module K V₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module K V₂\ninst✝³ : Fintype ι₁\ninst✝² : Fintype ι₂\ninst✝¹ : DecidableEq ι₁\ninst✝ : DecidableEq ι₂\nB₁ : Basis ι₁ K V₁\nB₂ : Basis ι₂ K V₂\nM : Matrix ι₁ ι₂ K\n⊢ ↑(toLin (Basis.dualBasis B₁) (Basis.dualBasis B₂)) Mᵀ = ↑Module.Dual.transpose (↑(toLin B₂ B₁) M)\n[PROOFSTEP]\napply (LinearMap.toMatrix B₁.dualBasis B₂.dualBasis).injective\n[GOAL]\ncase a\nK : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nι₁ : Type u_4\nι₂ : Type u_5\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : Module K V₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module K V₂\ninst✝³ : Fintype ι₁\ninst✝² : Fintype ι₂\ninst✝¹ : DecidableEq ι₁\ninst✝ : DecidableEq ι₂\nB₁ : Basis ι₁ K V₁\nB₂ : Basis ι₂ K V₂\nM : Matrix ι₁ ι₂ K\n⊢ ↑(LinearMap.toMatrix (Basis.dualBasis B₁) (Basis.dualBasis B₂))\n (↑(toLin (Basis.dualBasis B₁) (Basis.dualBasis B₂)) Mᵀ) =\n ↑(LinearMap.toMatrix (Basis.dualBasis B₁) (Basis.dualBasis B₂)) (↑Module.Dual.transpose (↑(toLin B₂ B₁) M))\n[PROOFSTEP]\nrw [LinearMap.toMatrix_toLin, LinearMap.toMatrix_transpose, LinearMap.toMatrix_toLin]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Dual", "llama_tokens": 1206, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.84997116805678, "lm_q2_score": 0.7606506472514406, "lm_q1q2_score": 0.6465311191274526}} {"text": "[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\n⊢ ∃ t, ∀ (i₀ i₁ : Fin n), t i₀ = t i₁ → ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nhave hb' : (0 : ℝ) < ↑(abs b) := Int.cast_pos.mpr (abs_pos.mpr hb)\n[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\n⊢ ∃ t, ∀ (i₀ i₁ : Fin n), t i₀ = t i₁ → ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nhave hbε : 0 < abs b • ε := by\n rw [Algebra.smul_def]\n exact mul_pos hb' hε\n[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\n⊢ 0 < |b| • ε\n[PROOFSTEP]\nrw [Algebra.smul_def]\n[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\n⊢ 0 < ↑(algebraMap ℤ ℝ) |b| * ε\n[PROOFSTEP]\nexact mul_pos hb' hε\n[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\n⊢ ∃ t, ∀ (i₀ i₁ : Fin n), t i₀ = t i₁ → ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nhave hfloor : ∀ i, 0 ≤ floor ((A i % b : ℤ) / abs b • ε : ℝ) := fun _ ↦\n floor_nonneg.mpr (div_nonneg (cast_nonneg.mpr (emod_nonneg _ hb)) hbε.le)\n[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\n⊢ ∃ t, ∀ (i₀ i₁ : Fin n), t i₀ = t i₁ → ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nrefine' ⟨fun i ↦ ⟨natAbs (floor ((A i % b : ℤ) / abs b • ε : ℝ)), _⟩, _⟩\n[GOAL]\ncase refine'_1\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni : Fin n\n⊢ natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊\n[PROOFSTEP]\nrw [← ofNat_lt, natAbs_of_nonneg (hfloor i), floor_lt]\n[GOAL]\ncase refine'_1\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni : Fin n\n⊢ ↑(A i % b) / |b| • ε < ↑↑⌈1 / ε⌉₊\n[PROOFSTEP]\napply lt_of_lt_of_le _ (Nat.le_ceil _)\n[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni : Fin n\n⊢ ↑(A i % b) / |b| • ε < 1 / ε\n[PROOFSTEP]\nrw [Algebra.smul_def, eq_intCast, ← div_div, div_lt_div_right hε, div_lt_iff hb', one_mul, cast_lt]\n[GOAL]\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni : Fin n\n⊢ A i % b < |b|\n[PROOFSTEP]\nexact Int.emod_lt _ hb\n[GOAL]\ncase refine'_2\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\n⊢ ∀ (i₀ i₁ : Fin n),\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₀ =\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₁ →\n ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nintro i₀ i₁ hi\n[GOAL]\ncase refine'_2\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni₀ i₁ : Fin n\nhi :\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₀ =\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₁\n⊢ ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nhave hi : (⌊↑(A i₀ % b) / abs b • ε⌋.natAbs : ℤ) = ⌊↑(A i₁ % b) / abs b • ε⌋.natAbs :=\n congr_arg ((↑) : ℕ → ℤ) (Fin.mk_eq_mk.mp hi)\n[GOAL]\ncase refine'_2\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni₀ i₁ : Fin n\nhi✝ :\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₀ =\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₁\nhi : ↑(natAbs ⌊↑(A i₀ % b) / |b| • ε⌋) = ↑(natAbs ⌊↑(A i₁ % b) / |b| • ε⌋)\n⊢ ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nrw [natAbs_of_nonneg (hfloor i₀), natAbs_of_nonneg (hfloor i₁)] at hi \n[GOAL]\ncase refine'_2\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni₀ i₁ : Fin n\nhi✝ :\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₀ =\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₁\nhi : ⌊↑(A i₀ % b) / |b| • ε⌋ = ⌊↑(A i₁ % b) / |b| • ε⌋\n⊢ ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nhave hi := abs_sub_lt_one_of_floor_eq_floor hi\n[GOAL]\ncase refine'_2\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni₀ i₁ : Fin n\nhi✝¹ :\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₀ =\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₁\nhi✝ : ⌊↑(A i₀ % b) / |b| • ε⌋ = ⌊↑(A i₁ % b) / |b| • ε⌋\nhi : |↑(A i₀ % b) / |b| • ε - ↑(A i₁ % b) / |b| • ε| < 1\n⊢ ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nrw [abs_sub_comm, ← sub_div, abs_div, abs_of_nonneg hbε.le, div_lt_iff hbε, one_mul] at hi \n[GOAL]\ncase refine'_2\nn : ℕ\nε : ℝ\nhε : 0 < ε\nb : ℤ\nhb : b ≠ 0\nA : Fin n → ℤ\nhb' : 0 < ↑|b|\nhbε : 0 < |b| • ε\nhfloor : ∀ (i : Fin n), 0 ≤ ⌊↑(A i % b) / |b| • ε⌋\ni₀ i₁ : Fin n\nhi✝¹ :\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₀ =\n (fun i => { val := natAbs ⌊↑(A i % b) / |b| • ε⌋, isLt := (_ : natAbs ⌊↑(A i % b) / |b| • ε⌋ < ⌈1 / ε⌉₊) }) i₁\nhi✝ : ⌊↑(A i₀ % b) / |b| • ε⌋ = ⌊↑(A i₁ % b) / |b| • ε⌋\nhi : |↑(A i₁ % b) - ↑(A i₀ % b)| < |b| • ε\n⊢ ↑|A i₁ % b - A i₀ % b| < |b| • ε\n[PROOFSTEP]\nrwa [Int.cast_abs, Int.cast_sub]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ClassNumber.AdmissibleAbs", "llama_tokens": 4072, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9086179068309441, "lm_q2_score": 0.7090191337850933, "lm_q1q2_score": 0.6442274812429006}} {"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E →L[𝕜] F\nx : E\n⊢ ⊤ ≤ FormalMultilinearSeries.radius (fpowerSeries f x)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E →L[𝕜] F\nx y✝ : E\nx✝ : y✝ ∈ EMetric.ball 0 ⊤\n⊢ HasSum (fun n => ↑(fpowerSeries f x (n + 2)) fun x => y✝)\n (↑f (x + y✝) - ∑ i in Finset.range 2, ↑(fpowerSeries f x i) fun x => y✝)\n[PROOFSTEP]\nsimp [Finset.sum_range_succ, ← sub_sub, hasSum_zero, fpowerSeries]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E →L[𝕜] F →L[𝕜] G\nx : E × F\n⊢ ⊤ ≤ FormalMultilinearSeries.radius (fpowerSeriesBilinear f x)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E →L[𝕜] F →L[𝕜] G\nx y✝ : E × F\nx✝ : y✝ ∈ EMetric.ball 0 ⊤\n⊢ HasSum (fun n => ↑(fpowerSeriesBilinear f x (n + 3)) fun x => y✝)\n (↑(↑f (x + y✝).fst) (x + y✝).snd - ∑ i in Finset.range 3, ↑(fpowerSeriesBilinear f x i) fun x => y✝)\n[PROOFSTEP]\nsimp only [Finset.sum_range_succ, Finset.sum_range_one, Prod.fst_add, Prod.snd_add, f.map_add_add]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E →L[𝕜] F →L[𝕜] G\nx y✝ : E × F\nx✝ : y✝ ∈ EMetric.ball 0 ⊤\n⊢ HasSum (fun n => ↑(fpowerSeriesBilinear f x (n + 3)) fun x => y✝)\n (↑(↑f x.fst) x.snd + ↑(↑(deriv₂ f) (x.fst, x.snd)) (y✝.fst, y✝.snd) + ↑(↑f y✝.fst) y✝.snd -\n ((((∑ x_1 in Finset.range 0, ↑(fpowerSeriesBilinear f x x_1) fun x => y✝) +\n ↑(fpowerSeriesBilinear f x 0) fun x => y✝) +\n ↑(fpowerSeriesBilinear f x 1) fun x => y✝) +\n ↑(fpowerSeriesBilinear f x 2) fun x => y✝))\n[PROOFSTEP]\nsimp [fpowerSeriesBilinear, hasSum_zero]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Analytic.Linear", "llama_tokens": 1378, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8918110339361275, "lm_q2_score": 0.7217431943271999, "lm_q1q2_score": 0.6436585443693036}} {"text": "[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\n⊢ card ↑(derangements (Fin (n + 2))) =\n (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))\n[PROOFSTEP]\nhave h1 : ∀ a : Fin (n + 1), card ({ a }ᶜ : Set (Fin (n + 1))) = card (Fin n) :=\n by\n intro a\n simp only [Fintype.card_fin, Finset.card_fin, Fintype.card_ofFinset, Finset.filter_ne' _ a,\n Set.mem_compl_singleton_iff, Finset.card_erase_of_mem (Finset.mem_univ a), add_tsub_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\n⊢ ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\na : Fin (n + 1)\n⊢ card ↑{a}ᶜ = card (Fin n)\n[PROOFSTEP]\nsimp only [Fintype.card_fin, Finset.card_fin, Fintype.card_ofFinset, Finset.filter_ne' _ a, Set.mem_compl_singleton_iff,\n Finset.card_erase_of_mem (Finset.mem_univ a), add_tsub_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nh1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)\n⊢ card ↑(derangements (Fin (n + 2))) =\n (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))\n[PROOFSTEP]\nhave h2 : card (Fin (n + 2)) = card (Option (Fin (n + 1))) := by\n simp only [card_fin, card_option]\n -- rewrite the LHS and substitute in our fintype-level equivalence\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nh1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)\n⊢ card (Fin (n + 2)) = card (Option (Fin (n + 1)))\n[PROOFSTEP]\nsimp only [card_fin, card_option]\n -- rewrite the LHS and substitute in our fintype-level equivalence\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nh1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)\nh2 : card (Fin (n + 2)) = card (Option (Fin (n + 1)))\n⊢ card ↑(derangements (Fin (n + 2))) =\n (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))\n[PROOFSTEP]\nsimp only [card_derangements_invariant h2, card_congr (@derangementsRecursionEquiv (Fin (n + 1)) _),\n -- push the cardinality through the Σ and ⊕ so that we can use `card_n`card_sigma, card_sum,\n card_derangements_invariant (h1 _), Finset.sum_const, nsmul_eq_mul, Finset.card_fin, mul_add, Nat.cast_id]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\n⊢ ↑(numDerangements (n + 1)) = (↑n + 1) * ↑(numDerangements n) - (-1) ^ n\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n⊢ ↑(numDerangements (Nat.zero + 1)) = (↑Nat.zero + 1) * ↑(numDerangements Nat.zero) - (-1) ^ Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhn : ↑(numDerangements (n + 1)) = (↑n + 1) * ↑(numDerangements n) - (-1) ^ n\n⊢ ↑(numDerangements (Nat.succ n + 1)) = (↑(Nat.succ n) + 1) * ↑(numDerangements (Nat.succ n)) - (-1) ^ Nat.succ n\n[PROOFSTEP]\nsimp only [numDerangements_add_two, hn, pow_succ, Int.ofNat_mul, Int.ofNat_add, Int.ofNat_succ]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhn : ↑(numDerangements (n + 1)) = (↑n + 1) * ↑(numDerangements n) - (-1) ^ n\n⊢ (↑n + 1) * (↑(numDerangements n) + ((↑n + 1) * ↑(numDerangements n) - (-1) ^ n)) =\n (↑n + 1 + 1) * ((↑n + 1) * ↑(numDerangements n) - (-1) ^ n) - -1 * (-1) ^ n\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\n⊢ card ↑(derangements (Fin n)) = numDerangements n\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n hyp\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhyp : ∀ (m : ℕ), m < n → card ↑(derangements (Fin m)) = numDerangements m\n⊢ card ↑(derangements (Fin n)) = numDerangements n\n[PROOFSTEP]\nrcases n with _ | _ | n\n[GOAL]\ncase h.zero\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nhyp : ∀ (m : ℕ), m < Nat.zero → card ↑(derangements (Fin m)) = numDerangements m\n⊢ card ↑(derangements (Fin Nat.zero)) = numDerangements Nat.zero\n[PROOFSTEP]\nconvert_to card ↑{f : Perm (Fin 0) | ∀ (x : Fin 0), f x ≠ x} = _ using 2\n[GOAL]\ncase h.zero.convert_2\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nhyp : ∀ (m : ℕ), m < Nat.zero → card ↑(derangements (Fin m)) = numDerangements m\n⊢ card ↑{f | ∀ (x : Fin 0), ↑f x ≠ x} = numDerangements Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ.zero\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nhyp : ∀ (m : ℕ), m < Nat.succ Nat.zero → card ↑(derangements (Fin m)) = numDerangements m\n⊢ card ↑(derangements (Fin (Nat.succ Nat.zero))) = numDerangements (Nat.succ Nat.zero)\n[PROOFSTEP]\nconvert_to card ↑{f : Perm (Fin 1) | ∀ (x : Fin 1), f x ≠ x} = _ using 2\n[GOAL]\ncase h.succ.zero.convert_2\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nhyp : ∀ (m : ℕ), m < Nat.succ Nat.zero → card ↑(derangements (Fin m)) = numDerangements m\n⊢ card ↑{f | ∀ (x : Fin 1), ↑f x ≠ x} = numDerangements (Nat.succ Nat.zero)\n[PROOFSTEP]\nrfl\n -- knock out cases 0 and 1\n -- now we have n ≥ 2. rewrite everything in terms of card_derangements, so that we can use\n -- `card_derangements_fin_add_two`\n[GOAL]\ncase h.succ.succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhyp : ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → card ↑(derangements (Fin m)) = numDerangements m\n⊢ card ↑(derangements (Fin (Nat.succ (Nat.succ n)))) = numDerangements (Nat.succ (Nat.succ n))\n[PROOFSTEP]\nrw [numDerangements_add_two, card_derangements_fin_add_two, mul_add, hyp _ (Nat.lt_add_of_pos_right zero_lt_two),\n hyp _ (lt_add_one _)]\n[GOAL]\nα✝ : Type u_1\ninst✝³ : DecidableEq α✝\ninst✝² : Fintype α✝\nα : Type u_2\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ card ↑(derangements α) = numDerangements (card α)\n[PROOFSTEP]\nrw [← card_derangements_invariant (card_fin _)]\n[GOAL]\nα✝ : Type u_1\ninst✝³ : DecidableEq α✝\ninst✝² : Fintype α✝\nα : Type u_2\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ card ↑(derangements (Fin (card α))) = numDerangements (card α)\n[PROOFSTEP]\nexact card_derangements_fin_eq_numDerangements\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\n⊢ ↑(numDerangements n) = ∑ k in Finset.range (n + 1), (-1) ^ k * ↑(Nat.ascFactorial k (n - k))\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n⊢ ↑(numDerangements Nat.zero) = ∑ k in Finset.range (Nat.zero + 1), (-1) ^ k * ↑(Nat.ascFactorial k (Nat.zero - k))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhn : ↑(numDerangements n) = ∑ k in Finset.range (n + 1), (-1) ^ k * ↑(Nat.ascFactorial k (n - k))\n⊢ ↑(numDerangements (Nat.succ n)) =\n ∑ k in Finset.range (Nat.succ n + 1), (-1) ^ k * ↑(Nat.ascFactorial k (Nat.succ n - k))\n[PROOFSTEP]\nrw [Finset.sum_range_succ, numDerangements_succ, hn, Finset.mul_sum, tsub_self, Nat.ascFactorial_zero, Int.ofNat_one,\n mul_one, pow_succ, neg_one_mul, sub_eq_add_neg, add_left_inj, Finset.sum_congr rfl]\n -- show that (n + 1) * (-1)^x * asc_fac x (n - x) = (-1)^x * asc_fac x (n.succ - x)\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhn : ↑(numDerangements n) = ∑ k in Finset.range (n + 1), (-1) ^ k * ↑(Nat.ascFactorial k (n - k))\n⊢ ∀ (x : ℕ),\n x ∈ Finset.range (n + 1) →\n (↑n + 1) * ((-1) ^ x * ↑(Nat.ascFactorial x (n - x))) = (-1) ^ x * ↑(Nat.ascFactorial x (Nat.succ n - x))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhn : ↑(numDerangements n) = ∑ k in Finset.range (n + 1), (-1) ^ k * ↑(Nat.ascFactorial k (n - k))\nx : ℕ\nhx : x ∈ Finset.range (n + 1)\n⊢ (↑n + 1) * ((-1) ^ x * ↑(Nat.ascFactorial x (n - x))) = (-1) ^ x * ↑(Nat.ascFactorial x (Nat.succ n - x))\n[PROOFSTEP]\nhave h_le : x ≤ n := Finset.mem_range_succ_iff.mp hx\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nn : ℕ\nhn : ↑(numDerangements n) = ∑ k in Finset.range (n + 1), (-1) ^ k * ↑(Nat.ascFactorial k (n - k))\nx : ℕ\nhx : x ∈ Finset.range (n + 1)\nh_le : x ≤ n\n⊢ (↑n + 1) * ((-1) ^ x * ↑(Nat.ascFactorial x (n - x))) = (-1) ^ x * ↑(Nat.ascFactorial x (Nat.succ n - x))\n[PROOFSTEP]\nrw [Nat.succ_sub h_le, Nat.ascFactorial_succ, add_tsub_cancel_of_le h_le, Int.ofNat_mul, Int.ofNat_succ, mul_left_comm]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Derangements.Finite", "llama_tokens": 4050, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424373085145, "lm_q2_score": 0.7606506581031359, "lm_q1q2_score": 0.6434666716560924}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\ns : Multiset α\na✝ : α\nl : List α\na : α\nh : a ∈ Quotient.mk (List.isSetoid α) l\n⊢ a ∣ prod (Quotient.mk (List.isSetoid α) l)\n[PROOFSTEP]\nsimpa using List.dvd_prod h\n[GOAL]\nα : Type u_1\ninst✝ : CanonicallyOrderedMonoid α\nm : Multiset α\nl : List α\n⊢ prod (Quotient.mk (List.isSetoid α) l) = 1 ↔ ∀ (x : α), x ∈ Quotient.mk (List.isSetoid α) l → x = 1\n[PROOFSTEP]\nsimpa using List.prod_eq_one_iff l\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CanonicallyOrderedCommSemiring R\ninst✝ : Nontrivial R\nm : Multiset R\n⊢ 0 < Multiset.prod m ↔ ∀ (x : R), x ∈ m → 0 < x\n[PROOFSTEP]\nrcases m with ⟨l⟩\n[GOAL]\ncase mk\nα : Type u_1\nR : Type u_2\ninst✝¹ : CanonicallyOrderedCommSemiring R\ninst✝ : Nontrivial R\nm : Multiset R\nl : List R\n⊢ 0 < Multiset.prod (Quot.mk Setoid.r l) ↔ ∀ (x : R), x ∈ Quot.mk Setoid.r l → 0 < x\n[PROOFSTEP]\nrw [Multiset.quot_mk_to_coe'', Multiset.coe_prod]\n[GOAL]\ncase mk\nα : Type u_1\nR : Type u_2\ninst✝¹ : CanonicallyOrderedCommSemiring R\ninst✝ : Nontrivial R\nm : Multiset R\nl : List R\n⊢ 0 < List.prod l ↔ ∀ (x : R), x ∈ ↑l → 0 < x\n[PROOFSTEP]\nexact CanonicallyOrderedCommSemiring.list_prod_pos\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalNonAssocSemiring α\ns : Multiset α\na : α\nh : ∀ (b : α), b ∈ s → Commute a b\n⊢ Commute a (sum s)\n[PROOFSTEP]\ninduction s using Quotient.inductionOn\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : NonUnitalNonAssocSemiring α\ns : Multiset α\na : α\na✝ : List α\nh : ∀ (b : α), b ∈ Quotient.mk (List.isSetoid α) a✝ → Commute a b\n⊢ Commute a (sum (Quotient.mk (List.isSetoid α) a✝))\n[PROOFSTEP]\nrw [quot_mk_to_coe, coe_sum]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : NonUnitalNonAssocSemiring α\ns : Multiset α\na : α\na✝ : List α\nh : ∀ (b : α), b ∈ Quotient.mk (List.isSetoid α) a✝ → Commute a b\n⊢ Commute a (List.sum a✝)\n[PROOFSTEP]\nexact Commute.list_sum_right _ _ h\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Multiset.Lemmas", "llama_tokens": 907, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245828938679, "lm_q2_score": 0.7718435083355187, "lm_q1q2_score": 0.6431961696430358}} {"text": "[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nE : Type u_3\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedField 𝕜'\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜' E\nr : ℝ\nc : ↑(closedBall 0 1)\nx : ↑(ball 0 r)\n⊢ ‖↑c • ↑x‖ < r\n[PROOFSTEP]\nsimpa only [norm_smul, one_mul] using\n mul_lt_mul' (mem_closedBall_zero_iff.1 c.2) (mem_ball_zero_iff.1 x.2) (norm_nonneg _) one_pos\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nE : Type u_3\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedField 𝕜'\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜' E\nr : ℝ\nc : ↑(closedBall 0 1)\nx : ↑(closedBall 0 r)\n⊢ ‖↑c • ↑x‖ ≤ r\n[PROOFSTEP]\nsimpa only [norm_smul, one_mul] using\n mul_le_mul (mem_closedBall_zero_iff.1 c.2) (mem_closedBall_zero_iff.1 x.2) (norm_nonneg _) zero_le_one\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nE : Type u_3\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedField 𝕜'\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜' E\nr : ℝ\nc : ↑(sphere 0 1)\nx : ↑(sphere 0 r)\n⊢ ‖↑c • ↑x‖ = r\n[PROOFSTEP]\nrw [norm_smul, mem_sphere_zero_iff_norm.1 c.coe_prop, mem_sphere_zero_iff_norm.1 x.coe_prop, one_mul]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nE : Type u_3\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedField 𝕜'\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜' E\nr✝ : ℝ\ninst✝ : CharZero 𝕜\nr : ℝ\nhr : r ≠ 0\nx : ↑(sphere 0 r)\nh : x = -x\n⊢ ↑x = -↑x\n[PROOFSTEP]\nconv_lhs => rw [h]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nE : Type u_3\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedField 𝕜'\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜' E\nr✝ : ℝ\ninst✝ : CharZero 𝕜\nr : ℝ\nhr : r ≠ 0\nx : ↑(sphere 0 r)\nh : x = -x\n| ↑x\n[PROOFSTEP]\nrw [h]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nE : Type u_3\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedField 𝕜'\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜' E\nr✝ : ℝ\ninst✝ : CharZero 𝕜\nr : ℝ\nhr : r ≠ 0\nx : ↑(sphere 0 r)\nh : x = -x\n| ↑x\n[PROOFSTEP]\nrw [h]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nE : Type u_3\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedField 𝕜'\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜' E\nr✝ : ℝ\ninst✝ : CharZero 𝕜\nr : ℝ\nhr : r ≠ 0\nx : ↑(sphere 0 r)\nh : x = -x\n| ↑x\n[PROOFSTEP]\nrw [h]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.BallAction", "llama_tokens": 1265, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267660487573, "lm_q2_score": 0.7401743735019595, "lm_q1q2_score": 0.6430833072418725}} {"text": "[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ x ∈ antidiagonal n ↔ x.fst + x.snd = n\n[PROOFSTEP]\nrw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal]\n[GOAL]\nn : ℕ\n⊢ ↑card (antidiagonal n) = n + 1\n[PROOFSTEP]\nrw [antidiagonal, coe_card, List.Nat.length_antidiagonal]\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 1) = (0, n + 1) ::ₘ map (Prod.map Nat.succ id) (antidiagonal n)\n[PROOFSTEP]\nsimp only [antidiagonal, List.Nat.antidiagonal_succ, coe_map, cons_coe]\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 1) = (n + 1, 0) ::ₘ map (Prod.map id Nat.succ) (antidiagonal n)\n[PROOFSTEP]\nrw [antidiagonal, List.Nat.antidiagonal_succ', ← coe_add, add_comm, antidiagonal, coe_map, coe_add,\n List.singleton_append, cons_coe]\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 2) = (0, n + 2) ::ₘ (n + 2, 0) ::ₘ map (Prod.map Nat.succ Nat.succ) (antidiagonal n)\n[PROOFSTEP]\nrw [antidiagonal_succ, antidiagonal_succ', map_cons, map_map, Prod_map]\n[GOAL]\nn : ℕ\n⊢ (0, n + 1 + 1) ::ₘ\n (Nat.succ (n + 1, 0).fst, id (n + 1, 0).snd) ::ₘ\n map (Prod.map Nat.succ id ∘ Prod.map id Nat.succ) (antidiagonal n) =\n (0, n + 2) ::ₘ (n + 2, 0) ::ₘ map (Prod.map Nat.succ Nat.succ) (antidiagonal n)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ map Prod.swap (antidiagonal n) = antidiagonal n\n[PROOFSTEP]\nrw [antidiagonal, coe_map, List.Nat.map_swap_antidiagonal, coe_reverse]\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.NatAntidiagonal", "llama_tokens": 682, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289387914176258, "lm_q2_score": 0.7745833789613196, "lm_q1q2_score": 0.6420822100083771}} {"text": "[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nσ : Type u_4\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring A\ninst✝⁴ : CommSemiring B\ninst✝³ : Algebra R A\ninst✝² : Algebra A B\ninst✝¹ : Algebra R B\ninst✝ : IsScalarTower R A B\nx : σ → B\np : MvPolynomial σ R\n⊢ ↑(aeval x) (↑(map (algebraMap R A)) p) = ↑(aeval x) p\n[PROOFSTEP]\nrw [aeval_def, aeval_def, eval₂_map, IsScalarTower.algebraMap_eq R A B]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nσ : Type u_4\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring A\ninst✝⁴ : CommSemiring B\ninst✝³ : Algebra R A\ninst✝² : Algebra A B\ninst✝¹ : Algebra R B\ninst✝ : IsScalarTower R A B\nx : σ → A\np : MvPolynomial σ R\n⊢ ↑(aeval (↑(algebraMap A B) ∘ x)) p = ↑(algebraMap A B) (↑(aeval x) p)\n[PROOFSTEP]\nrw [aeval_def, aeval_def, ← coe_eval₂Hom, ← coe_eval₂Hom, map_eval₂Hom, ← IsScalarTower.algebraMap_eq]\n -- Porting note: added\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nσ : Type u_4\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring A\ninst✝⁴ : CommSemiring B\ninst✝³ : Algebra R A\ninst✝² : Algebra A B\ninst✝¹ : Algebra R B\ninst✝ : IsScalarTower R A B\nx : σ → A\np : MvPolynomial σ R\n⊢ ↑(eval₂Hom (algebraMap R B) (↑(algebraMap A B) ∘ x)) p =\n ↑(eval₂Hom (algebraMap R B) fun i => ↑(algebraMap A B) (x i)) p\n[PROOFSTEP]\nsimp only [Function.comp]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nσ : Type u_4\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring A\ninst✝⁶ : CommSemiring B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A B\ninst✝¹ : NoZeroSMulDivisors A B\ninst✝ : Nontrivial B\nx : σ → A\np : MvPolynomial σ R\n⊢ ↑(aeval (↑(algebraMap A B) ∘ x)) p = 0 ↔ ↑(aeval x) p = 0\n[PROOFSTEP]\nrw [aeval_algebraMap_apply, Algebra.algebraMap_eq_smul_one, smul_eq_zero, iff_false_intro (one_ne_zero' B),\n or_false_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nσ : Type u_4\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring A\ninst✝⁴ : CommSemiring B\ninst✝³ : Algebra R A\ninst✝² : Algebra A B\ninst✝¹ : Algebra R B\ninst✝ : IsScalarTower R A B\nx : σ → A\np : MvPolynomial σ R\nh : Function.Injective ↑(algebraMap A B)\n⊢ ↑(aeval (↑(algebraMap A B) ∘ x)) p = 0 ↔ ↑(aeval x) p = 0\n[PROOFSTEP]\nrw [aeval_algebraMap_apply, ← (algebraMap A B).map_zero, h.eq_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nσ : Type u_4\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nS : Subalgebra R A\nx : σ → { x // x ∈ S }\np : MvPolynomial σ R\n⊢ ↑(aeval fun i => ↑(x i)) p = ↑(↑(aeval x) p)\n[PROOFSTEP]\nconvert aeval_algebraMap_apply A x p\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.MvPolynomial.Tower", "llama_tokens": 1249, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711794579723, "lm_q2_score": 0.7549149868676283, "lm_q1q2_score": 0.6416559817783777}} {"text": "[GOAL]\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nR : Type u_2\ninst✝ : Field R\nA : Matrix n n R\nhAps : Splits (RingHom.id R) (charpoly A)\n⊢ det A = Multiset.prod (roots (charpoly A))\n[PROOFSTEP]\nrw [det_eq_sign_charpoly_coeff, ← charpoly_natDegree_eq_dim A,\n Polynomial.prod_roots_eq_coeff_zero_of_monic_of_split A.charpoly_monic hAps, ← mul_assoc, ← pow_two, pow_right_comm,\n neg_one_sq, one_pow, one_mul]\n[GOAL]\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nR : Type u_2\ninst✝ : Field R\nA : Matrix n n R\nhAps : Splits (RingHom.id R) (charpoly A)\n⊢ trace A = Multiset.sum (roots (charpoly A))\n[PROOFSTEP]\ncases' isEmpty_or_nonempty n with h\n[GOAL]\ncase inl\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nR : Type u_2\ninst✝ : Field R\nA : Matrix n n R\nhAps : Splits (RingHom.id R) (charpoly A)\nh : IsEmpty n\n⊢ trace A = Multiset.sum (roots (charpoly A))\n[PROOFSTEP]\nrw [Matrix.trace, Fintype.sum_empty, Matrix.charpoly, det_eq_one_of_card_eq_zero (Fintype.card_eq_zero_iff.2 h),\n Polynomial.roots_one, Multiset.empty_eq_zero, Multiset.sum_zero]\n[GOAL]\ncase inr\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nR : Type u_2\ninst✝ : Field R\nA : Matrix n n R\nhAps : Splits (RingHom.id R) (charpoly A)\nh✝ : Nonempty n\n⊢ trace A = Multiset.sum (roots (charpoly A))\n[PROOFSTEP]\nrw [trace_eq_neg_charpoly_coeff, neg_eq_iff_eq_neg, ←\n Polynomial.sum_roots_eq_nextCoeff_of_monic_of_split A.charpoly_monic hAps, nextCoeff, charpoly_natDegree_eq_dim,\n if_neg (Fintype.card_ne_zero : Fintype.card n ≠ 0)]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Charpoly.Eigs", "llama_tokens": 732, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424256566558, "lm_q2_score": 0.7577943767446202, "lm_q1q2_score": 0.6410504132123177}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\nhSup : ∀ (s : Set α), (∀ (a : α), a ∈ s → p a) → p (sSup s)\n⊢ p (↑lfp f)\n[PROOFSTEP]\nset s := {a | a ≤ lfp f ∧ p a}\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\nhSup : ∀ (s : Set α), (∀ (a : α), a ∈ s → p a) → p (sSup s)\ns : Set α := {a | a ≤ ↑lfp f ∧ p a}\n⊢ p (↑lfp f)\n[PROOFSTEP]\nspecialize hSup s fun a => And.right\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\ns : Set α := {a | a ≤ ↑lfp f ∧ p a}\nhSup : p (sSup s)\n⊢ p (↑lfp f)\n[PROOFSTEP]\nsuffices : sSup s = lfp f\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\ns : Set α := {a | a ≤ ↑lfp f ∧ p a}\nhSup : p (sSup s)\nthis : sSup s = ↑lfp f\n⊢ p (↑lfp f)\ncase this\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\ns : Set α := {a | a ≤ ↑lfp f ∧ p a}\nhSup : p (sSup s)\n⊢ sSup s = ↑lfp f\n[PROOFSTEP]\nexact this ▸ hSup\n[GOAL]\ncase this\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\ns : Set α := {a | a ≤ ↑lfp f ∧ p a}\nhSup : p (sSup s)\n⊢ sSup s = ↑lfp f\n[PROOFSTEP]\nhave h : sSup s ≤ lfp f := sSup_le fun b => And.left\n[GOAL]\ncase this\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\ns : Set α := {a | a ≤ ↑lfp f ∧ p a}\nhSup : p (sSup s)\nh : sSup s ≤ ↑lfp f\n⊢ sSup s = ↑lfp f\n[PROOFSTEP]\nhave hmem : f (sSup s) ∈ s := ⟨f.map_le_lfp h, step _ hSup h⟩\n[GOAL]\ncase this\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CompleteLattice α\nf : α →o α\np : α → Prop\nstep : ∀ (a : α), p a → a ≤ ↑lfp f → p (↑f a)\ns : Set α := {a | a ≤ ↑lfp f ∧ p a}\nhSup : p (sSup s)\nh : sSup s ≤ ↑lfp f\nhmem : ↑f (sSup s) ∈ s\n⊢ sSup s = ↑lfp f\n[PROOFSTEP]\nexact h.antisymm (f.lfp_le <| le_sSup hmem)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : β →o α\ng : α →o β\nh : α →o α →o α\n⊢ ↑lfp (comp lfp h) = ↑lfp (onDiag h)\n[PROOFSTEP]\nlet a := lfp (lfp.comp h)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : β →o α\ng : α →o β\nh : α →o α →o α\na : α := ↑lfp (comp lfp h)\n⊢ ↑lfp (comp lfp h) = ↑lfp (onDiag h)\n[PROOFSTEP]\nrefine' (lfp_le _ _).antisymm (lfp_le _ (Eq.le _))\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : β →o α\ng : α →o β\nh : α →o α →o α\na : α := ↑lfp (comp lfp h)\n⊢ ↑(comp lfp h) (↑lfp (onDiag h)) ≤ ↑lfp (onDiag h)\n[PROOFSTEP]\nexact lfp_le _ h.onDiag.map_lfp.le\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : β →o α\ng : α →o β\nh : α →o α →o α\na : α := ↑lfp (comp lfp h)\n⊢ ↑(onDiag h) (↑lfp (comp lfp h)) = ↑lfp (comp lfp h)\n[PROOFSTEP]\nhave ha : (lfp ∘ h) a = a := (lfp.comp h).map_lfp\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : β →o α\ng : α →o β\nh : α →o α →o α\na : α := ↑lfp (comp lfp h)\nha : (↑lfp ∘ ↑h) a = a\n⊢ ↑(onDiag h) (↑lfp (comp lfp h)) = ↑lfp (comp lfp h)\n[PROOFSTEP]\ncalc\n h a a = h a (lfp (h a)) := congr_arg (h a) ha.symm\n _ = lfp (h a) := (h a).map_lfp\n _ = a := ha\n", "meta": {"mathlib_filename": "Mathlib.Order.FixedPoints", "llama_tokens": 1954, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519528094861981, "lm_q2_score": 0.7520125737597972, "lm_q1q2_score": 0.6406792249836061}} {"text": "[GOAL]\np : ℕ\np_prime : Nat.Prime p\nm n : ℤ\nk l : ℕ\nhpm : ↑(p ^ k) ∣ m\nhpn : ↑(p ^ l) ∣ n\nhpmn : ↑(p ^ (k + l + 1)) ∣ m * n\nhpm' : p ^ k ∣ natAbs m\nhpn' : p ^ l ∣ natAbs n\n⊢ p ^ (k + l + 1) ∣ natAbs m * natAbs n\n[PROOFSTEP]\nrw [← Int.natAbs_mul]\n[GOAL]\np : ℕ\np_prime : Nat.Prime p\nm n : ℤ\nk l : ℕ\nhpm : ↑(p ^ k) ∣ m\nhpn : ↑(p ^ l) ∣ n\nhpmn : ↑(p ^ (k + l + 1)) ∣ m * n\nhpm' : p ^ k ∣ natAbs m\nhpn' : p ^ l ∣ natAbs n\n⊢ p ^ (k + l + 1) ∣ natAbs (m * n)\n[PROOFSTEP]\napply Int.coe_nat_dvd.1 <| Int.dvd_natAbs.2 hpmn\n[GOAL]\np : ℕ\np_prime : Nat.Prime p\nm n : ℤ\nk l : ℕ\nhpm : ↑(p ^ k) ∣ m\nhpn : ↑(p ^ l) ∣ n\nhpmn : ↑(p ^ (k + l + 1)) ∣ m * n\nhpm' : p ^ k ∣ natAbs m\nhpn' : p ^ l ∣ natAbs n\nhpmn' : p ^ (k + l + 1) ∣ natAbs m * natAbs n\nhsd : p ^ (k + 1) ∣ natAbs m ∨ p ^ (l + 1) ∣ natAbs n :=\n Nat.succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul p_prime hpm' hpn' hpmn'\nhsd1 : p ^ (k + 1) ∣ natAbs m\n⊢ ↑(p ^ (k + 1)) ∣ m\n[PROOFSTEP]\napply Int.dvd_natAbs.1\n[GOAL]\np : ℕ\np_prime : Nat.Prime p\nm n : ℤ\nk l : ℕ\nhpm : ↑(p ^ k) ∣ m\nhpn : ↑(p ^ l) ∣ n\nhpmn : ↑(p ^ (k + l + 1)) ∣ m * n\nhpm' : p ^ k ∣ natAbs m\nhpn' : p ^ l ∣ natAbs n\nhpmn' : p ^ (k + l + 1) ∣ natAbs m * natAbs n\nhsd : p ^ (k + 1) ∣ natAbs m ∨ p ^ (l + 1) ∣ natAbs n :=\n Nat.succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul p_prime hpm' hpn' hpmn'\nhsd1 : p ^ (k + 1) ∣ natAbs m\n⊢ ↑(p ^ (k + 1)) ∣ ↑(natAbs m)\n[PROOFSTEP]\napply Int.coe_nat_dvd.2 hsd1\n[GOAL]\np : ℕ\np_prime : Nat.Prime p\nm n : ℤ\nk l : ℕ\nhpm : ↑(p ^ k) ∣ m\nhpn : ↑(p ^ l) ∣ n\nhpmn : ↑(p ^ (k + l + 1)) ∣ m * n\nhpm' : p ^ k ∣ natAbs m\nhpn' : p ^ l ∣ natAbs n\nhpmn' : p ^ (k + l + 1) ∣ natAbs m * natAbs n\nhsd : p ^ (k + 1) ∣ natAbs m ∨ p ^ (l + 1) ∣ natAbs n :=\n Nat.succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul p_prime hpm' hpn' hpmn'\nhsd2 : p ^ (l + 1) ∣ natAbs n\n⊢ ↑(p ^ (l + 1)) ∣ n\n[PROOFSTEP]\napply Int.dvd_natAbs.1\n[GOAL]\np : ℕ\np_prime : Nat.Prime p\nm n : ℤ\nk l : ℕ\nhpm : ↑(p ^ k) ∣ m\nhpn : ↑(p ^ l) ∣ n\nhpmn : ↑(p ^ (k + l + 1)) ∣ m * n\nhpm' : p ^ k ∣ natAbs m\nhpn' : p ^ l ∣ natAbs n\nhpmn' : p ^ (k + l + 1) ∣ natAbs m * natAbs n\nhsd : p ^ (k + 1) ∣ natAbs m ∨ p ^ (l + 1) ∣ natAbs n :=\n Nat.succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul p_prime hpm' hpn' hpmn'\nhsd2 : p ^ (l + 1) ∣ natAbs n\n⊢ ↑(p ^ (l + 1)) ∣ ↑(natAbs n)\n[PROOFSTEP]\napply Int.coe_nat_dvd.2 hsd2\n[GOAL]\np : ℕ\nhp : Nat.Prime p\nk : ℤ\nh : ↑p ∣ k ^ 2\n⊢ p ∣ natAbs k\n[PROOFSTEP]\napply @Nat.Prime.dvd_of_dvd_pow _ _ 2 hp\n[GOAL]\np : ℕ\nhp : Nat.Prime p\nk : ℤ\nh : ↑p ∣ k ^ 2\n⊢ p ∣ natAbs k ^ 2\n[PROOFSTEP]\nrwa [sq, ← natAbs_mul, ← coe_nat_dvd_left, ← sq]\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.NatPrime", "llama_tokens": 1578, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519528094861981, "lm_q2_score": 0.752012562644147, "lm_q1q2_score": 0.6406792155135965}} {"text": "[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : Category.{u_6, u_1} C\ninst✝⁵ : Category.{u_5, u_2} D\ninst✝⁴ : Category.{?u.20851, u_3} E\nF : C ⥤ D\nG : D ⥤ E\nA : Type u_4\ninst✝³ : AddMonoid A\ninst✝² : HasShift C A\ninst✝¹ : HasShift D A\ninst✝ : HasShift E A\na b : A\ne₁ : shiftFunctor C a ⋙ F ≅ F ⋙ shiftFunctor D a\ne₂ : shiftFunctor C b ⋙ F ≅ F ⋙ shiftFunctor D b\nX : C\n⊢ NatTrans.app (isoAdd e₁ e₂).hom X =\n F.map (NatTrans.app (shiftFunctorAdd C a b).hom X) ≫\n NatTrans.app e₂.hom ((shiftFunctor C a).obj X) ≫\n (shiftFunctor D b).map (NatTrans.app e₁.hom X) ≫ NatTrans.app (shiftFunctorAdd D a b).inv (F.obj X)\n[PROOFSTEP]\nsimp only [isoAdd, isoAdd'_hom_app, shiftFunctorAdd'_eq_shiftFunctorAdd]\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : Category.{u_6, u_1} C\ninst✝⁵ : Category.{u_5, u_2} D\ninst✝⁴ : Category.{?u.24197, u_3} E\nF : C ⥤ D\nG : D ⥤ E\nA : Type u_4\ninst✝³ : AddMonoid A\ninst✝² : HasShift C A\ninst✝¹ : HasShift D A\ninst✝ : HasShift E A\na b : A\ne₁ : shiftFunctor C a ⋙ F ≅ F ⋙ shiftFunctor D a\ne₂ : shiftFunctor C b ⋙ F ≅ F ⋙ shiftFunctor D b\nX : C\n⊢ NatTrans.app (isoAdd e₁ e₂).inv X =\n NatTrans.app (shiftFunctorAdd D a b).hom (F.obj X) ≫\n (shiftFunctor D b).map (NatTrans.app e₁.inv X) ≫\n NatTrans.app e₂.inv ((shiftFunctor C a).obj X) ≫ F.map (NatTrans.app (shiftFunctorAdd C a b).inv X)\n[PROOFSTEP]\nsimp only [isoAdd, isoAdd'_inv_app, shiftFunctorAdd'_eq_shiftFunctorAdd]\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁷ : Category.{u_6, u_1} C\ninst✝⁶ : Category.{u_5, u_2} D\ninst✝⁵ : Category.{?u.38582, u_3} E\nF : C ⥤ D\nG : D ⥤ E\nA : Type u_4\ninst✝⁴ : AddMonoid A\ninst✝³ : HasShift C A\ninst✝² : HasShift D A\ninst✝¹ : HasShift E A\ninst✝ : CommShift F A\na b c : A\nh : a + b = c\n⊢ commShiftIso F c = CommShift.isoAdd' h (commShiftIso F a) (commShiftIso F b)\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁷ : Category.{u_6, u_1} C\ninst✝⁶ : Category.{u_5, u_2} D\ninst✝⁵ : Category.{?u.38582, u_3} E\nF : C ⥤ D\nG : D ⥤ E\nA : Type u_4\ninst✝⁴ : AddMonoid A\ninst✝³ : HasShift C A\ninst✝² : HasShift D A\ninst✝¹ : HasShift E A\ninst✝ : CommShift F A\na b : A\n⊢ commShiftIso F (a + b) = CommShift.isoAdd' (_ : a + b = a + b) (commShiftIso F a) (commShiftIso F b)\n[PROOFSTEP]\nsimp only [commShiftIso_add, CommShift.isoAdd]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Shift.CommShift", "llama_tokens": 1178, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267830311354, "lm_q2_score": 0.7371581568543043, "lm_q1q2_score": 0.6404627500048863}} {"text": "[GOAL]\nM : Type u_1\nα : Type u_2\ninst✝¹ : Monoid M\ninst✝ : MulAction M α\ns : Set α\nx y : M\nhx : x ∈ {ϕ | ∀ (x : ↑s), ϕ • ↑x = ↑x}\nhy : y ∈ {ϕ | ∀ (x : ↑s), ϕ • ↑x = ↑x}\nz : ↑s\n⊢ (x * y) • ↑z = ↑z\n[PROOFSTEP]\nrw [mul_smul, hy z, hx z]\n[GOAL]\nM : Type u_1\nα : Type u_2\ninst✝¹ : Group M\ninst✝ : MulAction M α\ns : Set α\nsrc✝ : Submonoid M := fixingSubmonoid M s\nx✝ : M\nhx : x✝ ∈ { toSubsemigroup := src✝.toSubsemigroup, one_mem' := (_ : 1 ∈ src✝.carrier) }.toSubsemigroup.carrier\nz : ↑s\n⊢ x✝⁻¹ • ↑z = ↑z\n[PROOFSTEP]\nrw [inv_smul_eq_iff, hx z]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.FixingSubgroup", "llama_tokens": 322, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9073122288794594, "lm_q2_score": 0.7057850402140659, "lm_q1q2_score": 0.640367397946403}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : StrictOrderedSemiring α\nn : ℕ\n⊢ ↑n < ↑(n + 1)\n[PROOFSTEP]\nrw [Nat.cast_succ]\n[GOAL]\nα : Type u_1\ninst✝ : StrictOrderedSemiring α\nn : ℕ\n⊢ ↑n < ↑n + 1\n[PROOFSTEP]\napply lt_add_one\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Ring.CharZero", "llama_tokens": 119, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8757869916479466, "lm_q2_score": 0.731058584489497, "lm_q1q2_score": 0.6402515984284628}} {"text": "[GOAL]\nn : ℕ\nx : ℝ\n⊢ deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x = (-1) ^ n * ↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2))\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nn : ℕ\nx : ℝ\n⊢ deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x = (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\n[PROOFSTEP]\ninduction' n with n ih generalizing x\n[GOAL]\ncase zero\nx✝ x : ℝ\n⊢ deriv^[Nat.zero] (fun y => Real.exp (-(y ^ 2 / 2))) x =\n (-1) ^ Nat.zero * (↑(aeval x) (hermite Nat.zero) * Real.exp (-(x ^ 2 / 2)))\n[PROOFSTEP]\nrw [Function.iterate_zero_apply, pow_zero, one_mul, hermite_zero, C_1, map_one, one_mul]\n[GOAL]\ncase succ\nx✝ : ℝ\nn : ℕ\nih :\n ∀ (x : ℝ),\n deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x = (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nx : ℝ\n⊢ deriv^[Nat.succ n] (fun y => Real.exp (-(y ^ 2 / 2))) x =\n (-1) ^ Nat.succ n * (↑(aeval x) (hermite (Nat.succ n)) * Real.exp (-(x ^ 2 / 2)))\n[PROOFSTEP]\nreplace ih : deriv^[n] _ = _ := _root_.funext ih\n[GOAL]\ncase succ\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\n⊢ deriv^[Nat.succ n] (fun y => Real.exp (-(y ^ 2 / 2))) x =\n (-1) ^ Nat.succ n * (↑(aeval x) (hermite (Nat.succ n)) * Real.exp (-(x ^ 2 / 2)))\n[PROOFSTEP]\nhave deriv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2)) := by\n rw [deriv_exp (by simp)]; simp;\n ring\n -- Porting note: was `simp [mul_comm, ← neg_mul]`\n[GOAL]\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\n⊢ deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n[PROOFSTEP]\nrw [deriv_exp (by simp)]\n[GOAL]\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\n⊢ DifferentiableAt ℝ (fun y => -(y ^ 2 / 2)) x\n[PROOFSTEP]\nsimp\n[GOAL]\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\n⊢ Real.exp (-(x ^ 2 / 2)) * deriv (fun y => -(y ^ 2 / 2)) x = -x * Real.exp (-(x ^ 2 / 2))\n[PROOFSTEP]\nsimp\n[GOAL]\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\n⊢ Real.exp (-(x ^ 2 / 2)) * (2 * x / 2) = x * Real.exp (-(x ^ 2 / 2))\n[PROOFSTEP]\nring\n -- Porting note: was `simp [mul_comm, ← neg_mul]`\n[GOAL]\ncase succ\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nderiv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n⊢ deriv^[Nat.succ n] (fun y => Real.exp (-(y ^ 2 / 2))) x =\n (-1) ^ Nat.succ n * (↑(aeval x) (hermite (Nat.succ n)) * Real.exp (-(x ^ 2 / 2)))\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', ih, deriv_const_mul_field, deriv_mul, pow_succ (-1 : ℝ), deriv_gaussian, hermite_succ,\n map_sub, map_mul, aeval_X, Polynomial.deriv_aeval]\n[GOAL]\ncase succ\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nderiv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n⊢ (-1) ^ n *\n (↑(aeval x) (↑derivative (hermite n)) * Real.exp (-(x ^ 2 / 2)) +\n ↑(aeval x) (hermite n) * (-x * Real.exp (-(x ^ 2 / 2)))) =\n -1 * (-1) ^ n * ((x * ↑(aeval x) (hermite n) - ↑(aeval x) (↑derivative (hermite n))) * Real.exp (-(x ^ 2 / 2)))\ncase succ.hc\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nderiv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n⊢ DifferentiableAt ℝ (fun x => ↑(aeval x) (hermite n)) x\ncase succ.hd\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nderiv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n⊢ DifferentiableAt ℝ (fun x => Real.exp (-(x ^ 2 / 2))) x\n[PROOFSTEP]\nring\n[GOAL]\ncase succ.hc\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nderiv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n⊢ DifferentiableAt ℝ (fun x => ↑(aeval x) (hermite n)) x\n[PROOFSTEP]\napply Polynomial.differentiable_aeval\n[GOAL]\ncase succ.hd\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nderiv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n⊢ DifferentiableAt ℝ (fun x => Real.exp (-(x ^ 2 / 2))) x\n[PROOFSTEP]\napply DifferentiableAt.exp\n[GOAL]\ncase succ.hd.hc\nx✝ : ℝ\nn : ℕ\nx : ℝ\nih :\n (deriv^[n] fun y => Real.exp (-(y ^ 2 / 2))) = fun x => (-1) ^ n * (↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2)))\nderiv_gaussian : deriv (fun y => Real.exp (-(y ^ 2 / 2))) x = -x * Real.exp (-(x ^ 2 / 2))\n⊢ DifferentiableAt ℝ (fun x => -(x ^ 2 / 2)) x\n[PROOFSTEP]\nsimp\n -- Porting note: was just `simp`\n[GOAL]\nn : ℕ\nx : ℝ\n⊢ ↑(aeval x) (hermite n) = (-1) ^ n * deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x / Real.exp (-(x ^ 2 / 2))\n[PROOFSTEP]\nrw [deriv_gaussian_eq_hermite_mul_gaussian]\n[GOAL]\nn : ℕ\nx : ℝ\n⊢ ↑(aeval x) (hermite n) =\n (-1) ^ n * ((-1) ^ n * ↑(aeval x) (hermite n) * Real.exp (-(x ^ 2 / 2))) / Real.exp (-(x ^ 2 / 2))\n[PROOFSTEP]\nfield_simp [Real.exp_ne_zero]\n[GOAL]\nn : ℕ\nx : ℝ\n⊢ ↑(aeval x) (hermite n) * Real.exp (-x ^ 2 / 2) =\n (-1) ^ n * ((-1) ^ n * ↑(aeval x) (hermite n) * Real.exp (-x ^ 2 / 2))\n[PROOFSTEP]\nrw [← @smul_eq_mul ℝ _ ((-1) ^ n), ← inv_smul_eq_iff₀, mul_assoc, smul_eq_mul, ← inv_pow, ← neg_inv, inv_one]\n[GOAL]\ncase ha\nn : ℕ\nx : ℝ\n⊢ (-1) ^ n ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero _ (by norm_num)\n[GOAL]\nn : ℕ\nx : ℝ\n⊢ -1 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nx : ℝ\n⊢ ↑(aeval x) (hermite n) = (-1) ^ n * deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x * Real.exp (x ^ 2 / 2)\n[PROOFSTEP]\nrw [hermite_eq_deriv_gaussian, Real.exp_neg]\n[GOAL]\nn : ℕ\nx : ℝ\n⊢ (-1) ^ n * deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x / (Real.exp (x ^ 2 / 2))⁻¹ =\n (-1) ^ n * deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x * Real.exp (x ^ 2 / 2)\n[PROOFSTEP]\nfield_simp [Real.exp_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Hermite.Gaussian", "llama_tokens": 3435, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8740772482857834, "lm_q2_score": 0.7310585727705127, "lm_q1q2_score": 0.6390016656229819}} {"text": "[GOAL]\n⊢ Tendsto (fun k => ∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1)) atTop (𝓝 (π / 4))\n[PROOFSTEP]\nrw [tendsto_iff_norm_tendsto_zero, ← tendsto_zero_iff_norm_tendsto_zero]\n -- (1) We introduce a useful sequence `u` of values in [0,1], then prove that another sequence\n -- constructed from `u` tends to `0` at `+∞`\n[GOAL]\n⊢ Tendsto (fun e => ∑ i in Finset.range e, (-1) ^ i / (2 * ↑i + 1) - π / 4) atTop (𝓝 0)\n[PROOFSTEP]\nlet u := fun k : ℕ => (k : NNReal) ^ (-1 / (2 * (k : ℝ) + 1))\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\n⊢ Tendsto (fun e => ∑ i in Finset.range e, (-1) ^ i / (2 * ↑i + 1) - π / 4) atTop (𝓝 0)\n[PROOFSTEP]\nhave H : Tendsto (fun k : ℕ => (1 : ℝ) - u k + u k ^ (2 * (k : ℝ) + 1)) atTop (𝓝 0) :=\n by\n convert\n (((tendsto_rpow_div_mul_add (-1) 2 1 two_ne_zero.symm).neg.const_add 1).add tendsto_inv_atTop_zero).comp\n tendsto_nat_cast_atTop_atTop using\n 1\n · ext k\n simp only [NNReal.coe_nat_cast, Function.comp_apply, NNReal.coe_rpow]\n rw [← rpow_mul (Nat.cast_nonneg k) (-1 / (2 * (k : ℝ) + 1)) (2 * (k : ℝ) + 1),\n @div_mul_cancel _ _ (2 * (k : ℝ) + 1) _ (by norm_cast; simp only [Nat.succ_ne_zero, not_false_iff]),\n rpow_neg_one k, sub_eq_add_neg]\n ·\n simp only [add_zero, add_right_neg]\n -- (2) We convert the limit in our goal to an inequality\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\n⊢ Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\n[PROOFSTEP]\nconvert\n (((tendsto_rpow_div_mul_add (-1) 2 1 two_ne_zero.symm).neg.const_add 1).add tendsto_inv_atTop_zero).comp\n tendsto_nat_cast_atTop_atTop using\n 1\n[GOAL]\ncase h.e'_3\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\n⊢ (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) = (fun x => 1 + -x ^ (-1 / (2 * x + 1)) + x⁻¹) ∘ Nat.cast\n[PROOFSTEP]\next k\n[GOAL]\ncase h.e'_3.h\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nk : ℕ\n⊢ 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1)) = ((fun x => 1 + -x ^ (-1 / (2 * x + 1)) + x⁻¹) ∘ Nat.cast) k\n[PROOFSTEP]\nsimp only [NNReal.coe_nat_cast, Function.comp_apply, NNReal.coe_rpow]\n[GOAL]\ncase h.e'_3.h\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nk : ℕ\n⊢ 1 - ↑k ^ (-1 / (2 * ↑k + 1)) + (↑k ^ (-1 / (2 * ↑k + 1))) ^ (2 * ↑k + 1) = 1 + -↑k ^ (-1 / (2 * ↑k + 1)) + (↑k)⁻¹\n[PROOFSTEP]\nrw [← rpow_mul (Nat.cast_nonneg k) (-1 / (2 * (k : ℝ) + 1)) (2 * (k : ℝ) + 1),\n @div_mul_cancel _ _ (2 * (k : ℝ) + 1) _ (by norm_cast; simp only [Nat.succ_ne_zero, not_false_iff]), rpow_neg_one k,\n sub_eq_add_neg]\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nk : ℕ\n⊢ 2 * ↑k + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nk : ℕ\n⊢ ¬2 * k + 1 = 0\n[PROOFSTEP]\nsimp only [Nat.succ_ne_zero, not_false_iff]\n[GOAL]\ncase h.e'_5\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\n⊢ 𝓝 0 = 𝓝 (1 + -1 + 0)\n[PROOFSTEP]\nsimp only [add_zero, add_right_neg]\n -- (2) We convert the limit in our goal to an inequality\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\n⊢ Tendsto (fun e => ∑ i in Finset.range e, (-1) ^ i / (2 * ↑i + 1) - π / 4) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero_norm _ H\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\n⊢ ∀ (n : ℕ), ‖∑ i in Finset.range n, (-1) ^ i / (2 * ↑i + 1) - π / 4‖ ≤ 1 - ↑(u n) + ↑(u n ^ (2 * ↑n + 1))\n[PROOFSTEP]\nintro k\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\n⊢ ‖∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1) - π / 4‖ ≤ 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nlet U := u k\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\n⊢ ‖∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1) - π / 4‖ ≤ 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nlet b (i : ℕ) x := (-(1 : ℝ)) ^ i * x ^ (2 * i + 1) / (2 * i + 1)\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\n⊢ ‖∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1) - π / 4‖ ≤ 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nlet f x := arctan x - ∑ i in Finset.range k, b i x\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\n⊢ ‖∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1) - π / 4‖ ≤ 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nsuffices f_bound : |f 1 - f 0| ≤ (1 : ℝ) - U + U ^ (2 * (k : ℝ) + 1)\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nf_bound : |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n⊢ ‖∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1) - π / 4‖ ≤ 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nrw [← norm_neg]\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nf_bound : |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n⊢ ‖-(∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1) - π / 4)‖ ≤ 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nconvert f_bound using 1\n[GOAL]\ncase h.e'_3\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nf_bound : |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n⊢ ‖-(∑ i in Finset.range k, (-1) ^ i / (2 * ↑i + 1) - π / 4)‖ = |f 1 - f 0|\n[PROOFSTEP]\nsimp\n -- We show that `U` is indeed in [0,1]\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave hU1 : (U : ℝ) ≤ 1 := by\n by_cases hk : k = 0\n · simp [hk]\n ·\n exact\n rpow_le_one_of_one_le_of_nonpos (by norm_cast; exact Nat.succ_le_iff.mpr (Nat.pos_of_ne_zero hk))\n (le_of_lt\n (@div_neg_of_neg_of_pos _ _ (-(1 : ℝ)) (2 * k + 1) (neg_neg_iff_pos.mpr zero_lt_one)\n (by norm_cast; exact Nat.succ_pos')))\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\n⊢ ↑U ≤ 1\n[PROOFSTEP]\nby_cases hk : k = 0\n[GOAL]\ncase pos\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhk : k = 0\n⊢ ↑U ≤ 1\n[PROOFSTEP]\nsimp [hk]\n[GOAL]\ncase neg\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhk : ¬k = 0\n⊢ ↑U ≤ 1\n[PROOFSTEP]\nexact\n rpow_le_one_of_one_le_of_nonpos (by norm_cast; exact Nat.succ_le_iff.mpr (Nat.pos_of_ne_zero hk))\n (le_of_lt\n (@div_neg_of_neg_of_pos _ _ (-(1 : ℝ)) (2 * k + 1) (neg_neg_iff_pos.mpr zero_lt_one)\n (by norm_cast; exact Nat.succ_pos')))\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhk : ¬k = 0\n⊢ 1 ≤ ↑↑k\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhk : ¬k = 0\n⊢ 1 ≤ k\n[PROOFSTEP]\nexact Nat.succ_le_iff.mpr (Nat.pos_of_ne_zero hk)\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhk : ¬k = 0\n⊢ 0 < 2 * ↑k + 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhk : ¬k = 0\n⊢ 0 < 2 * k + 1\n[PROOFSTEP]\nexact Nat.succ_pos'\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave hU2 := NNReal.coe_nonneg U\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nlet f' := fun x : ℝ => (-x ^ 2) ^ k / (1 + x ^ 2)\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave has_deriv_at_f : ∀ x, HasDerivAt f (f' x) x := by\n intro x\n have has_deriv_at_b : ∀ i ∈ Finset.range k, HasDerivAt (b i) ((-x ^ 2) ^ i) x :=\n by\n intro i _\n convert HasDerivAt.const_mul ((-1 : ℝ) ^ i / (2 * i + 1)) (HasDerivAt.pow (2 * i + 1) (hasDerivAt_id x)) using 1\n · ext y\n simp only [id.def]\n ring\n · simp\n rw [← mul_assoc, @div_mul_cancel _ _ (2 * (i : ℝ) + 1) _ (by norm_cast; linarith), pow_mul x 2 i, ←\n mul_pow (-1 : ℝ) (x ^ 2) i]\n ring_nf\n convert (hasDerivAt_arctan x).sub (HasDerivAt.sum has_deriv_at_b) using 1\n have g_sum := @geom_sum_eq _ _ (-x ^ 2) ((neg_nonpos.mpr (sq_nonneg x)).trans_lt zero_lt_one).ne k\n simp only at g_sum ⊢\n rw [g_sum, ← neg_add' (x ^ 2) 1, add_comm (x ^ 2) 1, sub_eq_add_neg, neg_div', neg_div_neg_eq]\n ring\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\n⊢ ∀ (x : ℝ), HasDerivAt f (f' x) x\n[PROOFSTEP]\nintro x\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\n⊢ HasDerivAt f (f' x) x\n[PROOFSTEP]\nhave has_deriv_at_b : ∀ i ∈ Finset.range k, HasDerivAt (b i) ((-x ^ 2) ^ i) x :=\n by\n intro i _\n convert HasDerivAt.const_mul ((-1 : ℝ) ^ i / (2 * i + 1)) (HasDerivAt.pow (2 * i + 1) (hasDerivAt_id x)) using 1\n · ext y\n simp only [id.def]\n ring\n · simp\n rw [← mul_assoc, @div_mul_cancel _ _ (2 * (i : ℝ) + 1) _ (by norm_cast; linarith), pow_mul x 2 i, ←\n mul_pow (-1 : ℝ) (x ^ 2) i]\n ring_nf\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\n⊢ ∀ (i : ℕ), i ∈ Finset.range k → HasDerivAt (b i) ((-x ^ 2) ^ i) x\n[PROOFSTEP]\nintro i _\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\n⊢ HasDerivAt (b i) ((-x ^ 2) ^ i) x\n[PROOFSTEP]\nconvert HasDerivAt.const_mul ((-1 : ℝ) ^ i / (2 * i + 1)) (HasDerivAt.pow (2 * i + 1) (hasDerivAt_id x)) using 1\n[GOAL]\ncase h.e'_6\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\n⊢ b i = fun y => (-1) ^ i / (2 * ↑i + 1) * id y ^ (2 * i + 1)\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e'_6.h\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\ny : ℝ\n⊢ b i y = (-1) ^ i / (2 * ↑i + 1) * id y ^ (2 * i + 1)\n[PROOFSTEP]\nsimp only [id.def]\n[GOAL]\ncase h.e'_6.h\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\ny : ℝ\n⊢ (-1) ^ i * y ^ (2 * i + 1) / (2 * ↑i + 1) = (-1) ^ i / (2 * ↑i + 1) * y ^ (2 * i + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_7\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\n⊢ (-x ^ 2) ^ i = (-1) ^ i / (2 * ↑i + 1) * (↑(2 * i + 1) * id x ^ (2 * i + 1 - 1) * 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_7\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\n⊢ (-x ^ 2) ^ i = (-1) ^ i / (2 * ↑i + 1) * ((2 * ↑i + 1) * x ^ (2 * i))\n[PROOFSTEP]\nrw [← mul_assoc, @div_mul_cancel _ _ (2 * (i : ℝ) + 1) _ (by norm_cast; linarith), pow_mul x 2 i, ←\n mul_pow (-1 : ℝ) (x ^ 2) i]\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\n⊢ 2 * ↑i + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\n⊢ ¬2 * i + 1 = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.e'_7\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\ni : ℕ\na✝ : i ∈ Finset.range k\n⊢ (-x ^ 2) ^ i = (-1 * x ^ 2) ^ i\n[PROOFSTEP]\nring_nf\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\nhas_deriv_at_b : ∀ (i : ℕ), i ∈ Finset.range k → HasDerivAt (b i) ((-x ^ 2) ^ i) x\n⊢ HasDerivAt f (f' x) x\n[PROOFSTEP]\nconvert (hasDerivAt_arctan x).sub (HasDerivAt.sum has_deriv_at_b) using 1\n[GOAL]\ncase h.e'_7\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\nhas_deriv_at_b : ∀ (i : ℕ), i ∈ Finset.range k → HasDerivAt (b i) ((-x ^ 2) ^ i) x\n⊢ f' x = ↑1 / (↑1 + x ^ 2) - ∑ i in Finset.range k, (-x ^ 2) ^ i\n[PROOFSTEP]\nhave g_sum := @geom_sum_eq _ _ (-x ^ 2) ((neg_nonpos.mpr (sq_nonneg x)).trans_lt zero_lt_one).ne k\n[GOAL]\ncase h.e'_7\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\nhas_deriv_at_b : ∀ (i : ℕ), i ∈ Finset.range k → HasDerivAt (b i) ((-x ^ 2) ^ i) x\ng_sum : ∑ i in Finset.range k, (-x ^ 2) ^ i = ((-x ^ 2) ^ k - 1) / (-x ^ 2 - 1)\n⊢ f' x = ↑1 / (↑1 + x ^ 2) - ∑ i in Finset.range k, (-x ^ 2) ^ i\n[PROOFSTEP]\nsimp only at g_sum ⊢\n[GOAL]\ncase h.e'_7\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\nhas_deriv_at_b : ∀ (i : ℕ), i ∈ Finset.range k → HasDerivAt (b i) ((-x ^ 2) ^ i) x\ng_sum : ∑ i in Finset.range k, (-x ^ 2) ^ i = ((-x ^ 2) ^ k - 1) / (-x ^ 2 - 1)\n⊢ (-x ^ 2) ^ k / (↑1 + x ^ 2) = ↑1 / (↑1 + x ^ 2) - ∑ i in Finset.range k, (-x ^ 2) ^ i\n[PROOFSTEP]\nrw [g_sum, ← neg_add' (x ^ 2) 1, add_comm (x ^ 2) 1, sub_eq_add_neg, neg_div', neg_div_neg_eq]\n[GOAL]\ncase h.e'_7\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nx : ℝ\nhas_deriv_at_b : ∀ (i : ℕ), i ∈ Finset.range k → HasDerivAt (b i) ((-x ^ 2) ^ i) x\ng_sum : ∑ i in Finset.range k, (-x ^ 2) ^ i = ((-x ^ 2) ^ k - 1) / (-x ^ 2 - 1)\n⊢ (-x ^ 2) ^ k / (↑1 + x ^ 2) = ↑1 / (↑1 + x ^ 2) + ((-x ^ 2) ^ k - 1) / (1 + x ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave hderiv1 : ∀ x ∈ Icc (U : ℝ) 1, HasDerivWithinAt f (f' x) (Icc (U : ℝ) 1) x := fun x _ =>\n (has_deriv_at_f x).hasDerivWithinAt\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave hderiv2 : ∀ x ∈ Icc 0 (U : ℝ), HasDerivWithinAt f (f' x) (Icc 0 (U : ℝ)) x := fun x _ =>\n (has_deriv_at_f x).hasDerivWithinAt\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave f'_bound : ∀ x ∈ Icc (-1 : ℝ) 1, |f' x| ≤ |x| ^ (2 * k) :=\n by\n intro x _\n rw [abs_div, IsAbsoluteValue.abv_pow abs (-x ^ 2) k, abs_neg, IsAbsoluteValue.abv_pow abs x 2, ← pow_mul]\n refine' div_le_of_nonneg_of_le_mul (abs_nonneg _) (pow_nonneg (abs_nonneg _) _) _\n refine' le_mul_of_one_le_right (pow_nonneg (abs_nonneg _) _) _\n rw_mod_cast [abs_of_nonneg (add_nonneg zero_le_one (sq_nonneg x) : (0 : ℝ) ≤ _)]\n exact (le_add_of_nonneg_right (sq_nonneg x) : (1 : ℝ) ≤ _)\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\n⊢ ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\n[PROOFSTEP]\nintro x _\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nx : ℝ\na✝ : x ∈ Icc (-1) 1\n⊢ |f' x| ≤ |x| ^ (2 * k)\n[PROOFSTEP]\nrw [abs_div, IsAbsoluteValue.abv_pow abs (-x ^ 2) k, abs_neg, IsAbsoluteValue.abv_pow abs x 2, ← pow_mul]\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nx : ℝ\na✝ : x ∈ Icc (-1) 1\n⊢ |x| ^ (2 * k) / |↑1 + x ^ 2| ≤ |x| ^ (2 * k)\n[PROOFSTEP]\nrefine' div_le_of_nonneg_of_le_mul (abs_nonneg _) (pow_nonneg (abs_nonneg _) _) _\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nx : ℝ\na✝ : x ∈ Icc (-1) 1\n⊢ |x| ^ (2 * k) ≤ |x| ^ (2 * k) * |↑1 + x ^ 2|\n[PROOFSTEP]\nrefine' le_mul_of_one_le_right (pow_nonneg (abs_nonneg _) _) _\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nx : ℝ\na✝ : x ∈ Icc (-1) 1\n⊢ 1 ≤ |↑1 + x ^ 2|\n[PROOFSTEP]\nrw_mod_cast [abs_of_nonneg (add_nonneg zero_le_one (sq_nonneg x) : (0 : ℝ) ≤ _)]\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nx : ℝ\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * k + 1))) atTop (𝓝 0)\nhU1 : U ≤ 1\nhU2 : 0 ≤ U\na✝ : x ∈ Icc (↑(Int.negSucc 0)) 1\n⊢ 1 ≤ 1 + x ^ 2\n[PROOFSTEP]\nexact (le_add_of_nonneg_right (sq_nonneg x) : (1 : ℝ) ≤ _)\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave hbound1 : ∀ x ∈ Ico (U : ℝ) 1, |f' x| ≤ 1 :=\n by\n rintro x ⟨hx_left, hx_right⟩\n have hincr := pow_le_pow_of_le_left (le_trans hU2 hx_left) (le_of_lt hx_right) (2 * k)\n rw [one_pow (2 * k), ← abs_of_nonneg (le_trans hU2 hx_left)] at hincr \n rw [← abs_of_nonneg (le_trans hU2 hx_left)] at hx_right \n linarith [f'_bound x (mem_Icc.mpr (abs_le.mp (le_of_lt hx_right)))]\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\n⊢ ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\n[PROOFSTEP]\nrintro x ⟨hx_left, hx_right⟩\n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nx : ℝ\nhx_left : ↑U ≤ x\nhx_right : x < 1\n⊢ |f' x| ≤ 1\n[PROOFSTEP]\nhave hincr := pow_le_pow_of_le_left (le_trans hU2 hx_left) (le_of_lt hx_right) (2 * k)\n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nx : ℝ\nhx_left : ↑U ≤ x\nhx_right : x < 1\nhincr : x ^ (2 * k) ≤ 1 ^ (2 * k)\n⊢ |f' x| ≤ 1\n[PROOFSTEP]\nrw [one_pow (2 * k), ← abs_of_nonneg (le_trans hU2 hx_left)] at hincr \n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nx : ℝ\nhx_left : ↑U ≤ x\nhx_right : x < 1\nhincr : |x| ^ (2 * k) ≤ 1\n⊢ |f' x| ≤ 1\n[PROOFSTEP]\nrw [← abs_of_nonneg (le_trans hU2 hx_left)] at hx_right \n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nx : ℝ\nhx_left : ↑U ≤ x\nhx_right : |x| < 1\nhincr : |x| ^ (2 * k) ≤ 1\n⊢ |f' x| ≤ 1\n[PROOFSTEP]\nlinarith [f'_bound x (mem_Icc.mpr (abs_le.mp (le_of_lt hx_right)))]\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave hbound2 : ∀ x ∈ Ico 0 (U : ℝ), |f' x| ≤ U ^ (2 * k) :=\n by\n rintro x ⟨hx_left, hx_right⟩\n have hincr := pow_le_pow_of_le_left hx_left (le_of_lt hx_right) (2 * k)\n rw [← abs_of_nonneg hx_left] at hincr hx_right \n rw [← abs_of_nonneg hU2] at hU1 hx_right \n exact (f'_bound x (mem_Icc.mpr (abs_le.mp (le_trans (le_of_lt hx_right) hU1)))).trans hincr\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\n⊢ ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\n[PROOFSTEP]\nrintro x ⟨hx_left, hx_right⟩\n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nx : ℝ\nhx_left : 0 ≤ x\nhx_right : x < ↑U\n⊢ |f' x| ≤ ↑(U ^ (2 * k))\n[PROOFSTEP]\nhave hincr := pow_le_pow_of_le_left hx_left (le_of_lt hx_right) (2 * k)\n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nx : ℝ\nhx_left : 0 ≤ x\nhx_right : x < ↑U\nhincr : x ^ (2 * k) ≤ ↑U ^ (2 * k)\n⊢ |f' x| ≤ ↑(U ^ (2 * k))\n[PROOFSTEP]\nrw [← abs_of_nonneg hx_left] at hincr hx_right \n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nx : ℝ\nhx_left : 0 ≤ x\nhx_right : |x| < ↑U\nhincr : |x| ^ (2 * k) ≤ ↑U ^ (2 * k)\n⊢ |f' x| ≤ ↑(U ^ (2 * k))\n[PROOFSTEP]\nrw [← abs_of_nonneg hU2] at hU1 hx_right \n[GOAL]\ncase intro\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : |↑U| ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nx : ℝ\nhx_left : 0 ≤ x\nhx_right : |x| < |↑U|\nhincr : |x| ^ (2 * k) ≤ ↑U ^ (2 * k)\n⊢ |f' x| ≤ ↑(U ^ (2 * k))\n[PROOFSTEP]\nexact (f'_bound x (mem_Icc.mpr (abs_le.mp (le_trans (le_of_lt hx_right) hU1)))).trans hincr\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nhbound2 : ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave mvt1 := norm_image_sub_le_of_norm_deriv_le_segment' hderiv1 hbound1 _ (right_mem_Icc.mpr hU1)\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nhbound2 : ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\nmvt1 : ‖f 1 - f ↑U‖ ≤ 1 * (1 - ↑U)\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\nhave mvt2 :=\n norm_image_sub_le_of_norm_deriv_le_segment' hderiv2 hbound2 _\n (right_mem_Icc.mpr hU2)\n -- The following algebra is enough to complete the proof\n[GOAL]\ncase f_bound\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nhbound2 : ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\nmvt1 : ‖f 1 - f ↑U‖ ≤ 1 * (1 - ↑U)\nmvt2 : ‖f ↑U - f 0‖ ≤ ↑(U ^ (2 * k)) * (↑U - 0)\n⊢ |f 1 - f 0| ≤ 1 - ↑U + ↑(U ^ (2 * ↑k + 1))\n[PROOFSTEP]\ncalc\n |f 1 - f 0| = |f 1 - f U + (f U - f 0)| := by simp\n _ ≤ 1 * (1 - U) + U ^ (2 * k) * (U - 0) := (le_trans (abs_add (f 1 - f U) (f U - f 0)) (add_le_add mvt1 mvt2))\n _ = 1 - U + (U : ℝ) ^ (2 * k) * U := by simp\n _ = 1 - u k + u k ^ (2 * (k : ℝ) + 1) := by rw [← pow_succ' (U : ℝ) (2 * k)]; norm_cast\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nhbound2 : ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\nmvt1 : ‖f 1 - f ↑U‖ ≤ 1 * (1 - ↑U)\nmvt2 : ‖f ↑U - f 0‖ ≤ ↑(U ^ (2 * k)) * (↑U - 0)\n⊢ |f 1 - f 0| = |f 1 - f ↑U + (f ↑U - f 0)|\n[PROOFSTEP]\nsimp\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nhbound2 : ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\nmvt1 : ‖f 1 - f ↑U‖ ≤ 1 * (1 - ↑U)\nmvt2 : ‖f ↑U - f 0‖ ≤ ↑(U ^ (2 * k)) * (↑U - 0)\n⊢ 1 * (1 - ↑U) + ↑(U ^ (2 * k)) * (↑U - 0) = 1 - ↑U + ↑U ^ (2 * k) * ↑U\n[PROOFSTEP]\nsimp\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nhbound2 : ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\nmvt1 : ‖f 1 - f ↑U‖ ≤ 1 * (1 - ↑U)\nmvt2 : ‖f ↑U - f 0‖ ≤ ↑(U ^ (2 * k)) * (↑U - 0)\n⊢ 1 - ↑U + ↑U ^ (2 * k) * ↑U = 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nrw [← pow_succ' (U : ℝ) (2 * k)]\n[GOAL]\nu : ℕ → NNReal := fun k => ↑k ^ (-1 / (2 * ↑k + 1))\nH : Tendsto (fun k => 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))) atTop (𝓝 0)\nk : ℕ\nU : NNReal := u k\nb : ℕ → ℝ → ℝ := fun i x => (-1) ^ i * x ^ (2 * i + 1) / (2 * ↑i + 1)\nf : ℝ → ℝ := fun x => arctan x - ∑ i in Finset.range k, b i x\nhU1 : ↑U ≤ 1\nhU2 : 0 ≤ ↑U\nf' : ℝ → ℝ := fun x => (-x ^ 2) ^ k / (↑1 + x ^ 2)\nhas_deriv_at_f : ∀ (x : ℝ), HasDerivAt f (f' x) x\nhderiv1 : ∀ (x : ℝ), x ∈ Icc (↑U) 1 → HasDerivWithinAt f (f' x) (Icc (↑U) 1) x\nhderiv2 : ∀ (x : ℝ), x ∈ Icc 0 ↑U → HasDerivWithinAt f (f' x) (Icc 0 ↑U) x\nf'_bound : ∀ (x : ℝ), x ∈ Icc (-1) 1 → |f' x| ≤ |x| ^ (2 * k)\nhbound1 : ∀ (x : ℝ), x ∈ Ico (↑U) 1 → |f' x| ≤ 1\nhbound2 : ∀ (x : ℝ), x ∈ Ico 0 ↑U → |f' x| ≤ ↑(U ^ (2 * k))\nmvt1 : ‖f 1 - f ↑U‖ ≤ 1 * (1 - ↑U)\nmvt2 : ‖f ↑U - f 0‖ ≤ ↑(U ^ (2 * k)) * (↑U - 0)\n⊢ 1 - ↑U + ↑U ^ (2 * k + 1) = 1 - ↑(u k) + ↑(u k ^ (2 * ↑k + 1))\n[PROOFSTEP]\nnorm_cast\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.Pi.Leibniz", "llama_tokens": 26769, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8596637397236824, "lm_q2_score": 0.7431680086124812, "lm_q1q2_score": 0.6388745895268074}} {"text": "[GOAL]\nι : Type u_1\nI : Box ι\ninst✝ : Countable ι\n⊢ MeasurableSet ↑I\n[PROOFSTEP]\nrw [coe_eq_pi]\n[GOAL]\nι : Type u_1\nI : Box ι\ninst✝ : Countable ι\n⊢ MeasurableSet (pi univ fun i => Ioc (lower I i) (upper I i))\n[PROOFSTEP]\nexact MeasurableSet.univ_pi fun i => measurableSet_Ioc\n[GOAL]\nι : Type u_1\nI : Box ι\ninst✝ : Fintype ι\n⊢ ↑I =ᵐ[volume] ↑Box.Icc I\n[PROOFSTEP]\nrw [coe_eq_pi]\n[GOAL]\nι : Type u_1\nI : Box ι\ninst✝ : Fintype ι\n⊢ (pi univ fun i => Ioc (lower I i) (upper I i)) =ᵐ[volume] ↑Box.Icc I\n[PROOFSTEP]\nexact Measure.univ_pi_Ioc_ae_eq_Icc\n[GOAL]\nι : Type u_1\ninst✝¹ : Finite ι\nI : Box ι\nπ : Prepartition I\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\n⊢ ENNReal.toReal (↑↑μ (Prepartition.iUnion π)) = ∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J)\n[PROOFSTEP]\nerw [← ENNReal.toReal_sum, π.iUnion_def, measure_biUnion_finset π.pairwiseDisjoint]\n[GOAL]\nι : Type u_1\ninst✝¹ : Finite ι\nI : Box ι\nπ : Prepartition I\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\n⊢ ∀ (b : Box ι), b ∈ π.boxes → MeasurableSet ↑b\nι : Type u_1\ninst✝¹ : Finite ι\nI : Box ι\nπ : Prepartition I\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\n⊢ ∀ (a : Box ι), a ∈ π.boxes → ↑↑μ ↑a ≠ ⊤\n[PROOFSTEP]\nexacts [fun J _ => J.measurableSet_coe, fun J _ => (J.measure_coe_lt_top μ).ne]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nJ : Box ι\nx✝ : ↑J ≤ ⊤\nπ : Prepartition J\nhπ : Prepartition.IsPartition π\n⊢ ∑ Ji in π.boxes, (fun J => ENNReal.toReal (↑↑μ ↑J)) Ji = (fun J => ENNReal.toReal (↑↑μ ↑J)) J\n[PROOFSTEP]\nrw [← π.measure_iUnion_toReal, hπ.iUnion_eq]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nI : Box ι\n⊢ ↑(Measure.toBoxAdditive volume) I = ∏ i : ι, (upper I i - lower I i)\n[PROOFSTEP]\nrw [Measure.toBoxAdditive_apply, coe_eq_pi, Real.volume_pi_Ioc_toReal I.lower_le_upper]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nI : Box ι\n⊢ ENNReal.toReal (↑↑volume ↑I) = ∏ i : ι, (upper I i - lower I i)\n[PROOFSTEP]\nrw [coe_eq_pi, Real.volume_pi_Ioc_toReal I.lower_le_upper]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nn : ℕ\ni : Fin (n + 1)\nI : Box (Fin (n + 1))\n⊢ (∏ j : Fin n, (upper (face I i) j - lower (face I i) j)) * (upper I i - lower I i) =\n ∏ j : Fin (n + 1), (upper I j - lower I j)\n[PROOFSTEP]\nsimp only [face_lower, face_upper, (· ∘ ·), Fin.prod_univ_succAbove _ i, mul_comm]\n[GOAL]\nι : Type u_1\ninst✝² : Fintype ι\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nI : Box ι\nx : E\n⊢ ↑(↑BoxAdditiveMap.volume I) x = (∏ j : ι, (upper I j - lower I j)) • x\n[PROOFSTEP]\nrw [BoxAdditiveMap.volume, toSMul_apply]\n[GOAL]\nι : Type u_1\ninst✝² : Fintype ι\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nI : Box ι\nx : E\n⊢ ↑(Measure.toBoxAdditive volume) I • x = (∏ j : ι, (upper I j - lower I j)) • x\n[PROOFSTEP]\nexact congr_arg₂ (· • ·) I.volume_apply rfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.BoxIntegral.Partition.Measure", "llama_tokens": 1451, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835330070839, "lm_q2_score": 0.7634837743174788, "lm_q1q2_score": 0.6378781211603503}} {"text": "[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2\n[PROOFSTEP]\nrw [norm_add_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ inner x y = 0 ↔ angle x y = π / 2\n[PROOFSTEP]\nexact inner_eq_zero_iff_angle_eq_pi_div_two x y\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2\n[PROOFSTEP]\nrw [norm_sub_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ inner x y = 0 ↔ angle x y = π / 2\n[PROOFSTEP]\nexact inner_eq_zero_iff_angle_eq_pi_div_two x y\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ angle x (x + y) = Real.arccos (‖x‖ / ‖x + y‖)\n[PROOFSTEP]\nrw [angle, inner_add_right, h, add_zero, real_inner_self_eq_norm_mul_norm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.arccos (‖x‖ * ‖x‖ / (‖x‖ * ‖x + y‖)) = Real.arccos (‖x‖ / ‖x + y‖)\n[PROOFSTEP]\nby_cases hx : ‖x‖ = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nhx : ‖x‖ = 0\n⊢ Real.arccos (‖x‖ * ‖x‖ / (‖x‖ * ‖x + y‖)) = Real.arccos (‖x‖ / ‖x + y‖)\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nhx : ¬‖x‖ = 0\n⊢ Real.arccos (‖x‖ * ‖x‖ / (‖x‖ * ‖x + y‖)) = Real.arccos (‖x‖ / ‖x + y‖)\n[PROOFSTEP]\nrw [div_mul_eq_div_div, mul_self_div_self]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ angle x (x + y) = Real.arcsin (‖y‖ / ‖x + y‖)\n[PROOFSTEP]\nhave hxy : ‖x + y‖ ^ 2 ≠ 0 :=\n by\n rw [pow_two, norm_add_sq_eq_norm_sq_add_norm_sq_real h, ne_comm]\n refine' ne_of_lt _\n rcases h0 with (h0 | h0)\n · exact Left.add_pos_of_pos_of_nonneg (mul_self_pos.2 (norm_ne_zero_iff.2 h0)) (mul_self_nonneg _)\n · exact Left.add_pos_of_nonneg_of_pos (mul_self_nonneg _) (mul_self_pos.2 (norm_ne_zero_iff.2 h0))\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ ‖x + y‖ ^ 2 ≠ 0\n[PROOFSTEP]\nrw [pow_two, norm_add_sq_eq_norm_sq_add_norm_sq_real h, ne_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ 0 ≠ ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrefine' ne_of_lt _\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ 0 < ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrcases h0 with (h0 | h0)\n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ 0 < ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nexact Left.add_pos_of_pos_of_nonneg (mul_self_pos.2 (norm_ne_zero_iff.2 h0)) (mul_self_nonneg _)\n[GOAL]\ncase inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : y ≠ 0\n⊢ 0 < ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nexact Left.add_pos_of_nonneg_of_pos (mul_self_nonneg _) (mul_self_pos.2 (norm_ne_zero_iff.2 h0))\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\nhxy : ‖x + y‖ ^ 2 ≠ 0\n⊢ angle x (x + y) = Real.arcsin (‖y‖ / ‖x + y‖)\n[PROOFSTEP]\nrw [angle_add_eq_arccos_of_inner_eq_zero h, Real.arccos_eq_arcsin (div_nonneg (norm_nonneg _) (norm_nonneg _)), div_pow,\n one_sub_div hxy]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\nhxy : ‖x + y‖ ^ 2 ≠ 0\n⊢ Real.arcsin (Real.sqrt ((‖x + y‖ ^ 2 - ‖x‖ ^ 2) / ‖x + y‖ ^ 2)) = Real.arcsin (‖y‖ / ‖x + y‖)\n[PROOFSTEP]\nnth_rw 1 [pow_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\nhxy : ‖x + y‖ ^ 2 ≠ 0\n⊢ Real.arcsin (Real.sqrt ((‖x + y‖ * ‖x + y‖ - ‖x‖ ^ 2) / ‖x + y‖ ^ 2)) = Real.arcsin (‖y‖ / ‖x + y‖)\n[PROOFSTEP]\nrw [norm_add_sq_eq_norm_sq_add_norm_sq_real h, pow_two, add_sub_cancel', ← pow_two, ← div_pow,\n Real.sqrt_sq (div_nonneg (norm_nonneg _) (norm_nonneg _))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ angle x (x + y) = Real.arctan (‖y‖ / ‖x‖)\n[PROOFSTEP]\nrw [angle_add_eq_arcsin_of_inner_eq_zero h (Or.inl h0), Real.arctan_eq_arcsin, ← div_mul_eq_div_div,\n norm_add_eq_sqrt_iff_real_inner_eq_zero.2 h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ Real.arcsin (‖y‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)) = Real.arcsin (‖y‖ / (‖x‖ * Real.sqrt (↑1 + (‖y‖ / ‖x‖) ^ 2)))\n[PROOFSTEP]\nnth_rw 3 [← Real.sqrt_sq (norm_nonneg x)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ Real.arcsin (‖y‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)) =\n Real.arcsin (‖y‖ / (Real.sqrt (‖x‖ ^ 2) * Real.sqrt (↑1 + (‖y‖ / ‖x‖) ^ 2)))\n[PROOFSTEP]\nrw_mod_cast [← Real.sqrt_mul (sq_nonneg _), div_pow, pow_two, pow_two, mul_add, mul_one, mul_div, mul_comm (‖x‖ * ‖x‖),\n ← mul_div, div_self (mul_self_pos.2 (norm_ne_zero_iff.2 h0)).ne', mul_one]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ 0 < angle x (x + y)\n[PROOFSTEP]\nrw [angle_add_eq_arccos_of_inner_eq_zero h, Real.arccos_pos, norm_add_eq_sqrt_iff_real_inner_eq_zero.2 h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖x‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖) < 1\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\nhx : x = 0\n⊢ ‖x‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖) < 1\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\nhx : ¬x = 0\n⊢ ‖x‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖) < 1\n[PROOFSTEP]\nrw [div_lt_one\n (Real.sqrt_pos.2 (Left.add_pos_of_pos_of_nonneg (mul_self_pos.2 (norm_ne_zero_iff.2 hx)) (mul_self_nonneg _))),\n Real.lt_sqrt (norm_nonneg _), pow_two]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\nhx : ¬x = 0\n⊢ ‖x‖ * ‖x‖ < ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nsimpa [hx] using h0\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ angle x (x + y) ≤ π / 2\n[PROOFSTEP]\nrw [angle_add_eq_arccos_of_inner_eq_zero h, Real.arccos_le_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ 0 ≤ ‖x‖ / ‖x + y‖\n[PROOFSTEP]\nexact div_nonneg (norm_nonneg _) (norm_nonneg _)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ angle x (x + y) < π / 2\n[PROOFSTEP]\nrw [angle_add_eq_arccos_of_inner_eq_zero h, Real.arccos_lt_pi_div_two, norm_add_eq_sqrt_iff_real_inner_eq_zero.2 h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ 0 < ‖x‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)\n[PROOFSTEP]\nexact\n div_pos (norm_pos_iff.2 h0)\n (Real.sqrt_pos.2 (Left.add_pos_of_pos_of_nonneg (mul_self_pos.2 (norm_ne_zero_iff.2 h0)) (mul_self_nonneg _)))\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.cos (angle x (x + y)) = ‖x‖ / ‖x + y‖\n[PROOFSTEP]\nrw [angle_add_eq_arccos_of_inner_eq_zero h,\n Real.cos_arccos (le_trans (by norm_num) (div_nonneg (norm_nonneg _) (norm_nonneg _)))\n (div_le_one_of_le _ (norm_nonneg _))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ -1 ≤ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ ‖x‖ ≤ ‖x + y‖\n[PROOFSTEP]\nrw [mul_self_le_mul_self_iff (norm_nonneg _) (norm_nonneg _), norm_add_sq_eq_norm_sq_add_norm_sq_real h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ ‖x‖ * ‖x‖ ≤ ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nexact le_add_of_nonneg_right (mul_self_nonneg _)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ Real.sin (angle x (x + y)) = ‖y‖ / ‖x + y‖\n[PROOFSTEP]\nrw [angle_add_eq_arcsin_of_inner_eq_zero h h0,\n Real.sin_arcsin (le_trans (by norm_num) (div_nonneg (norm_nonneg _) (norm_nonneg _)))\n (div_le_one_of_le _ (norm_nonneg _))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ -1 ≤ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ ‖y‖ ≤ ‖x + y‖\n[PROOFSTEP]\nrw [mul_self_le_mul_self_iff (norm_nonneg _) (norm_nonneg _), norm_add_sq_eq_norm_sq_add_norm_sq_real h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ ‖y‖ * ‖y‖ ≤ ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nexact le_add_of_nonneg_left (mul_self_nonneg _)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.tan (angle x (x + y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nby_cases h0 : x = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0\n⊢ Real.tan (angle x (x + y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬x = 0\n⊢ Real.tan (angle x (x + y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nrw [angle_add_eq_arctan_of_inner_eq_zero h h0, Real.tan_arctan]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.cos (angle x (x + y)) * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nrw [cos_angle_add_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nby_cases hxy : ‖x + y‖ = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nhxy : ‖x + y‖ = 0\n⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nhave h' := norm_add_sq_eq_norm_sq_add_norm_sq_real h\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nhxy : ‖x + y‖ = 0\nh' : ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nrw [hxy, zero_mul, eq_comm, add_eq_zero_iff' (mul_self_nonneg ‖x‖) (mul_self_nonneg ‖y‖), mul_self_eq_zero] at h' \n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nhxy : ‖x + y‖ = 0\nh' : ‖x‖ = 0 ∧ ‖y‖ * ‖y‖ = 0\n⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nsimp [h'.1]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nhxy : ¬‖x + y‖ = 0\n⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nexact div_mul_cancel _ hxy\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.sin (angle x (x + y)) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nby_cases h0 : x = 0 ∧ y = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∧ y = 0\n⊢ Real.sin (angle x (x + y)) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬(x = 0 ∧ y = 0)\n⊢ Real.sin (angle x (x + y)) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nrw [not_and_or] at h0 \n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬x = 0 ∨ ¬y = 0\n⊢ Real.sin (angle x (x + y)) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nrw [sin_angle_add_of_inner_eq_zero h h0, div_mul_cancel]\n[GOAL]\ncase neg.h\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬x = 0 ∨ ¬y = 0\n⊢ ‖x + y‖ ≠ 0\n[PROOFSTEP]\nrw [← mul_self_ne_zero, norm_add_sq_eq_norm_sq_add_norm_sq_real h]\n[GOAL]\ncase neg.h\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬x = 0 ∨ ¬y = 0\n⊢ ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ≠ 0\n[PROOFSTEP]\nrefine' (ne_of_lt _).symm\n[GOAL]\ncase neg.h\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬x = 0 ∨ ¬y = 0\n⊢ 0 < ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrcases h0 with (h0 | h0)\n[GOAL]\ncase neg.h.inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬x = 0\n⊢ 0 < ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nexact Left.add_pos_of_pos_of_nonneg (mul_self_pos.2 (norm_ne_zero_iff.2 h0)) (mul_self_nonneg _)\n[GOAL]\ncase neg.h.inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : ¬y = 0\n⊢ 0 < ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nexact Left.add_pos_of_nonneg_of_pos (mul_self_nonneg _) (mul_self_pos.2 (norm_ne_zero_iff.2 h0))\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ Real.tan (angle x (x + y)) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [tan_angle_add_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ ‖y‖ / ‖x‖ * ‖x‖ = ‖y‖\n[PROOFSTEP]\nrcases h0 with (h0 | h0)\n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ ‖y‖ / ‖x‖ * ‖x‖ = ‖y‖\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : y = 0\n⊢ ‖y‖ / ‖x‖ * ‖x‖ = ‖y‖\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ ‖x‖ / Real.cos (angle x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nrw [cos_angle_add_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ ‖x‖ / (‖x‖ / ‖x + y‖) = ‖x + y‖\n[PROOFSTEP]\nrcases h0 with (h0 | h0)\n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ ‖x‖ / (‖x‖ / ‖x + y‖) = ‖x + y‖\n[PROOFSTEP]\nrw [div_div_eq_mul_div, mul_comm, div_eq_mul_inv, mul_inv_cancel_right₀ (norm_ne_zero_iff.2 h0)]\n[GOAL]\ncase inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : y = 0\n⊢ ‖x‖ / (‖x‖ / ‖x + y‖) = ‖x + y‖\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖y‖ / Real.sin (angle x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nrcases h0 with (h0 | h0)\n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0\n⊢ ‖y‖ / Real.sin (angle x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : y ≠ 0\n⊢ ‖y‖ / Real.sin (angle x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nrw [sin_angle_add_of_inner_eq_zero h (Or.inr h0), div_div_eq_mul_div, mul_comm, div_eq_mul_inv,\n mul_inv_cancel_right₀ (norm_ne_zero_iff.2 h0)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖y‖ / Real.tan (angle x (x + y)) = ‖x‖\n[PROOFSTEP]\nrw [tan_angle_add_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖y‖ / (‖y‖ / ‖x‖) = ‖x‖\n[PROOFSTEP]\nrcases h0 with (h0 | h0)\n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0\n⊢ ‖y‖ / (‖y‖ / ‖x‖) = ‖x‖\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : y ≠ 0\n⊢ ‖y‖ / (‖y‖ / ‖x‖) = ‖x‖\n[PROOFSTEP]\nrw [div_div_eq_mul_div, mul_comm, div_eq_mul_inv, mul_inv_cancel_right₀ (norm_ne_zero_iff.2 h0)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ angle x (x - y) = Real.arccos (‖x‖ / ‖x - y‖)\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\n⊢ angle x (x - y) = Real.arccos (‖x‖ / ‖x - y‖)\n[PROOFSTEP]\nrw [sub_eq_add_neg, angle_add_eq_arccos_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ angle x (x - y) = Real.arcsin (‖y‖ / ‖x - y‖)\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ angle x (x - y) = Real.arcsin (‖y‖ / ‖x - y‖)\n[PROOFSTEP]\nrw [or_comm, ← neg_ne_zero, or_comm] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ -y ≠ 0\n⊢ angle x (x - y) = Real.arcsin (‖y‖ / ‖x - y‖)\n[PROOFSTEP]\nrw [sub_eq_add_neg, angle_add_eq_arcsin_of_inner_eq_zero h h0, norm_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ angle x (x - y) = Real.arctan (‖y‖ / ‖x‖)\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0\n⊢ angle x (x - y) = Real.arctan (‖y‖ / ‖x‖)\n[PROOFSTEP]\nrw [sub_eq_add_neg, angle_add_eq_arctan_of_inner_eq_zero h h0, norm_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ 0 < angle x (x - y)\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ 0 < angle x (x - y)\n[PROOFSTEP]\nrw [← neg_ne_zero] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x = 0 ∨ -y ≠ 0\n⊢ 0 < angle x (x - y)\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x = 0 ∨ -y ≠ 0\n⊢ 0 < angle x (x + -y)\n[PROOFSTEP]\nexact angle_add_pos_of_inner_eq_zero h h0\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ angle x (x - y) ≤ π / 2\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\n⊢ angle x (x - y) ≤ π / 2\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\n⊢ angle x (x + -y) ≤ π / 2\n[PROOFSTEP]\nexact angle_add_le_pi_div_two_of_inner_eq_zero h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0\n⊢ angle x (x - y) < π / 2\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0\n⊢ angle x (x - y) < π / 2\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0\n⊢ angle x (x + -y) < π / 2\n[PROOFSTEP]\nexact angle_add_lt_pi_div_two_of_inner_eq_zero h h0\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.cos (angle x (x - y)) = ‖x‖ / ‖x - y‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\n⊢ Real.cos (angle x (x - y)) = ‖x‖ / ‖x - y‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, cos_angle_add_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ Real.sin (angle x (x - y)) = ‖y‖ / ‖x - y‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ y ≠ 0\n⊢ Real.sin (angle x (x - y)) = ‖y‖ / ‖x - y‖\n[PROOFSTEP]\nrw [or_comm, ← neg_ne_zero, or_comm] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ -y ≠ 0\n⊢ Real.sin (angle x (x - y)) = ‖y‖ / ‖x - y‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, sin_angle_add_of_inner_eq_zero h h0, norm_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.tan (angle x (x - y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\n⊢ Real.tan (angle x (x - y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, tan_angle_add_of_inner_eq_zero h, norm_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.cos (angle x (x - y)) * ‖x - y‖ = ‖x‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\n⊢ Real.cos (angle x (x - y)) * ‖x - y‖ = ‖x‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, cos_angle_add_mul_norm_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\n⊢ Real.sin (angle x (x - y)) * ‖x - y‖ = ‖y‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\n⊢ Real.sin (angle x (x - y)) * ‖x - y‖ = ‖y‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, sin_angle_add_mul_norm_of_inner_eq_zero h, norm_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ Real.tan (angle x (x - y)) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ Real.tan (angle x (x - y)) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← neg_eq_zero] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ -y = 0\n⊢ Real.tan (angle x (x - y)) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, tan_angle_add_mul_norm_of_inner_eq_zero h h0, norm_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ y = 0\n⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nrw [← neg_eq_zero] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x ≠ 0 ∨ -y = 0\n⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, norm_div_cos_angle_add_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖y‖ / Real.sin (angle x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖y‖ / Real.sin (angle x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nrw [← neg_ne_zero] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x = 0 ∨ -y ≠ 0\n⊢ ‖y‖ / Real.sin (angle x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← norm_neg, norm_div_sin_angle_add_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x y = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖\n[PROOFSTEP]\nrw [← neg_eq_zero, ← inner_neg_right] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x = 0 ∨ y ≠ 0\n⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖\n[PROOFSTEP]\nrw [← neg_ne_zero] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : inner x (-y) = 0\nh0 : x = 0 ∨ -y ≠ 0\n⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← norm_neg, norm_div_tan_angle_add_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\n⊢ dist p1 p3 * dist p1 p3 = dist p1 p2 * dist p1 p2 + dist p3 p2 * dist p3 p2 ↔ ∠ p1 p2 p3 = π / 2\n[PROOFSTEP]\nerw [dist_comm p3 p2, dist_eq_norm_vsub V p1 p3, dist_eq_norm_vsub V p1 p2, dist_eq_norm_vsub V p2 p3, ←\n norm_sub_sq_eq_norm_sq_add_norm_sq_iff_angle_eq_pi_div_two, vsub_sub_vsub_cancel_right p1, ←\n neg_vsub_eq_vsub_rev p2 p3, norm_neg]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\n⊢ ∠ p₂ p₃ p₁ = Real.arccos (dist p₃ p₂ / dist p₁ p₃)\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\n⊢ ∠ p₂ p₃ p₁ = Real.arccos (dist p₃ p₂ / dist p₁ p₃)\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub' V p₃ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n angle_add_eq_arccos_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂\n⊢ ∠ p₂ p₃ p₁ = Real.arcsin (dist p₁ p₂ / dist p₁ p₃)\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂\n⊢ ∠ p₂ p₃ p₁ = Real.arcsin (dist p₁ p₂ / dist p₁ p₃)\n[PROOFSTEP]\nrw [← @vsub_ne_zero V, @ne_comm _ p₃, ← @vsub_ne_zero V _ _ _ p₂, or_comm] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ ≠ 0 ∨ p₁ -ᵥ p₂ ≠ 0\n⊢ ∠ p₂ p₃ p₁ = Real.arcsin (dist p₁ p₂ / dist p₁ p₃)\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n angle_add_eq_arcsin_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₃ ≠ p₂\n⊢ ∠ p₂ p₃ p₁ = Real.arctan (dist p₁ p₂ / dist p₃ p₂)\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₃ ≠ p₂\n⊢ ∠ p₂ p₃ p₁ = Real.arctan (dist p₁ p₂ / dist p₃ p₂)\n[PROOFSTEP]\nrw [ne_comm, ← @vsub_ne_zero V] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ ≠ 0\n⊢ ∠ p₂ p₃ p₁ = Real.arctan (dist p₁ p₂ / dist p₃ p₂)\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub' V p₃ p₂, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n angle_add_eq_arctan_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₁ ≠ p₂ ∨ p₃ = p₂\n⊢ 0 < ∠ p₂ p₃ p₁\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₁ ≠ p₂ ∨ p₃ = p₂\n⊢ 0 < ∠ p₂ p₃ p₁\n[PROOFSTEP]\nrw [← @vsub_ne_zero V, eq_comm, ← @vsub_eq_zero_iff_eq V, or_comm] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ = 0 ∨ p₁ -ᵥ p₂ ≠ 0\n⊢ 0 < ∠ p₂ p₃ p₁\n[PROOFSTEP]\nrw [angle, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ = 0 ∨ p₁ -ᵥ p₂ ≠ 0\n⊢ 0 < InnerProductGeometry.angle (p₂ -ᵥ p₃) (p₂ -ᵥ p₃ + (p₁ -ᵥ p₂))\n[PROOFSTEP]\nexact angle_add_pos_of_inner_eq_zero h h0\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\n⊢ ∠ p₂ p₃ p₁ ≤ π / 2\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\n⊢ ∠ p₂ p₃ p₁ ≤ π / 2\n[PROOFSTEP]\nrw [angle, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\n⊢ InnerProductGeometry.angle (p₂ -ᵥ p₃) (p₂ -ᵥ p₃ + (p₁ -ᵥ p₂)) ≤ π / 2\n[PROOFSTEP]\nexact angle_add_le_pi_div_two_of_inner_eq_zero h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₃ ≠ p₂\n⊢ ∠ p₂ p₃ p₁ < π / 2\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₃ ≠ p₂\n⊢ ∠ p₂ p₃ p₁ < π / 2\n[PROOFSTEP]\nrw [ne_comm, ← @vsub_ne_zero V] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ ≠ 0\n⊢ ∠ p₂ p₃ p₁ < π / 2\n[PROOFSTEP]\nrw [angle, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ ≠ 0\n⊢ InnerProductGeometry.angle (p₂ -ᵥ p₃) (p₂ -ᵥ p₃ + (p₁ -ᵥ p₂)) < π / 2\n[PROOFSTEP]\nexact angle_add_lt_pi_div_two_of_inner_eq_zero h h0\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\n⊢ Real.cos (∠ p₂ p₃ p₁) = dist p₃ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\n⊢ Real.cos (∠ p₂ p₃ p₁) = dist p₃ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub' V p₃ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n cos_angle_add_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂\n⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂\n⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [← @vsub_ne_zero V, @ne_comm _ p₃, ← @vsub_ne_zero V _ _ _ p₂, or_comm] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ ≠ 0 ∨ p₁ -ᵥ p₂ ≠ 0\n⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n sin_angle_add_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\n⊢ Real.tan (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₃ p₂\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\n⊢ Real.tan (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₃ p₂\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub' V p₃ p₂, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n tan_angle_add_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\n⊢ Real.cos (∠ p₂ p₃ p₁) * dist p₁ p₃ = dist p₃ p₂\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\n⊢ Real.cos (∠ p₂ p₃ p₁) * dist p₁ p₃ = dist p₃ p₂\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub' V p₃ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n cos_angle_add_mul_norm_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\n⊢ Real.sin (∠ p₂ p₃ p₁) * dist p₁ p₃ = dist p₁ p₂\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\n⊢ Real.sin (∠ p₂ p₃ p₁) * dist p₁ p₃ = dist p₁ p₂\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n sin_angle_add_mul_norm_of_inner_eq_zero h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₁ = p₂ ∨ p₃ ≠ p₂\n⊢ Real.tan (∠ p₂ p₃ p₁) * dist p₃ p₂ = dist p₁ p₂\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₁ = p₂ ∨ p₃ ≠ p₂\n⊢ Real.tan (∠ p₂ p₃ p₁) * dist p₃ p₂ = dist p₁ p₂\n[PROOFSTEP]\nrw [ne_comm, ← @vsub_ne_zero V, ← @vsub_eq_zero_iff_eq V, or_comm] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ ≠ 0 ∨ p₁ -ᵥ p₂ = 0\n⊢ Real.tan (∠ p₂ p₃ p₁) * dist p₃ p₂ = dist p₁ p₂\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub' V p₃ p₂, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n tan_angle_add_mul_norm_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₁ = p₂ ∨ p₃ ≠ p₂\n⊢ dist p₃ p₂ / Real.cos (∠ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₁ = p₂ ∨ p₃ ≠ p₂\n⊢ dist p₃ p₂ / Real.cos (∠ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [ne_comm, ← @vsub_ne_zero V, ← @vsub_eq_zero_iff_eq V, or_comm] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ ≠ 0 ∨ p₁ -ᵥ p₂ = 0\n⊢ dist p₃ p₂ / Real.cos (∠ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub' V p₃ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n norm_div_cos_angle_add_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₁ ≠ p₂ ∨ p₃ = p₂\n⊢ dist p₁ p₂ / Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₁ ≠ p₂ ∨ p₃ = p₂\n⊢ dist p₁ p₂ / Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [eq_comm, ← @vsub_ne_zero V, ← @vsub_eq_zero_iff_eq V, or_comm] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ = 0 ∨ p₁ -ᵥ p₂ ≠ 0\n⊢ dist p₁ p₂ / Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n norm_div_sin_angle_add_of_inner_eq_zero h h0]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π / 2\nh0 : p₁ ≠ p₂ ∨ p₃ = p₂\n⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂\n[PROOFSTEP]\nrw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,\n neg_vsub_eq_vsub_rev] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₁ ≠ p₂ ∨ p₃ = p₂\n⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂\n[PROOFSTEP]\nrw [eq_comm, ← @vsub_ne_zero V, ← @vsub_eq_zero_iff_eq V, or_comm] at h0 \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0\nh0 : p₂ -ᵥ p₃ = 0 ∨ p₁ -ᵥ p₂ ≠ 0\n⊢ dist p₁ p₂ / Real.tan (∠ p₂ p₃ p₁) = dist p₃ p₂\n[PROOFSTEP]\nrw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub' V p₃ p₂, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,\n norm_div_tan_angle_add_of_inner_eq_zero h h0]\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle", "llama_tokens": 22688, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8856314738181875, "lm_q2_score": 0.7185943985973772, "lm_q1q2_score": 0.6364098163072892}} {"text": "[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : IsROrC 𝕜\ninst✝ : MeasurableSpace α\nf : α → 𝕜\nμ : MeasureTheory.Measure α\nhre : Measurable fun x => ↑IsROrC.re (f x)\nhim : Measurable fun x => ↑IsROrC.im (f x)\n⊢ Measurable f\n[PROOFSTEP]\nconvert\n Measurable.add (M := 𝕜) (IsROrC.measurable_ofReal.comp hre) ((IsROrC.measurable_ofReal.comp him).mul_const IsROrC.I)\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : IsROrC 𝕜\ninst✝ : MeasurableSpace α\nf : α → 𝕜\nμ : MeasureTheory.Measure α\nhre : Measurable fun x => ↑IsROrC.re (f x)\nhim : Measurable fun x => ↑IsROrC.im (f x)\nx✝ : α\n⊢ f x✝ = (IsROrC.ofReal ∘ fun x => ↑IsROrC.re (f x)) x✝ + (IsROrC.ofReal ∘ fun x => ↑IsROrC.im (f x)) x✝ * IsROrC.I\n[PROOFSTEP]\nexact (IsROrC.re_add_im _).symm\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : IsROrC 𝕜\ninst✝ : MeasurableSpace α\nf : α → 𝕜\nμ : MeasureTheory.Measure α\nhre : AEMeasurable fun x => ↑IsROrC.re (f x)\nhim : AEMeasurable fun x => ↑IsROrC.im (f x)\n⊢ AEMeasurable f\n[PROOFSTEP]\nconvert\n AEMeasurable.add (M := 𝕜) (IsROrC.measurable_ofReal.comp_aemeasurable hre)\n ((IsROrC.measurable_ofReal.comp_aemeasurable him).mul_const IsROrC.I)\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : IsROrC 𝕜\ninst✝ : MeasurableSpace α\nf : α → 𝕜\nμ : MeasureTheory.Measure α\nhre : AEMeasurable fun x => ↑IsROrC.re (f x)\nhim : AEMeasurable fun x => ↑IsROrC.im (f x)\nx✝ : α\n⊢ f x✝ = (IsROrC.ofReal ∘ fun x => ↑IsROrC.re (f x)) x✝ + (IsROrC.ofReal ∘ fun x => ↑IsROrC.im (f x)) x✝ * IsROrC.I\n[PROOFSTEP]\nexact (IsROrC.re_add_im _).symm\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.SpecialFunctions.IsROrC", "llama_tokens": 808, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245953120233, "lm_q2_score": 0.7634837581726991, "lm_q1q2_score": 0.6362297938065671}} {"text": "[GOAL]\nm n : ℕ\n⊢ ¬n % 2 = 1 ↔ n % 2 = 0\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h h\n[GOAL]\ncase inl\nm n : ℕ\nh : n % 2 = 0\n⊢ ¬n % 2 = 1 ↔ n % 2 = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nm n : ℕ\nh : n % 2 = 1\n⊢ ¬n % 2 = 1 ↔ n % 2 = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nm n : ℕ\n⊢ ¬n % 2 = 0 ↔ n % 2 = 1\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h h\n[GOAL]\ncase inl\nm n : ℕ\nh : n % 2 = 0\n⊢ ¬n % 2 = 0 ↔ n % 2 = 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nm n : ℕ\nh : n % 2 = 1\n⊢ ¬n % 2 = 0 ↔ n % 2 = 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nm✝ n : ℕ\nx✝ : Even n\nm : ℕ\nhm : n = m + m\n⊢ n % 2 = 0\n[PROOFSTEP]\nsimp [← two_mul, hm]\n[GOAL]\nm n : ℕ\nh : n % 2 = 0\n⊢ n % 2 + 2 * (n / 2) = n / 2 + n / 2\n[PROOFSTEP]\nsimp [← two_mul, h]\n[GOAL]\nm✝ n : ℕ\nx✝ : Odd n\nm : ℕ\nhm : n = 2 * m + 1\n⊢ n % 2 = 1\n[PROOFSTEP]\nrw [hm, add_mod, mul_mod_right]\n[GOAL]\nm✝ n : ℕ\nx✝ : Odd n\nm : ℕ\nhm : n = 2 * m + 1\n⊢ (0 + 1 % 2) % 2 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ\nh : n % 2 = 1\n⊢ n % 2 + 2 * (n / 2) = 2 * (n / 2) + 1\n[PROOFSTEP]\nrw [h, add_comm]\n[GOAL]\nm n : ℕ\n⊢ ¬Even n ↔ n % 2 = 1\n[PROOFSTEP]\nrw [even_iff, mod_two_ne_zero]\n[GOAL]\nm n : ℕ\n⊢ ¬Odd n ↔ n % 2 = 0\n[PROOFSTEP]\nrw [odd_iff, mod_two_ne_one]\n[GOAL]\nm n : ℕ\n⊢ Even n ↔ ¬Odd n\n[PROOFSTEP]\nrw [not_odd_iff, even_iff]\n[GOAL]\nm n : ℕ\n⊢ Odd n ↔ ¬Even n\n[PROOFSTEP]\nrw [not_even_iff, odd_iff]\n[GOAL]\nm n : ℕ\nh : Odd n\n⊢ ¬2 ∣ n\n[PROOFSTEP]\nrwa [← even_iff_two_dvd, ← odd_iff_not_even]\n[GOAL]\nm n : ℕ\n⊢ IsCompl {n | Even n} {n | Odd n}\n[PROOFSTEP]\nsimp only [← Set.compl_setOf, isCompl_compl, odd_iff_not_even]\n[GOAL]\nm n✝ n : ℕ\n⊢ Xor' (Even n) (Odd n)\n[PROOFSTEP]\nsimp [Xor', odd_iff_not_even, Decidable.em (Even n)]\n[GOAL]\nm n✝ n : ℕ\n⊢ ∃ k, n = 2 * k ∨ n = 2 * k + 1\n[PROOFSTEP]\nsimpa only [← two_mul, exists_or, Odd, Even] using even_or_odd n\n[GOAL]\nm n✝ n : ℕ\n⊢ ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1)\n[PROOFSTEP]\nrcases even_or_odd n with (⟨k, rfl⟩ | ⟨k, rfl⟩)\n[GOAL]\ncase inl.intro\nm n k : ℕ\n⊢ ∃ k_1, Xor' (k + k = 2 * k_1) (k + k = 2 * k_1 + 1)\n[PROOFSTEP]\nuse k\n[GOAL]\ncase inr.intro\nm n k : ℕ\n⊢ ∃ k_1, Xor' (2 * k + 1 = 2 * k_1) (2 * k + 1 = 2 * k_1 + 1)\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nm n k : ℕ\n⊢ Xor' (k + k = 2 * k) (k + k = 2 * k + 1)\n[PROOFSTEP]\nsimpa only [← two_mul, eq_self_iff_true, xor_true] using (succ_ne_self (2 * k)).symm\n[GOAL]\ncase h\nm n k : ℕ\n⊢ Xor' (2 * k + 1 = 2 * k) (2 * k + 1 = 2 * k + 1)\n[PROOFSTEP]\nsimpa only [xor_true, xor_comm] using (succ_ne_self _)\n[GOAL]\nm✝ n✝ m n : ℕ\nhn : Odd n\nhm : Even m\n⊢ m % 2 + (m + n) % 2 = 1\n[PROOFSTEP]\nrw [even_iff.1 hm, odd_iff.1 (hm.add_odd hn)]\n[GOAL]\nm✝ n✝ m n : ℕ\nhn : Odd n\nhm : Odd m\n⊢ m % 2 + (m + n) % 2 = 1\n[PROOFSTEP]\nrw [odd_iff.1 hm, even_iff.1 (hm.add_odd hn)]\n[GOAL]\nm✝ n m : ℕ\n⊢ (m + 1) % 2 + m % 2 = 1\n[PROOFSTEP]\nrw [add_comm, mod_two_add_succ_mod_two]\n[GOAL]\nm n : ℕ\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one m with h₁ h₁\n[GOAL]\ncase inl\nm n : ℕ\nh₁ : m % 2 = 0\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inr\nm n : ℕ\nh₁ : m % 2 = 1\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inl.inl\nm n : ℕ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 0\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.add_mod]\n[GOAL]\ncase inl.inr\nm n : ℕ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 1\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.add_mod]\n[GOAL]\ncase inr.inl\nm n : ℕ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 0\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.add_mod]\n[GOAL]\ncase inr.inr\nm n : ℕ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 1\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.add_mod]\n[GOAL]\nm n : ℕ\n⊢ Even (m + n) ↔ (Odd m ↔ Odd n)\n[PROOFSTEP]\nrw [even_add, even_iff_not_odd, even_iff_not_odd, not_iff_not]\n[GOAL]\nm n : ℕ\n⊢ Even (n + 1) ↔ ¬Even n\n[PROOFSTEP]\nsimp [even_add]\n[GOAL]\nm n✝ n : ℕ\n⊢ ¬Even (bit1 n)\n[PROOFSTEP]\nsimp [bit1, parity_simps]\n[GOAL]\nm n✝ n : ℕ\n⊢ ¬2 ∣ 2 * n + 1\n[PROOFSTEP]\nsimp [add_mod]\n[GOAL]\nm n : ℕ\nh : n ≤ m\n⊢ Even (m - n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nconv_rhs => rw [← tsub_add_cancel_of_le h, even_add]\n[GOAL]\nm n : ℕ\nh : n ≤ m\n| Even m ↔ Even n\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le h, even_add]\n[GOAL]\nm n : ℕ\nh : n ≤ m\n| Even m ↔ Even n\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le h, even_add]\n[GOAL]\nm n : ℕ\nh : n ≤ m\n| Even m ↔ Even n\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le h, even_add]\n[GOAL]\nm n : ℕ\nh : n ≤ m\n⊢ Even (m - n) ↔ ((Even (m - n) ↔ Even n) ↔ Even n)\n[PROOFSTEP]\nby_cases h : Even n\n[GOAL]\ncase pos\nm n : ℕ\nh✝ : n ≤ m\nh : Even n\n⊢ Even (m - n) ↔ ((Even (m - n) ↔ Even n) ↔ Even n)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nm n : ℕ\nh✝ : n ≤ m\nh : ¬Even n\n⊢ Even (m - n) ↔ ((Even (m - n) ↔ Even n) ↔ Even n)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nm n : ℕ\nh : n ≤ m\n⊢ Even (m - n) ↔ (Odd m ↔ Odd n)\n[PROOFSTEP]\nrw [even_sub h, even_iff_not_odd, even_iff_not_odd, not_iff_not]\n[GOAL]\nm n : ℕ\nhm : Odd m\nhn : Odd n\nh : n ≤ m\n⊢ Even (m - n)\n[PROOFSTEP]\nsimp only [even_sub' h, *]\n[GOAL]\nm n : ℕ\nhm : Odd m\nhn : Odd n\nh : m ≤ n\n⊢ Even (m - n)\n[PROOFSTEP]\nsimp only [tsub_eq_zero_iff_le.mpr h, even_zero]\n[GOAL]\nm n : ℕ\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one m with h₁ h₁\n[GOAL]\ncase inl\nm n : ℕ\nh₁ : m % 2 = 0\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inr\nm n : ℕ\nh₁ : m % 2 = 1\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inl.inl\nm n : ℕ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 0\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.mul_mod]\n[GOAL]\ncase inl.inr\nm n : ℕ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 1\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.mul_mod]\n[GOAL]\ncase inr.inl\nm n : ℕ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 0\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.mul_mod]\n[GOAL]\ncase inr.inr\nm n : ℕ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 1\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Nat.mul_mod]\n[GOAL]\nm n : ℕ\n⊢ Odd (m * n) ↔ Odd m ∧ Odd n\n[PROOFSTEP]\nsimp [not_or, even_mul]\n[GOAL]\nm n : ℕ\n⊢ Even (m ^ n) ↔ Even m ∧ n ≠ 0\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nm n : ℕ\n⊢ Even (m ^ zero) ↔ Even m ∧ zero ≠ 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) [*, pow_succ', even_mul]\n[GOAL]\ncase succ\nm n✝ n : ℕ\nih : Even (m ^ n) ↔ Even m ∧ n ≠ 0\n⊢ Even (m ^ succ n) ↔ Even m ∧ succ n ≠ 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) [*, pow_succ', even_mul]\n[GOAL]\nm n : ℕ\n⊢ Even (m / n) ↔ m % (2 * n) / n = 0\n[PROOFSTEP]\nrw [even_iff_two_dvd, dvd_iff_mod_eq_zero, Nat.div_mod_eq_mod_mul_div, mul_comm]\n[GOAL]\nm n : ℕ\n⊢ Odd (m + n) ↔ (Odd m ↔ Even n)\n[PROOFSTEP]\nrw [odd_iff_not_even, even_add, not_iff, odd_iff_not_even]\n[GOAL]\nm n : ℕ\n⊢ Odd (m + n) ↔ (Odd n ↔ Even m)\n[PROOFSTEP]\nrw [add_comm, odd_add]\n[GOAL]\nm n : ℕ\nh : Odd (m + n)\nhnot : m = n\n⊢ False\n[PROOFSTEP]\nsimp [hnot] at h \n[GOAL]\nm n : ℕ\nh : n ≤ m\n⊢ Odd (m - n) ↔ (Odd m ↔ Even n)\n[PROOFSTEP]\nrw [odd_iff_not_even, even_sub h, not_iff, odd_iff_not_even]\n[GOAL]\nm n : ℕ\nh : n ≤ m\n⊢ Odd (m - n) ↔ (Odd n ↔ Even m)\n[PROOFSTEP]\nrw [odd_iff_not_even, even_sub h, not_iff, not_iff_comm, odd_iff_not_even]\n[GOAL]\nm n✝ n : ℕ\n⊢ Even (n * (n + 1))\n[PROOFSTEP]\nrw [even_mul, even_add_one]\n[GOAL]\nm n✝ n : ℕ\n⊢ Even n ∨ ¬Even n\n[PROOFSTEP]\nexact em _\n[GOAL]\nm n : ℕ\nh : Odd n\n⊢ 2 * (n / 2) + 1 = n\n[PROOFSTEP]\nrw [← odd_iff.mp h, div_add_mod]\n[GOAL]\nm n : ℕ\nh : Odd n\n⊢ n / 2 * 2 + 1 = n\n[PROOFSTEP]\nrw [← odd_iff.mp h, div_add_mod']\n[GOAL]\nm n : ℕ\nh : Odd n\n⊢ 1 + n / 2 * 2 = n\n[PROOFSTEP]\nrw [← odd_iff.mp h, mod_add_div']\n[GOAL]\nm n : ℕ\n⊢ bit0 n / 2 = n\n[PROOFSTEP]\nrw [← Nat.bit0_eq_bit0, bit0_eq_two_mul, two_mul_div_two_of_even (even_bit0 n)]\n[GOAL]\nm n : ℕ\n⊢ bit1 n / 2 = n\n[PROOFSTEP]\nrw [← Nat.bit1_eq_bit1, bit1, bit0_eq_two_mul, Nat.two_mul_div_two_add_one_of_odd (odd_bit1 n)]\n[GOAL]\nm n : ℕ\n⊢ bit0 n / bit0 m = n / m\n[PROOFSTEP]\nrw [bit0_eq_two_mul m, ← Nat.div_div_eq_div_mul, bit0_div_two]\n[GOAL]\nm n : ℕ\n⊢ bit1 n / bit0 m = n / m\n[PROOFSTEP]\nrw [bit0_eq_two_mul, ← Nat.div_div_eq_div_mul, bit1_div_two]\n[GOAL]\nm n : ℕ\n⊢ bit0 n % bit0 m = bit0 (n % m)\n[PROOFSTEP]\nrw [bit0_eq_two_mul n, bit0_eq_two_mul m, bit0_eq_two_mul (n % m), Nat.mul_mod_mul_left]\n[GOAL]\nm n : ℕ\n⊢ bit1 n % bit0 m = bit1 (n % m)\n[PROOFSTEP]\nhave h₁ :=\n congr_arg bit1\n (Nat.div_add_mod n m)\n -- `∀ m n : ℕ, bit0 m * n = bit0 (m * n)` seems to be missing...\n[GOAL]\nm n : ℕ\nh₁ : bit1 (m * (n / m) + n % m) = bit1 n\n⊢ bit1 n % bit0 m = bit1 (n % m)\n[PROOFSTEP]\nrw [bit1_add, bit0_eq_two_mul, ← mul_assoc, ← bit0_eq_two_mul] at h₁ \n[GOAL]\nm n : ℕ\nh₁ : bit0 m * (n / m) + bit1 (n % m) = bit1 n\n⊢ bit1 n % bit0 m = bit1 (n % m)\n[PROOFSTEP]\nhave h₂ := Nat.div_add_mod (bit1 n) (bit0 m)\n[GOAL]\nm n : ℕ\nh₁ : bit0 m * (n / m) + bit1 (n % m) = bit1 n\nh₂ : bit0 m * (bit1 n / bit0 m) + bit1 n % bit0 m = bit1 n\n⊢ bit1 n % bit0 m = bit1 (n % m)\n[PROOFSTEP]\nrw [bit1_div_bit0] at h₂ \n[GOAL]\nm n : ℕ\nh₁ : bit0 m * (n / m) + bit1 (n % m) = bit1 n\nh₂ : bit0 m * (n / m) + bit1 n % bit0 m = bit1 n\n⊢ bit1 n % bit0 m = bit1 (n % m)\n[PROOFSTEP]\nexact add_left_cancel (h₂.trans h₁.symm)\n[GOAL]\nm✝ n✝ m n : ℕ\nh : Even m\n⊢ ¬Even (n + 3) ↔ Even (m ^ 2 + m + n)\n[PROOFSTEP]\nsimp [*, two_ne_zero, parity_simps]\n /- Porting note: the `simp` lemmas about `bit*` no longer apply, but `simp` in Lean 4 currently\n simplifies decidable propositions. This may change in the future. -/\n[GOAL]\nm n : ℕ\n⊢ ¬Even 25394535\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nf : α → α\nn✝ : ℕ\nhf : Involutive f\nn : ℕ\n⊢ f^[bit0 n] = id\n[PROOFSTEP]\nrw [bit0, ← two_mul, iterate_mul, involutive_iff_iter_2_eq_id.1 hf, iterate_id]\n[GOAL]\nα : Type u_1\nf : α → α\nn✝ : ℕ\nhf : Involutive f\nn : ℕ\n⊢ f^[bit1 n] = f\n[PROOFSTEP]\nrw [bit1, ← succ_eq_add_one, iterate_succ, hf.iterate_bit0, comp.left_id]\n[GOAL]\nα : Type u_1\nf : α → α\nn✝ : ℕ\nhf : Involutive f\nn : ℕ\n⊢ f^[2 * n] = id\n[PROOFSTEP]\nrw [iterate_mul, involutive_iff_iter_2_eq_id.1 hf, iterate_id]\n[GOAL]\nα : Type u_1\nf : α → α\nn : ℕ\nhf : Involutive f\nhn : Even n\n⊢ f^[n] = id\n[PROOFSTEP]\nrcases hn with ⟨m, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nf : α → α\nhf : Involutive f\nm : ℕ\n⊢ f^[m + m] = id\n[PROOFSTEP]\nrw [← two_mul, hf.iterate_two_mul]\n[GOAL]\nα : Type u_1\nf : α → α\nn : ℕ\nhf : Involutive f\nhn : Odd n\n⊢ f^[n] = f\n[PROOFSTEP]\nrcases hn with ⟨m, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nf : α → α\nhf : Involutive f\nm : ℕ\n⊢ f^[2 * m + 1] = f\n[PROOFSTEP]\nrw [iterate_add, hf.iterate_two_mul, comp.left_id, iterate_one]\n[GOAL]\nα : Type u_1\nf : α → α\nn : ℕ\nhf : Involutive f\nhne : f ≠ id\nH : f^[n] = f\nhn : Even n\n⊢ f = id\n[PROOFSTEP]\nrwa [hf.iterate_even hn, eq_comm] at H \n[GOAL]\nα : Type u_1\nf : α → α\nn : ℕ\nhf : Involutive f\nhne : f ≠ id\nH : f^[n] = id\nhn : Odd n\n⊢ f = id\n[PROOFSTEP]\nrwa [hf.iterate_odd hn] at H \n[GOAL]\nR : Type u_1\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\nn✝ m n : ℕ\nhn : Odd n\nhm : m ∣ n\n⊢ m ≠ 2\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\nn✝ n : ℕ\nhn : Odd n\nhm : 2 ∣ n\n⊢ False\n[PROOFSTEP]\nexact absurd (hn.of_dvd_nat hm) (by decide)\n[GOAL]\nR : Type u_1\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\nn✝ n : ℕ\nhn : Odd n\nhm : 2 ∣ n\n⊢ ¬Odd 2\n[PROOFSTEP]\ndecide\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Parity", "llama_tokens": 6446, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8558511506439707, "lm_q2_score": 0.7431680029241322, "lm_q1q2_score": 0.6360411904244003}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nn : Type u_3\nm : Type u_4\nR : Type u_5\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsSymm A\nhBC : Bᵀ = C\nhD : IsSymm D\n⊢ IsSymm (Matrix.fromBlocks A B C D)\n[PROOFSTEP]\nhave hCB : Cᵀ = B := by\n rw [← hBC]\n simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : Type u_3\nm : Type u_4\nR : Type u_5\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsSymm A\nhBC : Bᵀ = C\nhD : IsSymm D\n⊢ Cᵀ = B\n[PROOFSTEP]\nrw [← hBC]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : Type u_3\nm : Type u_4\nR : Type u_5\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsSymm A\nhBC : Bᵀ = C\nhD : IsSymm D\n⊢ Bᵀᵀ = B\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : Type u_3\nm : Type u_4\nR : Type u_5\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsSymm A\nhBC : Bᵀ = C\nhD : IsSymm D\nhCB : Cᵀ = B\n⊢ IsSymm (Matrix.fromBlocks A B C D)\n[PROOFSTEP]\nunfold Matrix.IsSymm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : Type u_3\nm : Type u_4\nR : Type u_5\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsSymm A\nhBC : Bᵀ = C\nhD : IsSymm D\nhCB : Cᵀ = B\n⊢ (Matrix.fromBlocks A B C D)ᵀ = Matrix.fromBlocks A B C D\n[PROOFSTEP]\nrw [fromBlocks_transpose]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : Type u_3\nm : Type u_4\nR : Type u_5\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsSymm A\nhBC : Bᵀ = C\nhD : IsSymm D\nhCB : Cᵀ = B\n⊢ Matrix.fromBlocks Aᵀ Cᵀ Bᵀ Dᵀ = Matrix.fromBlocks A B C D\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : Type u_3\nm : Type u_4\nR : Type u_5\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsSymm A\nhBC : Bᵀ = C\nhD : IsSymm D\nhCB : Cᵀ = B\n⊢ Matrix.fromBlocks Aᵀ Cᵀ Bᵀ Dᵀ = Matrix.fromBlocks A B C D\n[PROOFSTEP]\nrw [hA, hCB, hBC, hD]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Symmetric", "llama_tokens": 960, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256472515683, "lm_q2_score": 0.7549149868676283, "lm_q1q2_score": 0.6355067974397504}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : LE α\nx : α\nz : β\n⊢ z ∈ Accumulate s x ↔ ∃ y, y ≤ x ∧ z ∈ s y\n[PROOFSTEP]\nsimp_rw [accumulate_def, mem_iUnion₂, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\nx : α\n⊢ ⋃ (y : α) (_ : y ≤ x), Accumulate s y = ⋃ (y : α) (_ : y ≤ x), s y\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\nx : α\n⊢ ⋃ (y : α) (_ : y ≤ x), Accumulate s y ⊆ ⋃ (y : α) (_ : y ≤ x), s y\n[PROOFSTEP]\nexact iUnion₂_subset fun y hy => monotone_accumulate hy\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\nx : α\n⊢ ⋃ (y : α) (_ : y ≤ x), s y ⊆ ⋃ (y : α) (_ : y ≤ x), Accumulate s y\n[PROOFSTEP]\nexact iUnion₂_mono fun y _ => subset_accumulate\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\n⊢ ⋃ (x : α), Accumulate s x = ⋃ (x : α), s x\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\n⊢ ⋃ (x : α), Accumulate s x ⊆ ⋃ (x : α), s x\n[PROOFSTEP]\nsimp only [subset_def, mem_iUnion, exists_imp, mem_accumulate]\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\n⊢ ∀ (x : β) (x_1 x_2 : α), x_2 ≤ x_1 ∧ x ∈ s x_2 → ∃ i, x ∈ s i\n[PROOFSTEP]\nintro z x x' ⟨_, hz⟩\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\nz : β\nx x' : α\nleft✝ : x' ≤ x\nhz : z ∈ s x'\n⊢ ∃ i, z ∈ s i\n[PROOFSTEP]\nexact ⟨x', hz⟩\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : α → Set β\nt : α → Set γ\ninst✝ : Preorder α\n⊢ ⋃ (x : α), s x ⊆ ⋃ (x : α), Accumulate s x\n[PROOFSTEP]\nexact iUnion_mono fun i => subset_accumulate\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Accumulate", "llama_tokens": 1034, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8615382058759129, "lm_q2_score": 0.7371581626286834, "lm_q1q2_score": 0.6350899208779003}} {"text": "[GOAL]\nx : ℤ\n⊢ IsUnit x ↔ |x| = 1\n[PROOFSTEP]\nrw [isUnit_iff_natAbs_eq, abs_eq_natAbs, ← Int.ofNat_one, coe_nat_inj']\n[GOAL]\na : ℤ\nha : IsUnit a\n⊢ a ^ 2 = 1\n[PROOFSTEP]\nrw [sq, isUnit_mul_self ha]\n[GOAL]\nu : ℤˣ\n⊢ u ^ 2 = 1\n[PROOFSTEP]\nrw [Units.ext_iff, Units.val_pow_eq_pow_val, Units.val_one, isUnit_sq u.isUnit]\n[GOAL]\nu : ℤˣ\n⊢ u * u = 1\n[PROOFSTEP]\nrw [← sq, units_sq]\n[GOAL]\nu : ℤˣ\n⊢ u⁻¹ = u\n[PROOFSTEP]\nrw [inv_eq_iff_mul_eq_one, units_mul_self]\n[GOAL]\nu : ℤˣ\n⊢ ↑u * ↑u = 1\n[PROOFSTEP]\nrw [← Units.val_mul, units_mul_self, Units.val_one]\n[GOAL]\nn : ℕ\n⊢ 0 < |(-1)|\n[PROOFSTEP]\nsimp\n[GOAL]\nu : ℤˣ\nn : ℕ\n⊢ u ^ n = u ^ (n % 2)\n[PROOFSTEP]\nconv =>\n lhs\n rw [← Nat.mod_add_div n 2]; rw [pow_add, pow_mul, units_sq, one_pow, mul_one]\n[GOAL]\nu : ℤˣ\nn : ℕ\n| u ^ n = u ^ (n % 2)\n[PROOFSTEP]\n lhs\n rw [← Nat.mod_add_div n 2]; rw [pow_add, pow_mul, units_sq, one_pow, mul_one]\n[GOAL]\nu : ℤˣ\nn : ℕ\n| u ^ n = u ^ (n % 2)\n[PROOFSTEP]\n lhs\n rw [← Nat.mod_add_div n 2]; rw [pow_add, pow_mul, units_sq, one_pow, mul_one]\n[GOAL]\nu : ℤˣ\nn : ℕ\n| u ^ n = u ^ (n % 2)\n[PROOFSTEP]\nlhs\n[GOAL]\nu : ℤˣ\nn : ℕ\n| u ^ n\n[PROOFSTEP]\nrw [← Nat.mod_add_div n 2]\n[GOAL]\nu : ℤˣ\nn : ℕ\n| u ^ (n % 2 + 2 * (n / 2))\n[PROOFSTEP]\nrw [pow_add, pow_mul, units_sq, one_pow, mul_one]\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Order.Units", "llama_tokens": 745, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8376199552262967, "lm_q2_score": 0.7577943767446202, "lm_q1q2_score": 0.6347436919195683}} {"text": "[GOAL]\np q : Primes\nh : ↑p = ↑q\n⊢ ↑p = ↑q\n[PROOFSTEP]\ninjection h\n[GOAL]\nn m : ℕ+\n⊢ 0 < Nat.lcm ↑n ↑m\n[PROOFSTEP]\nlet h := mul_pos n.pos m.pos\n[GOAL]\nn m : ℕ+\nh : 0 < ↑n * ↑m := mul_pos (pos n) (pos m)\n⊢ 0 < Nat.lcm ↑n ↑m\n[PROOFSTEP]\nrw [← gcd_mul_lcm (n : ℕ) (m : ℕ), mul_comm] at h \n[GOAL]\nn m : ℕ+\nh : 0 < Nat.lcm ↑n ↑m * Nat.gcd ↑n ↑m\n⊢ 0 < Nat.lcm ↑n ↑m\n[PROOFSTEP]\nexact pos_of_dvd_of_pos (Dvd.intro (Nat.gcd (n : ℕ) (m : ℕ)) rfl) h\n[GOAL]\nn : ℕ+\n⊢ n < 2 → n = 1\n[PROOFSTEP]\nintro h\n[GOAL]\nn : ℕ+\nh : n < 2\n⊢ n = 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nn : ℕ+\nh : n < 2\n⊢ n ≤ 1\ncase a n : ℕ+ h : n < 2 ⊢ 1 ≤ n\n[PROOFSTEP]\nswap\n[GOAL]\ncase a\nn : ℕ+\nh : n < 2\n⊢ 1 ≤ n\ncase a n : ℕ+ h : n < 2 ⊢ n ≤ 1\n[PROOFSTEP]\napply PNat.one_le\n[GOAL]\ncase a\nn : ℕ+\nh : n < 2\n⊢ n ≤ 1\n[PROOFSTEP]\nexact PNat.lt_add_one_iff.1 h\n[GOAL]\np m : ℕ+\npp : Prime p\n⊢ m ∣ p ↔ m = 1 ∨ m = p\n[PROOFSTEP]\nrw [PNat.dvd_iff]\n[GOAL]\np m : ℕ+\npp : Prime p\n⊢ ↑m ∣ ↑p ↔ m = 1 ∨ m = p\n[PROOFSTEP]\nrw [Nat.dvd_prime pp]\n[GOAL]\np m : ℕ+\npp : Prime p\n⊢ ↑m = 1 ∨ ↑m = ↑p ↔ m = 1 ∨ m = p\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ+\n⊢ Prime p → p ≠ 1\n[PROOFSTEP]\nintro pp\n[GOAL]\np : ℕ+\npp : Prime p\n⊢ p ≠ 1\n[PROOFSTEP]\nintro contra\n[GOAL]\np : ℕ+\npp : Prime p\ncontra : p = 1\n⊢ False\n[PROOFSTEP]\napply Nat.Prime.ne_one pp\n[GOAL]\np : ℕ+\npp : Prime p\ncontra : p = 1\n⊢ ↑p = 1\n[PROOFSTEP]\nrw [PNat.coe_eq_one_iff]\n[GOAL]\np : ℕ+\npp : Prime p\ncontra : p = 1\n⊢ p = 1\n[PROOFSTEP]\napply contra\n[GOAL]\np : ℕ+\npp : Prime p\n⊢ ¬p ∣ 1\n[PROOFSTEP]\nrw [dvd_iff]\n[GOAL]\np : ℕ+\npp : Prime p\n⊢ ¬↑p ∣ ↑1\n[PROOFSTEP]\napply Nat.Prime.not_dvd_one pp\n[GOAL]\nn : ℕ+\nhn : n ≠ 1\n⊢ ∃ p, Prime p ∧ p ∣ n\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := Nat.exists_prime_and_dvd (mt coe_eq_one_iff.mp hn)\n[GOAL]\ncase intro\nn : ℕ+\nhn : n ≠ 1\np : ℕ\nhp : Nat.Prime p ∧ p ∣ ↑n\n⊢ ∃ p, Prime p ∧ p ∣ n\n[PROOFSTEP]\nexists (⟨p, Nat.Prime.pos hp.left⟩ : ℕ+)\n[GOAL]\ncase intro\nn : ℕ+\nhn : n ≠ 1\np : ℕ\nhp : Nat.Prime p ∧ p ∣ ↑n\n⊢ Prime { val := p, property := (_ : 0 < p) } ∧ { val := p, property := (_ : 0 < p) } ∣ n\n[PROOFSTEP]\nrw [dvd_iff]\n[GOAL]\ncase intro\nn : ℕ+\nhn : n ≠ 1\np : ℕ\nhp : Nat.Prime p ∧ p ∣ ↑n\n⊢ Prime { val := p, property := (_ : 0 < p) } ∧ ↑{ val := p, property := (_ : 0 < p) } ∣ ↑n\n[PROOFSTEP]\napply hp\n[GOAL]\nm n : ℕ+\n⊢ coprime ↑m ↑n ↔ Coprime m n\n[PROOFSTEP]\nunfold coprime Coprime\n[GOAL]\nm n : ℕ+\n⊢ Nat.gcd ↑m ↑n = 1 ↔ gcd m n = 1\n[PROOFSTEP]\nrw [← coe_inj]\n[GOAL]\nm n : ℕ+\n⊢ Nat.gcd ↑m ↑n = 1 ↔ ↑(gcd m n) = ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nk m n : ℕ+\n⊢ Coprime m k → Coprime n k → Coprime (m * n) k\n[PROOFSTEP]\nrepeat' rw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ Coprime m k → Coprime n k → Coprime (m * n) k\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑m ↑k → Coprime n k → Coprime (m * n) k\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑m ↑k → coprime ↑n ↑k → Coprime (m * n) k\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑m ↑k → coprime ↑n ↑k → coprime ↑(m * n) ↑k\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑m ↑k → coprime ↑n ↑k → coprime ↑(m * n) ↑k\n[PROOFSTEP]\nrw [mul_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑m ↑k → coprime ↑n ↑k → coprime (↑m * ↑n) ↑k\n[PROOFSTEP]\napply Nat.coprime.mul\n[GOAL]\nk m n : ℕ+\n⊢ Coprime k m → Coprime k n → Coprime k (m * n)\n[PROOFSTEP]\nrepeat' rw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ Coprime k m → Coprime k n → Coprime k (m * n)\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑k ↑m → Coprime k n → Coprime k (m * n)\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑k ↑m → coprime ↑k ↑n → Coprime k (m * n)\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑k ↑m → coprime ↑k ↑n → coprime ↑k ↑(m * n)\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑k ↑m → coprime ↑k ↑n → coprime ↑k ↑(m * n)\n[PROOFSTEP]\nrw [mul_coe]\n[GOAL]\nk m n : ℕ+\n⊢ coprime ↑k ↑m → coprime ↑k ↑n → coprime (↑k) (↑m * ↑n)\n[PROOFSTEP]\napply Nat.coprime.mul_right\n[GOAL]\nm n : ℕ+\n⊢ gcd m n = gcd n m\n[PROOFSTEP]\napply eq\n[GOAL]\ncase a\nm n : ℕ+\n⊢ ↑(gcd m n) = ↑(gcd n m)\n[PROOFSTEP]\nsimp only [gcd_coe]\n[GOAL]\ncase a\nm n : ℕ+\n⊢ Nat.gcd ↑m ↑n = Nat.gcd ↑n ↑m\n[PROOFSTEP]\napply Nat.gcd_comm\n[GOAL]\nm n : ℕ+\n⊢ m ∣ n ↔ gcd m n = m\n[PROOFSTEP]\nrw [dvd_iff]\n[GOAL]\nm n : ℕ+\n⊢ ↑m ∣ ↑n ↔ gcd m n = m\n[PROOFSTEP]\nrw [Nat.gcd_eq_left_iff_dvd]\n[GOAL]\nm n : ℕ+\n⊢ Nat.gcd ↑m ↑n = ↑m ↔ gcd m n = m\n[PROOFSTEP]\nrw [← coe_inj]\n[GOAL]\nm n : ℕ+\n⊢ Nat.gcd ↑m ↑n = ↑m ↔ ↑(gcd m n) = ↑m\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ+\n⊢ m ∣ n ↔ gcd n m = m\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\nm n : ℕ+\n⊢ m ∣ n ↔ gcd m n = m\n[PROOFSTEP]\napply gcd_eq_left_iff_dvd\n[GOAL]\nm n k : ℕ+\n⊢ Coprime k n → gcd (k * m) n = gcd m n\n[PROOFSTEP]\nintro h\n[GOAL]\nm n k : ℕ+\nh : Coprime k n\n⊢ gcd (k * m) n = gcd m n\n[PROOFSTEP]\napply eq\n[GOAL]\ncase a\nm n k : ℕ+\nh : Coprime k n\n⊢ ↑(gcd (k * m) n) = ↑(gcd m n)\n[PROOFSTEP]\nsimp only [gcd_coe, mul_coe]\n[GOAL]\ncase a\nm n k : ℕ+\nh : Coprime k n\n⊢ Nat.gcd (↑k * ↑m) ↑n = Nat.gcd ↑m ↑n\n[PROOFSTEP]\napply Nat.coprime.gcd_mul_left_cancel\n[GOAL]\ncase a.H\nm n k : ℕ+\nh : Coprime k n\n⊢ coprime ↑k ↑n\n[PROOFSTEP]\nsimpa\n[GOAL]\nm n k : ℕ+\n⊢ Coprime k n → gcd (m * k) n = gcd m n\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm n k : ℕ+\n⊢ Coprime k n → gcd (k * m) n = gcd m n\n[PROOFSTEP]\napply Coprime.gcd_mul_left_cancel\n[GOAL]\nm n k : ℕ+\n⊢ Coprime k m → gcd m (k * n) = gcd m n\n[PROOFSTEP]\nintro h\n[GOAL]\nm n k : ℕ+\nh : Coprime k m\n⊢ gcd m (k * n) = gcd m n\n[PROOFSTEP]\niterate 2 rw [gcd_comm]; symm;\n[GOAL]\nm n k : ℕ+\nh : Coprime k m\n⊢ gcd m (k * n) = gcd m n\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\nm n k : ℕ+\nh : Coprime k m\n⊢ gcd (k * n) m = gcd m n\n[PROOFSTEP]\nsymm\n[GOAL]\nm n k : ℕ+\nh : Coprime k m\n⊢ gcd m n = gcd (k * n) m\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\nm n k : ℕ+\nh : Coprime k m\n⊢ gcd n m = gcd (k * n) m\n[PROOFSTEP]\nsymm\n[GOAL]\nm n k : ℕ+\nh : Coprime k m\n⊢ gcd (k * n) m = gcd n m\n[PROOFSTEP]\napply Coprime.gcd_mul_left_cancel _ h\n[GOAL]\nm n k : ℕ+\n⊢ Coprime k m → gcd m (n * k) = gcd m n\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm n k : ℕ+\n⊢ Coprime k m → gcd m (k * n) = gcd m n\n[PROOFSTEP]\napply Coprime.gcd_mul_left_cancel_right\n[GOAL]\nn : ℕ+\n⊢ gcd 1 n = 1\n[PROOFSTEP]\nrw [← gcd_eq_left_iff_dvd]\n[GOAL]\nn : ℕ+\n⊢ 1 ∣ n\n[PROOFSTEP]\napply one_dvd\n[GOAL]\nn : ℕ+\n⊢ gcd n 1 = 1\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\nn : ℕ+\n⊢ gcd 1 n = 1\n[PROOFSTEP]\napply one_gcd\n[GOAL]\nm n : ℕ+\n⊢ Coprime m n → Coprime n m\n[PROOFSTEP]\nunfold Coprime\n[GOAL]\nm n : ℕ+\n⊢ gcd m n = 1 → gcd n m = 1\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\nm n : ℕ+\n⊢ gcd n m = 1 → gcd n m = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nm k n : ℕ+\n⊢ m ∣ k → Coprime k n → Coprime m n\n[PROOFSTEP]\nrw [dvd_iff]\n[GOAL]\nm k n : ℕ+\n⊢ ↑m ∣ ↑k → Coprime k n → Coprime m n\n[PROOFSTEP]\nrepeat' rw [← coprime_coe]\n[GOAL]\nm k n : ℕ+\n⊢ ↑m ∣ ↑k → Coprime k n → Coprime m n\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nm k n : ℕ+\n⊢ ↑m ∣ ↑k → coprime ↑k ↑n → Coprime m n\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nm k n : ℕ+\n⊢ ↑m ∣ ↑k → coprime ↑k ↑n → coprime ↑m ↑n\n[PROOFSTEP]\nrw [← coprime_coe]\n[GOAL]\nm k n : ℕ+\n⊢ ↑m ∣ ↑k → coprime ↑k ↑n → coprime ↑m ↑n\n[PROOFSTEP]\napply Nat.coprime.coprime_dvd_left\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : a ∣ m\nbn : b ∣ n\n⊢ a = gcd (a * b) m\n[PROOFSTEP]\nrw [gcd_eq_left_iff_dvd] at am \n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : gcd a m = a\nbn : b ∣ n\n⊢ a = gcd (a * b) m\n[PROOFSTEP]\nconv_lhs => rw [← am]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : gcd a m = a\nbn : b ∣ n\n| a\n[PROOFSTEP]\nrw [← am]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : gcd a m = a\nbn : b ∣ n\n| a\n[PROOFSTEP]\nrw [← am]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : gcd a m = a\nbn : b ∣ n\n| a\n[PROOFSTEP]\nrw [← am]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : gcd a m = a\nbn : b ∣ n\n⊢ gcd a m = gcd (a * b) m\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : gcd a m = a\nbn : b ∣ n\n⊢ gcd (a * b) m = gcd a m\n[PROOFSTEP]\napply Coprime.gcd_mul_right_cancel a\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : gcd a m = a\nbn : b ∣ n\n⊢ Coprime b m\n[PROOFSTEP]\napply Coprime.coprime_dvd_left bn cop.symm\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : a ∣ m\nbn : b ∣ n\n⊢ a = gcd (b * a) m\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : a ∣ m\nbn : b ∣ n\n⊢ a = gcd (a * b) m\n[PROOFSTEP]\napply Coprime.factor_eq_gcd_left cop am bn\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : a ∣ m\nbn : b ∣ n\n⊢ a = gcd m (a * b)\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : a ∣ m\nbn : b ∣ n\n⊢ a = gcd (a * b) m\n[PROOFSTEP]\napply Coprime.factor_eq_gcd_left cop am bn\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : a ∣ m\nbn : b ∣ n\n⊢ a = gcd m (b * a)\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\na b m n : ℕ+\ncop : Coprime m n\nam : a ∣ m\nbn : b ∣ n\n⊢ a = gcd (b * a) m\n[PROOFSTEP]\napply Coprime.factor_eq_gcd_right cop am bn\n[GOAL]\nk m n : ℕ+\nh : Coprime m n\n⊢ gcd k (m * n) = gcd k m * gcd k n\n[PROOFSTEP]\nrw [← coprime_coe] at h \n[GOAL]\nk m n : ℕ+\nh : coprime ↑m ↑n\n⊢ gcd k (m * n) = gcd k m * gcd k n\n[PROOFSTEP]\napply eq\n[GOAL]\ncase a\nk m n : ℕ+\nh : coprime ↑m ↑n\n⊢ ↑(gcd k (m * n)) = ↑(gcd k m * gcd k n)\n[PROOFSTEP]\nsimp only [gcd_coe, mul_coe]\n[GOAL]\ncase a\nk m n : ℕ+\nh : coprime ↑m ↑n\n⊢ Nat.gcd (↑k) (↑m * ↑n) = Nat.gcd ↑k ↑m * Nat.gcd ↑k ↑n\n[PROOFSTEP]\napply Nat.coprime.gcd_mul k h\n[GOAL]\nm n : ℕ+\n⊢ m ∣ n → gcd m n = m\n[PROOFSTEP]\nrw [dvd_iff]\n[GOAL]\nm n : ℕ+\n⊢ ↑m ∣ ↑n → gcd m n = m\n[PROOFSTEP]\nintro h\n[GOAL]\nm n : ℕ+\nh : ↑m ∣ ↑n\n⊢ gcd m n = m\n[PROOFSTEP]\napply eq\n[GOAL]\ncase a\nm n : ℕ+\nh : ↑m ∣ ↑n\n⊢ ↑(gcd m n) = ↑m\n[PROOFSTEP]\nsimp only [gcd_coe]\n[GOAL]\ncase a\nm n : ℕ+\nh : ↑m ∣ ↑n\n⊢ Nat.gcd ↑m ↑n = ↑m\n[PROOFSTEP]\napply Nat.gcd_eq_left h\n[GOAL]\nm n : ℕ+\nk l : ℕ\nh : Coprime m n\n⊢ coprime (↑m ^ k) (↑n ^ l)\n[PROOFSTEP]\nrw [← coprime_coe] at *\n[GOAL]\nm n : ℕ+\nk l : ℕ\nh : coprime ↑m ↑n\n⊢ coprime (↑m ^ k) (↑n ^ l)\n[PROOFSTEP]\napply Nat.coprime.pow\n[GOAL]\ncase H1\nm n : ℕ+\nk l : ℕ\nh : coprime ↑m ↑n\n⊢ coprime ↑m ↑n\n[PROOFSTEP]\napply h\n", "meta": {"mathlib_filename": "Mathlib.Data.PNat.Prime", "llama_tokens": 5829, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357529306639, "lm_q2_score": 0.7310585786300049, "lm_q1q2_score": 0.6338539251588873}} {"text": "[GOAL]\nx : ℝ≥0\ny : ℝ\n⊢ x ^ y = 0 ↔ x = 0 ∧ y ≠ 0\n[PROOFSTEP]\nrw [← NNReal.coe_eq, coe_rpow, ← NNReal.coe_eq_zero]\n[GOAL]\nx : ℝ≥0\ny : ℝ\n⊢ ↑x ^ y = ↑0 ↔ ↑x = 0 ∧ y ≠ 0\n[PROOFSTEP]\nexact Real.rpow_eq_zero_iff_of_nonneg x.2\n[GOAL]\nx : ℝ≥0\n⊢ x ^ (-1) = x⁻¹\n[PROOFSTEP]\nsimp [rpow_neg]\n[GOAL]\ny : ℝ\nhy : y ≠ 0\nx : ℝ≥0\n⊢ (x ^ y) ^ (1 / y) = x\n[PROOFSTEP]\nfield_simp [← rpow_mul]\n[GOAL]\ny : ℝ\nhy : y ≠ 0\nx : ℝ≥0\n⊢ (x ^ (1 / y)) ^ y = x\n[PROOFSTEP]\nfield_simp [← rpow_mul]\n[GOAL]\nx : ℝ≥0\n⊢ ↑sqrt x = x ^ (1 / 2)\n[PROOFSTEP]\nrefine' NNReal.eq _\n[GOAL]\nx : ℝ≥0\n⊢ ↑(↑sqrt x) = ↑(x ^ (1 / 2))\n[PROOFSTEP]\npush_cast\n[GOAL]\nx : ℝ≥0\n⊢ Real.sqrt ↑x = ↑x ^ (1 / 2)\n[PROOFSTEP]\nexact Real.sqrt_eq_rpow x.1\n[GOAL]\nx : ℝ≥0\nn : ℕ\n⊢ ↑(x ^ ↑n) = ↑(x ^ n)\n[PROOFSTEP]\nsimpa only [coe_rpow, coe_pow] using Real.rpow_nat_cast x n\n[GOAL]\nx : ℝ≥0\n⊢ x ^ 2 = x ^ 2\n[PROOFSTEP]\nrw [← rpow_nat_cast]\n[GOAL]\nx : ℝ≥0\n⊢ x ^ 2 = x ^ ↑2\n[PROOFSTEP]\nsimp only [Nat.cast_ofNat]\n[GOAL]\nι : Type u_1\nl : List ι\nf : ι → ℝ≥0\nr : ℝ\n⊢ List.prod (List.map (fun x => f x ^ r) l) = List.prod (List.map f l) ^ r\n[PROOFSTEP]\nrw [← list_prod_map_rpow, List.map_map]\n[GOAL]\nι : Type u_1\nl : List ι\nf : ι → ℝ≥0\nr : ℝ\n⊢ List.prod (List.map (fun x => f x ^ r) l) = List.prod (List.map ((fun x => x ^ r) ∘ f) l)\n[PROOFSTEP]\nrfl\n[GOAL]\nl : List ℝ\nhl : ∀ (x : ℝ), x ∈ l → 0 ≤ x\nr : ℝ\n⊢ List.prod (List.map (fun x => x ^ r) l) = List.prod l ^ r\n[PROOFSTEP]\nlift l to List ℝ≥0 using hl\n[GOAL]\ncase intro\nr : ℝ\nl : List ℝ≥0\n⊢ List.prod (List.map (fun x => x ^ r) (List.map toReal l)) = List.prod (List.map toReal l) ^ r\n[PROOFSTEP]\nhave := congr_arg ((↑) : ℝ≥0 → ℝ) (NNReal.list_prod_map_rpow l r)\n[GOAL]\ncase intro\nr : ℝ\nl : List ℝ≥0\nthis : ↑(List.prod (List.map (fun x => x ^ r) l)) = ↑(List.prod l ^ r)\n⊢ List.prod (List.map (fun x => x ^ r) (List.map toReal l)) = List.prod (List.map toReal l) ^ r\n[PROOFSTEP]\npush_cast at this \n[GOAL]\ncase intro\nr : ℝ\nl : List ℝ≥0\nthis : List.prod (List.map toReal (List.map (fun x => x ^ r) l)) = List.prod (List.map toReal l) ^ r\n⊢ List.prod (List.map (fun x => x ^ r) (List.map toReal l)) = List.prod (List.map toReal l) ^ r\n[PROOFSTEP]\nrw [List.map_map] at this ⊢\n[GOAL]\ncase intro\nr : ℝ\nl : List ℝ≥0\nthis : List.prod (List.map (toReal ∘ fun x => x ^ r) l) = List.prod (List.map toReal l) ^ r\n⊢ List.prod (List.map ((fun x => x ^ r) ∘ toReal) l) = List.prod (List.map toReal l) ^ r\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\nι : Type u_1\nl : List ι\nf : ι → ℝ\nhl : ∀ (i : ι), i ∈ l → 0 ≤ f i\nr : ℝ\n⊢ List.prod (List.map (fun x => f x ^ r) l) = List.prod (List.map f l) ^ r\n[PROOFSTEP]\nrw [← Real.list_prod_map_rpow (l.map f) _ r, List.map_map]\n[GOAL]\nι : Type u_1\nl : List ι\nf : ι → ℝ\nhl : ∀ (i : ι), i ∈ l → 0 ≤ f i\nr : ℝ\n⊢ List.prod (List.map (fun x => f x ^ r) l) = List.prod (List.map ((fun x => x ^ r) ∘ f) l)\nι : Type u_1 l : List ι f : ι → ℝ hl : ∀ (i : ι), i ∈ l → 0 ≤ f i r : ℝ ⊢ ∀ (x : ℝ), x ∈ List.map f l → 0 ≤ x\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nl : List ι\nf : ι → ℝ\nhl : ∀ (i : ι), i ∈ l → 0 ≤ f i\nr : ℝ\n⊢ ∀ (x : ℝ), x ∈ List.map f l → 0 ≤ x\n[PROOFSTEP]\nsimpa using hl\n[GOAL]\nι : Type u_1\ns : Multiset ι\nf : ι → ℝ\nhs : ∀ (i : ι), i ∈ s → 0 ≤ f i\nr : ℝ\n⊢ Multiset.prod (Multiset.map (fun x => f x ^ r) s) = Multiset.prod (Multiset.map f s) ^ r\n[PROOFSTEP]\ninduction' s using Quotient.inductionOn with l\n[GOAL]\ncase h\nι : Type u_1\ns : Multiset ι\nf : ι → ℝ\nhs✝ : ∀ (i : ι), i ∈ s → 0 ≤ f i\nr : ℝ\nl : List ι\nhs : ∀ (i : ι), i ∈ Quotient.mk (List.isSetoid ι) l → 0 ≤ f i\n⊢ Multiset.prod (Multiset.map (fun x => f x ^ r) (Quotient.mk (List.isSetoid ι) l)) =\n Multiset.prod (Multiset.map f (Quotient.mk (List.isSetoid ι) l)) ^ r\n[PROOFSTEP]\nsimpa using Real.list_prod_map_rpow' l f hs r\n[GOAL]\nx y : ℝ≥0\nz : ℝ\nhz : 0 < z\n⊢ x ≤ y ^ (1 / z) ↔ x ^ z ≤ y\n[PROOFSTEP]\nrw [← rpow_le_rpow_iff hz, rpow_self_rpow_inv hz.ne']\n[GOAL]\nx y : ℝ≥0\nz : ℝ\nhz : 0 < z\n⊢ x ^ (1 / z) ≤ y ↔ x ≤ y ^ z\n[PROOFSTEP]\nrw [← rpow_le_rpow_iff hz, rpow_self_rpow_inv hz.ne']\n[GOAL]\np : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\n⊢ 0 < x ^ p\n[PROOFSTEP]\nhave rpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p :=\n by\n intro p hp_pos\n rw [← zero_rpow hp_pos.ne']\n exact rpow_lt_rpow hx_pos hp_pos\n[GOAL]\np : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\n⊢ ∀ {p : ℝ}, 0 < p → 0 < x ^ p\n[PROOFSTEP]\nintro p hp_pos\n[GOAL]\np✝ : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\np : ℝ\nhp_pos : 0 < p\n⊢ 0 < x ^ p\n[PROOFSTEP]\nrw [← zero_rpow hp_pos.ne']\n[GOAL]\np✝ : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\np : ℝ\nhp_pos : 0 < p\n⊢ 0 ^ p < x ^ p\n[PROOFSTEP]\nexact rpow_lt_rpow hx_pos hp_pos\n[GOAL]\np : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\nrpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p\n⊢ 0 < x ^ p\n[PROOFSTEP]\nrcases lt_trichotomy (0 : ℝ) p with (hp_pos | rfl | hp_neg)\n[GOAL]\ncase inl\np : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\nrpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p\nhp_pos : 0 < p\n⊢ 0 < x ^ p\n[PROOFSTEP]\nexact rpow_pos_of_nonneg hp_pos\n[GOAL]\ncase inr.inl\nx : ℝ≥0\nhx_pos : 0 < x\nrpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p\n⊢ 0 < x ^ 0\n[PROOFSTEP]\nsimp only [zero_lt_one, rpow_zero]\n[GOAL]\ncase inr.inr\np : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\nrpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p\nhp_neg : p < 0\n⊢ 0 < x ^ p\n[PROOFSTEP]\nrw [← neg_neg p, rpow_neg, inv_pos]\n[GOAL]\ncase inr.inr\np : ℝ\nx : ℝ≥0\nhx_pos : 0 < x\nrpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p\nhp_neg : p < 0\n⊢ 0 < x ^ (-p)\n[PROOFSTEP]\nexact rpow_pos_of_nonneg (neg_pos.mpr hp_neg)\n[GOAL]\nx : ℝ≥0\nz : ℝ\nhx : x ≤ 1\nh_one_le : 1 ≤ z\n⊢ x ^ z ≤ x\n[PROOFSTEP]\nrcases eq_bot_or_bot_lt x with (rfl | (h : 0 < x))\n[GOAL]\ncase inl\nz : ℝ\nh_one_le : 1 ≤ z\nhx : ⊥ ≤ 1\n⊢ ⊥ ^ z ≤ ⊥\n[PROOFSTEP]\nhave : z ≠ 0 := by linarith\n[GOAL]\nz : ℝ\nh_one_le : 1 ≤ z\nhx : ⊥ ≤ 1\n⊢ z ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inl\nz : ℝ\nh_one_le : 1 ≤ z\nhx : ⊥ ≤ 1\nthis : z ≠ 0\n⊢ ⊥ ^ z ≤ ⊥\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase inr\nx : ℝ≥0\nz : ℝ\nhx : x ≤ 1\nh_one_le : 1 ≤ z\nh : 0 < x\n⊢ x ^ z ≤ x\n[PROOFSTEP]\nnth_rw 2 [← NNReal.rpow_one x]\n[GOAL]\ncase inr\nx : ℝ≥0\nz : ℝ\nhx : x ≤ 1\nh_one_le : 1 ≤ z\nh : 0 < x\n⊢ x ^ z ≤ x ^ 1\n[PROOFSTEP]\nexact NNReal.rpow_le_rpow_of_exponent_ge h hx h_one_le\n[GOAL]\nx : ℝ\nhx : x ≠ 0\ny z : ℝ≥0\nhyz : (fun y => y ^ x) y = (fun y => y ^ x) z\n⊢ y = z\n[PROOFSTEP]\nsimpa only [rpow_inv_rpow_self hx] using congr_arg (fun y => y ^ (1 / x)) hyz\n[GOAL]\nx : ℝ\nhx : x ≠ 0\ny : ℝ≥0\n⊢ (fun y => y ^ x) (y ^ x⁻¹) = y\n[PROOFSTEP]\nsimp_rw [← rpow_mul, _root_.inv_mul_cancel hx, rpow_one]\n[GOAL]\nx y : ℝ≥0\nz : ℝ\nhz : z ≠ 0\n⊢ x = y ^ (1 / z) ↔ x ^ z = y\n[PROOFSTEP]\nrw [← rpow_eq_rpow_iff hz, rpow_self_rpow_inv hz]\n[GOAL]\nx y : ℝ≥0\nz : ℝ\nhz : z ≠ 0\n⊢ x ^ (1 / z) = y ↔ x = y ^ z\n[PROOFSTEP]\nrw [← rpow_eq_rpow_iff hz, rpow_self_rpow_inv hz]\n[GOAL]\nx : ℝ≥0\nn : ℕ\nhn : n ≠ 0\n⊢ (x ^ n) ^ (↑n)⁻¹ = x\n[PROOFSTEP]\nrw [← NNReal.coe_eq, coe_rpow, NNReal.coe_pow]\n[GOAL]\nx : ℝ≥0\nn : ℕ\nhn : n ≠ 0\n⊢ (↑x ^ n) ^ (↑n)⁻¹ = ↑x\n[PROOFSTEP]\nexact Real.pow_nat_rpow_nat_inv x.2 hn\n[GOAL]\nx : ℝ≥0\nn : ℕ\nhn : n ≠ 0\n⊢ (x ^ (↑n)⁻¹) ^ n = x\n[PROOFSTEP]\nrw [← NNReal.coe_eq, NNReal.coe_pow, coe_rpow]\n[GOAL]\nx : ℝ≥0\nn : ℕ\nhn : n ≠ 0\n⊢ (↑x ^ (↑n)⁻¹) ^ n = ↑x\n[PROOFSTEP]\nexact Real.rpow_nat_inv_pow_nat x.2 hn\n[GOAL]\nx y : ℝ\nhx : 0 ≤ x\n⊢ toNNReal (x ^ y) = toNNReal x ^ y\n[PROOFSTEP]\nnth_rw 1 [← Real.coe_toNNReal x hx]\n[GOAL]\nx y : ℝ\nhx : 0 ≤ x\n⊢ toNNReal (↑(toNNReal x) ^ y) = toNNReal x ^ y\n[PROOFSTEP]\nrw [← NNReal.coe_rpow, Real.toNNReal_coe]\n[GOAL]\nz : ℝ\nh : 0 < z\nx y : ℝ≥0\nhxy : x < y\n⊢ (fun x => x ^ z) x < (fun x => x ^ z) y\n[PROOFSTEP]\nsimp only [NNReal.rpow_lt_rpow hxy h, coe_lt_coe]\n[GOAL]\nz : ℝ\nh : 0 ≤ z\nh0 : 0 = z\n⊢ Monotone fun x => x ^ 0\n[PROOFSTEP]\nsimp only [rpow_zero, monotone_const]\n[GOAL]\ny : ℝ\nhy : 0 < y\nx : ℝ≥0\n⊢ (fun x => x ^ y) ((fun x => x ^ (1 / y)) x) = x\n[PROOFSTEP]\ndsimp\n[GOAL]\ny : ℝ\nhy : 0 < y\nx : ℝ≥0\n⊢ (x ^ (1 / y)) ^ y = x\n[PROOFSTEP]\nrw [← rpow_mul, one_div_mul_cancel hy.ne.symm, rpow_one]\n[GOAL]\ny : ℝ\nhy : 0 < y\n⊢ OrderIso.symm (orderIsoRpow y hy) = orderIsoRpow (1 / y) (_ : 0 < 1 / y)\n[PROOFSTEP]\nsimp only [orderIsoRpow, one_div_one_div]\n[GOAL]\ny : ℝ\nhy : 0 < y\n⊢ OrderIso.symm\n (StrictMono.orderIsoOfRightInverse (fun x => x ^ y) (_ : StrictMono fun x => x ^ y) (fun x => x ^ (1 / y))\n (_ : ∀ (x : ℝ≥0), (fun x => x ^ y) ((fun x => x ^ (1 / y)) x) = x)) =\n StrictMono.orderIsoOfRightInverse (fun x => x ^ (1 / y)) (_ : StrictMono fun x => x ^ (1 / y)) (fun x => x ^ y)\n (_ : Function.RightInverse (fun x => x ^ y) fun x => x ^ (1 / y))\n[PROOFSTEP]\nrfl\n[GOAL]\nx : ℝ≥0∞\n⊢ x ^ 0 = 1\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\n⊢ none ^ 0 = 1\n[PROOFSTEP]\ndsimp only [(· ^ ·), Pow.pow, rpow]\n[GOAL]\ncase none\n⊢ (if 0 < 0 then ⊤ else if 0 = 0 then 1 else 0) = 1\n[PROOFSTEP]\nsimp [lt_irrefl]\n[GOAL]\ncase some\nval✝ : ℝ≥0\n⊢ Option.some val✝ ^ 0 = 1\n[PROOFSTEP]\ndsimp only [(· ^ ·), Pow.pow, rpow]\n[GOAL]\ncase some\nval✝ : ℝ≥0\n⊢ (if val✝ = 0 ∧ 0 < 0 then ⊤ else ↑(NNReal.rpow val✝ 0)) = 1\n[PROOFSTEP]\nsimp [lt_irrefl]\n[GOAL]\ny : ℝ\nh : 0 < y\n⊢ ⊤ ^ y = ⊤\n[PROOFSTEP]\nsimp [top_rpow_def, h]\n[GOAL]\ny : ℝ\nh : y < 0\n⊢ ⊤ ^ y = 0\n[PROOFSTEP]\nsimp [top_rpow_def, asymm h, ne_of_lt h]\n[GOAL]\ny : ℝ\nh : 0 < y\n⊢ 0 ^ y = 0\n[PROOFSTEP]\nrw [← ENNReal.coe_zero, ← ENNReal.some_eq_coe]\n[GOAL]\ny : ℝ\nh : 0 < y\n⊢ Option.some 0 ^ y = Option.some 0\n[PROOFSTEP]\ndsimp only [(· ^ ·), rpow, Pow.pow]\n[GOAL]\ny : ℝ\nh : 0 < y\n⊢ (if 0 = 0 ∧ y < 0 then ⊤ else ↑(NNReal.rpow 0 y)) = Option.some 0\n[PROOFSTEP]\nsimp [h, asymm h, ne_of_gt h]\n[GOAL]\ny : ℝ\nh : y < 0\n⊢ 0 ^ y = ⊤\n[PROOFSTEP]\nrw [← ENNReal.coe_zero, ← ENNReal.some_eq_coe]\n[GOAL]\ny : ℝ\nh : y < 0\n⊢ Option.some 0 ^ y = ⊤\n[PROOFSTEP]\ndsimp only [(· ^ ·), rpow, Pow.pow]\n[GOAL]\ny : ℝ\nh : y < 0\n⊢ (if 0 = 0 ∧ y < 0 then ⊤ else ↑(NNReal.rpow 0 y)) = ⊤\n[PROOFSTEP]\nsimp [h, ne_of_gt h]\n[GOAL]\ny : ℝ\n⊢ 0 ^ y = if 0 < y then 0 else if y = 0 then 1 else ⊤\n[PROOFSTEP]\nrcases lt_trichotomy (0 : ℝ) y with (H | rfl | H)\n[GOAL]\ncase inl\ny : ℝ\nH : 0 < y\n⊢ 0 ^ y = if 0 < y then 0 else if y = 0 then 1 else ⊤\n[PROOFSTEP]\nsimp [H, ne_of_gt, zero_rpow_of_pos, lt_irrefl]\n[GOAL]\ncase inr.inl\n⊢ 0 ^ 0 = if 0 < 0 then 0 else if 0 = 0 then 1 else ⊤\n[PROOFSTEP]\nsimp [lt_irrefl]\n[GOAL]\ncase inr.inr\ny : ℝ\nH : y < 0\n⊢ 0 ^ y = if 0 < y then 0 else if y = 0 then 1 else ⊤\n[PROOFSTEP]\nsimp [H, asymm H, ne_of_lt, zero_rpow_of_neg]\n[GOAL]\ny : ℝ\n⊢ 0 ^ y * 0 ^ y = 0 ^ y\n[PROOFSTEP]\nrw [zero_rpow_def]\n[GOAL]\ny : ℝ\n⊢ ((if 0 < y then 0 else if y = 0 then 1 else ⊤) * if 0 < y then 0 else if y = 0 then 1 else ⊤) =\n if 0 < y then 0 else if y = 0 then 1 else ⊤\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\ny : ℝ\nh✝ : 0 < y\n⊢ 0 * 0 = 0\ncase pos\ny : ℝ\nh✝¹ : ¬0 < y\nh✝ : y = 0\n⊢ 1 * 1 = 1\ncase neg y : ℝ h✝¹ : ¬0 < y h✝ : ¬y = 0 ⊢ ⊤ * ⊤ = ⊤\n[PROOFSTEP]\nexacts [zero_mul _, one_mul _, top_mul_top]\n[GOAL]\nx : ℝ≥0\nh : x ≠ 0\ny : ℝ\n⊢ ↑x ^ y = ↑(x ^ y)\n[PROOFSTEP]\nrw [← ENNReal.some_eq_coe]\n[GOAL]\nx : ℝ≥0\nh : x ≠ 0\ny : ℝ\n⊢ Option.some x ^ y = ↑(x ^ y)\n[PROOFSTEP]\ndsimp only [(· ^ ·), Pow.pow, rpow]\n[GOAL]\nx : ℝ≥0\nh : x ≠ 0\ny : ℝ\n⊢ (if x = 0 ∧ y < 0 then ⊤ else ↑(NNReal.rpow x y)) = ↑(NNReal.rpow x y)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nx : ℝ≥0\ny : ℝ\nh : 0 ≤ y\n⊢ ↑x ^ y = ↑(x ^ y)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nx : ℝ≥0\ny : ℝ\nh : 0 ≤ y\nhx : x = 0\n⊢ ↑x ^ y = ↑(x ^ y)\n[PROOFSTEP]\nrcases le_iff_eq_or_lt.1 h with (H | H)\n[GOAL]\ncase pos.inl\nx : ℝ≥0\ny : ℝ\nh : 0 ≤ y\nhx : x = 0\nH : 0 = y\n⊢ ↑x ^ y = ↑(x ^ y)\n[PROOFSTEP]\nsimp [hx, H.symm]\n[GOAL]\ncase pos.inr\nx : ℝ≥0\ny : ℝ\nh : 0 ≤ y\nhx : x = 0\nH : 0 < y\n⊢ ↑x ^ y = ↑(x ^ y)\n[PROOFSTEP]\nsimp [hx, zero_rpow_of_pos H, NNReal.zero_rpow (ne_of_gt H)]\n[GOAL]\ncase neg\nx : ℝ≥0\ny : ℝ\nh : 0 ≤ y\nhx : ¬x = 0\n⊢ ↑x ^ y = ↑(x ^ y)\n[PROOFSTEP]\nexact coe_rpow_of_ne_zero hx _\n[GOAL]\nx : ℝ≥0∞\n⊢ x ^ 1 = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\n⊢ none ^ 1 = none\n[PROOFSTEP]\nexact dif_pos zero_lt_one\n[GOAL]\ncase some\nval✝ : ℝ≥0\n⊢ Option.some val✝ ^ 1 = Option.some val✝\n[PROOFSTEP]\nchange ite _ _ _ = _\n[GOAL]\ncase some\nval✝ : ℝ≥0\n⊢ (if val✝ = 0 ∧ 1 < 0 then ⊤ else ↑(val✝ ^ 1)) = Option.some val✝\n[PROOFSTEP]\nsimp only [NNReal.rpow_one, some_eq_coe, ite_eq_right_iff, top_ne_coe, and_imp]\n[GOAL]\ncase some\nval✝ : ℝ≥0\n⊢ val✝ = 0 → 1 < 0 → False\n[PROOFSTEP]\nexact fun _ => zero_le_one.not_lt\n[GOAL]\nx : ℝ\n⊢ 1 ^ x = 1\n[PROOFSTEP]\nrw [← coe_one, coe_rpow_of_ne_zero one_ne_zero]\n[GOAL]\nx : ℝ\n⊢ ↑(1 ^ x) = ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\n⊢ x ^ y = 0 ↔ x = 0 ∧ 0 < y ∨ x = ⊤ ∧ y < 0\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase none\ny : ℝ\n⊢ none ^ y = 0 ↔ none = 0 ∧ 0 < y ∨ none = ⊤ ∧ y < 0\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (H | H | H)\n[GOAL]\ncase none.inl\ny : ℝ\nH : y < 0\n⊢ none ^ y = 0 ↔ none = 0 ∧ 0 < y ∨ none = ⊤ ∧ y < 0\n[PROOFSTEP]\nsimp [H, top_rpow_of_neg, top_rpow_of_pos, le_of_lt]\n[GOAL]\ncase none.inr.inl\ny : ℝ\nH : y = 0\n⊢ none ^ y = 0 ↔ none = 0 ∧ 0 < y ∨ none = ⊤ ∧ y < 0\n[PROOFSTEP]\nsimp [H, top_rpow_of_neg, top_rpow_of_pos, le_of_lt]\n[GOAL]\ncase none.inr.inr\ny : ℝ\nH : 0 < y\n⊢ none ^ y = 0 ↔ none = 0 ∧ 0 < y ∨ none = ⊤ ∧ y < 0\n[PROOFSTEP]\nsimp [H, top_rpow_of_neg, top_rpow_of_pos, le_of_lt]\n[GOAL]\ncase some\ny : ℝ\nx : ℝ≥0\n⊢ Option.some x ^ y = 0 ↔ Option.some x = 0 ∧ 0 < y ∨ Option.some x = ⊤ ∧ y < 0\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\ny : ℝ\nx : ℝ≥0\nh : x = 0\n⊢ Option.some x ^ y = 0 ↔ Option.some x = 0 ∧ 0 < y ∨ Option.some x = ⊤ ∧ y < 0\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (H | H | H)\n[GOAL]\ncase pos.inl\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : y < 0\n⊢ Option.some x ^ y = 0 ↔ Option.some x = 0 ∧ 0 < y ∨ Option.some x = ⊤ ∧ y < 0\n[PROOFSTEP]\nsimp [h, H, zero_rpow_of_neg, zero_rpow_of_pos, le_of_lt]\n[GOAL]\ncase pos.inr.inl\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : y = 0\n⊢ Option.some x ^ y = 0 ↔ Option.some x = 0 ∧ 0 < y ∨ Option.some x = ⊤ ∧ y < 0\n[PROOFSTEP]\nsimp [h, H, zero_rpow_of_neg, zero_rpow_of_pos, le_of_lt]\n[GOAL]\ncase pos.inr.inr\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : 0 < y\n⊢ Option.some x ^ y = 0 ↔ Option.some x = 0 ∧ 0 < y ∨ Option.some x = ⊤ ∧ y < 0\n[PROOFSTEP]\nsimp [h, H, zero_rpow_of_neg, zero_rpow_of_pos, le_of_lt]\n[GOAL]\ncase neg\ny : ℝ\nx : ℝ≥0\nh : ¬x = 0\n⊢ Option.some x ^ y = 0 ↔ Option.some x = 0 ∧ 0 < y ∨ Option.some x = ⊤ ∧ y < 0\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero h, h]\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\n⊢ x ^ y = ⊤ ↔ x = 0 ∧ y < 0 ∨ x = ⊤ ∧ 0 < y\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase none\ny : ℝ\n⊢ none ^ y = ⊤ ↔ none = 0 ∧ y < 0 ∨ none = ⊤ ∧ 0 < y\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (H | H | H)\n[GOAL]\ncase none.inl\ny : ℝ\nH : y < 0\n⊢ none ^ y = ⊤ ↔ none = 0 ∧ y < 0 ∨ none = ⊤ ∧ 0 < y\n[PROOFSTEP]\nsimp [H, top_rpow_of_neg, top_rpow_of_pos, le_of_lt]\n[GOAL]\ncase none.inr.inl\ny : ℝ\nH : y = 0\n⊢ none ^ y = ⊤ ↔ none = 0 ∧ y < 0 ∨ none = ⊤ ∧ 0 < y\n[PROOFSTEP]\nsimp [H, top_rpow_of_neg, top_rpow_of_pos, le_of_lt]\n[GOAL]\ncase none.inr.inr\ny : ℝ\nH : 0 < y\n⊢ none ^ y = ⊤ ↔ none = 0 ∧ y < 0 ∨ none = ⊤ ∧ 0 < y\n[PROOFSTEP]\nsimp [H, top_rpow_of_neg, top_rpow_of_pos, le_of_lt]\n[GOAL]\ncase some\ny : ℝ\nx : ℝ≥0\n⊢ Option.some x ^ y = ⊤ ↔ Option.some x = 0 ∧ y < 0 ∨ Option.some x = ⊤ ∧ 0 < y\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\ny : ℝ\nx : ℝ≥0\nh : x = 0\n⊢ Option.some x ^ y = ⊤ ↔ Option.some x = 0 ∧ y < 0 ∨ Option.some x = ⊤ ∧ 0 < y\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (H | H | H)\n[GOAL]\ncase pos.inl\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : y < 0\n⊢ Option.some x ^ y = ⊤ ↔ Option.some x = 0 ∧ y < 0 ∨ Option.some x = ⊤ ∧ 0 < y\n[PROOFSTEP]\nsimp [h, H, zero_rpow_of_neg, zero_rpow_of_pos, le_of_lt]\n[GOAL]\ncase pos.inr.inl\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : y = 0\n⊢ Option.some x ^ y = ⊤ ↔ Option.some x = 0 ∧ y < 0 ∨ Option.some x = ⊤ ∧ 0 < y\n[PROOFSTEP]\nsimp [h, H, zero_rpow_of_neg, zero_rpow_of_pos, le_of_lt]\n[GOAL]\ncase pos.inr.inr\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : 0 < y\n⊢ Option.some x ^ y = ⊤ ↔ Option.some x = 0 ∧ y < 0 ∨ Option.some x = ⊤ ∧ 0 < y\n[PROOFSTEP]\nsimp [h, H, zero_rpow_of_neg, zero_rpow_of_pos, le_of_lt]\n[GOAL]\ncase neg\ny : ℝ\nx : ℝ≥0\nh : ¬x = 0\n⊢ Option.some x ^ y = ⊤ ↔ Option.some x = 0 ∧ y < 0 ∨ Option.some x = ⊤ ∧ 0 < y\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero h, h]\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\nhy : 0 < y\n⊢ x ^ y = ⊤ ↔ x = ⊤\n[PROOFSTEP]\nsimp [rpow_eq_top_iff, hy, asymm hy]\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\nhy0 : 0 ≤ y\n⊢ x ^ y = ⊤ → x = ⊤\n[PROOFSTEP]\nrw [ENNReal.rpow_eq_top_iff]\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\nhy0 : 0 ≤ y\n⊢ x = 0 ∧ y < 0 ∨ x = ⊤ ∧ 0 < y → x = ⊤\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase inl\nx : ℝ≥0∞\ny : ℝ\nhy0 : 0 ≤ y\nh : x = 0 ∧ y < 0\n⊢ x = ⊤\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inl.h\nx : ℝ≥0∞\ny : ℝ\nhy0 : 0 ≤ y\nh : x = 0 ∧ y < 0\n⊢ False\n[PROOFSTEP]\nrw [lt_iff_not_ge] at h \n[GOAL]\ncase inl.h\nx : ℝ≥0∞\ny : ℝ\nhy0 : 0 ≤ y\nh : x = 0 ∧ ¬y ≥ 0\n⊢ False\n[PROOFSTEP]\nexact h.right hy0\n[GOAL]\ncase inr\nx : ℝ≥0∞\ny : ℝ\nhy0 : 0 ≤ y\nh : x = ⊤ ∧ 0 < y\n⊢ x = ⊤\n[PROOFSTEP]\nexact h.left\n[GOAL]\nx : ℝ≥0∞\ny z : ℝ\nhx : x ≠ 0\nh'x : x ≠ ⊤\n⊢ x ^ (y + z) = x ^ y * x ^ z\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase none\ny z : ℝ\nhx : none ≠ 0\nh'x : none ≠ ⊤\n⊢ none ^ (y + z) = none ^ y * none ^ z\n[PROOFSTEP]\nexact (h'x rfl).elim\n[GOAL]\ncase some\ny z : ℝ\nx : ℝ≥0\nhx : Option.some x ≠ 0\nh'x : Option.some x ≠ ⊤\n⊢ Option.some x ^ (y + z) = Option.some x ^ y * Option.some x ^ z\n[PROOFSTEP]\nhave : x ≠ 0 := fun h => by simp [h] at hx \n[GOAL]\ny z : ℝ\nx : ℝ≥0\nhx : Option.some x ≠ 0\nh'x : Option.some x ≠ ⊤\nh : x = 0\n⊢ False\n[PROOFSTEP]\nsimp [h] at hx \n[GOAL]\ncase some\ny z : ℝ\nx : ℝ≥0\nhx : Option.some x ≠ 0\nh'x : Option.some x ≠ ⊤\nthis : x ≠ 0\n⊢ Option.some x ^ (y + z) = Option.some x ^ y * Option.some x ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero this, NNReal.rpow_add this]\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\n⊢ x ^ (-y) = (x ^ y)⁻¹\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase none\ny : ℝ\n⊢ none ^ (-y) = (none ^ y)⁻¹\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (H | H | H)\n[GOAL]\ncase none.inl\ny : ℝ\nH : y < 0\n⊢ none ^ (-y) = (none ^ y)⁻¹\n[PROOFSTEP]\nsimp [top_rpow_of_pos, top_rpow_of_neg, H, neg_pos.mpr]\n[GOAL]\ncase none.inr.inl\ny : ℝ\nH : y = 0\n⊢ none ^ (-y) = (none ^ y)⁻¹\n[PROOFSTEP]\nsimp [top_rpow_of_pos, top_rpow_of_neg, H, neg_pos.mpr]\n[GOAL]\ncase none.inr.inr\ny : ℝ\nH : 0 < y\n⊢ none ^ (-y) = (none ^ y)⁻¹\n[PROOFSTEP]\nsimp [top_rpow_of_pos, top_rpow_of_neg, H, neg_pos.mpr]\n[GOAL]\ncase some\ny : ℝ\nx : ℝ≥0\n⊢ Option.some x ^ (-y) = (Option.some x ^ y)⁻¹\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\ny : ℝ\nx : ℝ≥0\nh : x = 0\n⊢ Option.some x ^ (-y) = (Option.some x ^ y)⁻¹\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (H | H | H)\n[GOAL]\ncase pos.inl\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : y < 0\n⊢ Option.some x ^ (-y) = (Option.some x ^ y)⁻¹\n[PROOFSTEP]\nsimp [h, zero_rpow_of_pos, zero_rpow_of_neg, H, neg_pos.mpr]\n[GOAL]\ncase pos.inr.inl\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : y = 0\n⊢ Option.some x ^ (-y) = (Option.some x ^ y)⁻¹\n[PROOFSTEP]\nsimp [h, zero_rpow_of_pos, zero_rpow_of_neg, H, neg_pos.mpr]\n[GOAL]\ncase pos.inr.inr\ny : ℝ\nx : ℝ≥0\nh : x = 0\nH : 0 < y\n⊢ Option.some x ^ (-y) = (Option.some x ^ y)⁻¹\n[PROOFSTEP]\nsimp [h, zero_rpow_of_pos, zero_rpow_of_neg, H, neg_pos.mpr]\n[GOAL]\ncase neg\ny : ℝ\nx : ℝ≥0\nh : ¬x = 0\n⊢ Option.some x ^ (-y) = (Option.some x ^ y)⁻¹\n[PROOFSTEP]\nhave A : x ^ y ≠ 0 := by simp [h]\n[GOAL]\ny : ℝ\nx : ℝ≥0\nh : ¬x = 0\n⊢ x ^ y ≠ 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\ny : ℝ\nx : ℝ≥0\nh : ¬x = 0\nA : x ^ y ≠ 0\n⊢ Option.some x ^ (-y) = (Option.some x ^ y)⁻¹\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero h, ← coe_inv A, NNReal.rpow_neg]\n[GOAL]\nx : ℝ≥0∞\ny z : ℝ\nhx : x ≠ 0\nh'x : x ≠ ⊤\n⊢ x ^ (y - z) = x ^ y / x ^ z\n[PROOFSTEP]\nrw [sub_eq_add_neg, rpow_add _ _ hx h'x, rpow_neg, div_eq_mul_inv]\n[GOAL]\nx : ℝ≥0∞\n⊢ x ^ (-1) = x⁻¹\n[PROOFSTEP]\nsimp [rpow_neg]\n[GOAL]\nx : ℝ≥0∞\ny z : ℝ\n⊢ x ^ (y * z) = (x ^ y) ^ z\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase none\ny z : ℝ\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (Hy | Hy | Hy)\n[GOAL]\ncase none.inl\ny z : ℝ\nHy : y < 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase none.inr.inl\ny z : ℝ\nHy : y = 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase none.inr.inr\ny z : ℝ\nHy : 0 < y\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase none.inl.inl\ny z : ℝ\nHy : y < 0\nHz : z < 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inl.inr.inl\ny z : ℝ\nHy : y < 0\nHz : z = 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inl.inr.inr\ny z : ℝ\nHy : y < 0\nHz : 0 < z\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inr.inl.inl\ny z : ℝ\nHy : y = 0\nHz : z < 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inr.inl.inr.inl\ny z : ℝ\nHy : y = 0\nHz : z = 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inr.inl.inr.inr\ny z : ℝ\nHy : y = 0\nHz : 0 < z\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inr.inr.inl\ny z : ℝ\nHy : 0 < y\nHz : z < 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inr.inr.inr.inl\ny z : ℝ\nHy : 0 < y\nHz : z = 0\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase none.inr.inr.inr.inr\ny z : ℝ\nHy : 0 < y\nHz : 0 < z\n⊢ none ^ (y * z) = (none ^ y) ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase some\ny z : ℝ\nx : ℝ≥0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\ny z : ℝ\nx : ℝ≥0\nh : x = 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (Hy | Hy | Hy)\n[GOAL]\ncase pos.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y < 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase pos.inr.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y = 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase pos.inr.inr\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : 0 < y\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase pos.inl.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y < 0\nHz : z < 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inl.inr.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y < 0\nHz : z = 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inl.inr.inr\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y < 0\nHz : 0 < z\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inr.inl.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y = 0\nHz : z < 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inr.inl.inr.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y = 0\nHz : z = 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inr.inl.inr.inr\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : y = 0\nHz : 0 < z\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inr.inr.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : 0 < y\nHz : z < 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inr.inr.inr.inl\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : 0 < y\nHz : z = 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase pos.inr.inr.inr.inr\ny z : ℝ\nx : ℝ≥0\nh : x = 0\nHy : 0 < y\nHz : 0 < z\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [h, Hy, Hz, zero_rpow_of_neg, zero_rpow_of_pos, top_rpow_of_neg, top_rpow_of_pos, mul_pos_of_neg_of_neg,\n mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]\n[GOAL]\ncase neg\ny z : ℝ\nx : ℝ≥0\nh : ¬x = 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nhave : x ^ y ≠ 0 := by simp [h]\n[GOAL]\ny z : ℝ\nx : ℝ≥0\nh : ¬x = 0\n⊢ x ^ y ≠ 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\ny z : ℝ\nx : ℝ≥0\nh : ¬x = 0\nthis : x ^ y ≠ 0\n⊢ Option.some x ^ (y * z) = (Option.some x ^ y) ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero h, coe_rpow_of_ne_zero this, NNReal.rpow_mul]\n[GOAL]\nx : ℝ≥0∞\nn : ℕ\n⊢ x ^ ↑n = x ^ n\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nn : ℕ\n⊢ none ^ ↑n = none ^ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase none.zero\n⊢ none ^ ↑Nat.zero = none ^ Nat.zero\n[PROOFSTEP]\nsimp [top_rpow_of_pos (Nat.cast_add_one_pos _), top_pow (Nat.succ_pos _)]\n[GOAL]\ncase none.succ\nn✝ : ℕ\n⊢ none ^ ↑(Nat.succ n✝) = none ^ Nat.succ n✝\n[PROOFSTEP]\nsimp [top_rpow_of_pos (Nat.cast_add_one_pos _), top_pow (Nat.succ_pos _)]\n[GOAL]\ncase some\nn : ℕ\nval✝ : ℝ≥0\n⊢ Option.some val✝ ^ ↑n = Option.some val✝ ^ n\n[PROOFSTEP]\nsimp [coe_rpow_of_nonneg _ (Nat.cast_nonneg n)]\n[GOAL]\nx : ℝ≥0∞\n⊢ x ^ 2 = x ^ 2\n[PROOFSTEP]\nrw [← rpow_nat_cast]\n[GOAL]\nx : ℝ≥0∞\n⊢ x ^ 2 = x ^ ↑2\n[PROOFSTEP]\nsimp only [Nat.cast_ofNat]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\n⊢ (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\n[PROOFSTEP]\nrcases eq_or_ne z 0 with (rfl | hz)\n[GOAL]\ncase inl\nx y : ℝ≥0∞\n⊢ (x * y) ^ 0 = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ 0 < 0 then ⊤ else x ^ 0 * y ^ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nx y : ℝ≥0∞\nz : ℝ\nhz : z ≠ 0\n⊢ (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\n[PROOFSTEP]\nreplace hz := hz.lt_or_lt\n[GOAL]\ncase inr\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\n⊢ (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\n[PROOFSTEP]\nwlog hxy : x ≤ y\n[GOAL]\ncase inr.inr\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nthis :\n ∀ (x y : ℝ≥0∞) (z : ℝ),\n z < 0 ∨ 0 < z → x ≤ y → (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\nhxy : ¬x ≤ y\n⊢ (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\n[PROOFSTEP]\nconvert this y x z hz (le_of_not_le hxy) using 2\n[GOAL]\ncase h.e'_2.h.e'_5\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nthis :\n ∀ (x y : ℝ≥0∞) (z : ℝ),\n z < 0 ∨ 0 < z → x ≤ y → (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\nhxy : ¬x ≤ y\n⊢ x * y = y * x\n[PROOFSTEP]\nsimp only [mul_comm, and_comm, or_comm]\n[GOAL]\ncase h.e'_3.h₁.a\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nthis :\n ∀ (x y : ℝ≥0∞) (z : ℝ),\n z < 0 ∨ 0 < z → x ≤ y → (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\nhxy : ¬x ≤ y\n⊢ (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 ↔ (y = 0 ∧ x = ⊤ ∨ y = ⊤ ∧ x = 0) ∧ z < 0\n[PROOFSTEP]\nsimp only [mul_comm, and_comm, or_comm]\n[GOAL]\ncase h.e'_3.h₃\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nthis :\n ∀ (x y : ℝ≥0∞) (z : ℝ),\n z < 0 ∨ 0 < z → x ≤ y → (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\nhxy : ¬x ≤ y\na✝ : ¬((y = 0 ∧ x = ⊤ ∨ y = ⊤ ∧ x = 0) ∧ z < 0)\n⊢ x ^ z * y ^ z = y ^ z * x ^ z\n[PROOFSTEP]\nsimp only [mul_comm, and_comm, or_comm]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhxy : x ≤ y\n⊢ (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx0)\n[GOAL]\ncase inl\ny : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhxy : 0 ≤ y\n⊢ (0 * y) ^ z = if (0 = 0 ∧ y = ⊤ ∨ 0 = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else 0 ^ z * y ^ z\n[PROOFSTEP]\ninduction y using ENNReal.recTopCoe\n[GOAL]\ncase inl.top\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhxy : 0 ≤ ⊤\n⊢ (0 * ⊤) ^ z = if (0 = 0 ∧ ⊤ = ⊤ ∨ 0 = ⊤ ∧ ⊤ = 0) ∧ z < 0 then ⊤ else 0 ^ z * ⊤ ^ z\n[PROOFSTEP]\ncases' hz with hz hz\n[GOAL]\ncase inl.coe\nz : ℝ\nhz : z < 0 ∨ 0 < z\nx✝ : ℝ≥0\nhxy : 0 ≤ ↑x✝\n⊢ (0 * ↑x✝) ^ z = if (0 = 0 ∧ ↑x✝ = ⊤ ∨ 0 = ⊤ ∧ ↑x✝ = 0) ∧ z < 0 then ⊤ else 0 ^ z * ↑x✝ ^ z\n[PROOFSTEP]\ncases' hz with hz hz\n[GOAL]\ncase inl.top.inl\nz : ℝ\nhxy : 0 ≤ ⊤\nhz : z < 0\n⊢ (0 * ⊤) ^ z = if (0 = 0 ∧ ⊤ = ⊤ ∨ 0 = ⊤ ∧ ⊤ = 0) ∧ z < 0 then ⊤ else 0 ^ z * ⊤ ^ z\n[PROOFSTEP]\nsimp [*, hz.not_lt]\n[GOAL]\ncase inl.top.inr\nz : ℝ\nhxy : 0 ≤ ⊤\nhz : 0 < z\n⊢ (0 * ⊤) ^ z = if (0 = 0 ∧ ⊤ = ⊤ ∨ 0 = ⊤ ∧ ⊤ = 0) ∧ z < 0 then ⊤ else 0 ^ z * ⊤ ^ z\n[PROOFSTEP]\nsimp [*, hz.not_lt]\n[GOAL]\ncase inl.coe.inl\nz : ℝ\nx✝ : ℝ≥0\nhxy : 0 ≤ ↑x✝\nhz : z < 0\n⊢ (0 * ↑x✝) ^ z = if (0 = 0 ∧ ↑x✝ = ⊤ ∨ 0 = ⊤ ∧ ↑x✝ = 0) ∧ z < 0 then ⊤ else 0 ^ z * ↑x✝ ^ z\n[PROOFSTEP]\nsimp [*, hz.not_lt]\n[GOAL]\ncase inl.coe.inr\nz : ℝ\nx✝ : ℝ≥0\nhxy : 0 ≤ ↑x✝\nhz : 0 < z\n⊢ (0 * ↑x✝) ^ z = if (0 = 0 ∧ ↑x✝ = ⊤ ∨ 0 = ⊤ ∧ ↑x✝ = 0) ∧ z < 0 then ⊤ else 0 ^ z * ↑x✝ ^ z\n[PROOFSTEP]\nsimp [*, hz.not_lt]\n[GOAL]\ncase inr\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhxy : x ≤ y\nhx0 : x ≠ 0\n⊢ (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\n[PROOFSTEP]\nrcases eq_or_ne y 0 with (rfl | hy0)\n[GOAL]\ncase inr.inl\nx : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhx0 : x ≠ 0\nhxy : x ≤ 0\n⊢ (x * 0) ^ z = if (x = 0 ∧ 0 = ⊤ ∨ x = ⊤ ∧ 0 = 0) ∧ z < 0 then ⊤ else x ^ z * 0 ^ z\n[PROOFSTEP]\nexact (hx0 (bot_unique hxy)).elim\n[GOAL]\ncase inr.inr\nx y : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhxy : x ≤ y\nhx0 : x ≠ 0\nhy0 : y ≠ 0\n⊢ (x * y) ^ z = if (x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else x ^ z * y ^ z\n[PROOFSTEP]\ninduction x using ENNReal.recTopCoe\n[GOAL]\ncase inr.inr.top\ny : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhy0 : y ≠ 0\nhxy : ⊤ ≤ y\nhx0 : ⊤ ≠ 0\n⊢ (⊤ * y) ^ z = if (⊤ = 0 ∧ y = ⊤ ∨ ⊤ = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else ⊤ ^ z * y ^ z\n[PROOFSTEP]\ncases' hz with hz hz\n[GOAL]\ncase inr.inr.top.inl\ny : ℝ≥0∞\nz : ℝ\nhy0 : y ≠ 0\nhxy : ⊤ ≤ y\nhx0 : ⊤ ≠ 0\nhz : z < 0\n⊢ (⊤ * y) ^ z = if (⊤ = 0 ∧ y = ⊤ ∨ ⊤ = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else ⊤ ^ z * y ^ z\n[PROOFSTEP]\nsimp [hz, top_unique hxy]\n[GOAL]\ncase inr.inr.top.inr\ny : ℝ≥0∞\nz : ℝ\nhy0 : y ≠ 0\nhxy : ⊤ ≤ y\nhx0 : ⊤ ≠ 0\nhz : 0 < z\n⊢ (⊤ * y) ^ z = if (⊤ = 0 ∧ y = ⊤ ∨ ⊤ = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else ⊤ ^ z * y ^ z\n[PROOFSTEP]\nsimp [hz, top_unique hxy]\n[GOAL]\ncase inr.inr.coe\ny : ℝ≥0∞\nz : ℝ\nhz : z < 0 ∨ 0 < z\nhy0 : y ≠ 0\nx✝ : ℝ≥0\nhxy : ↑x✝ ≤ y\nhx0 : ↑x✝ ≠ 0\n⊢ (↑x✝ * y) ^ z = if (↑x✝ = 0 ∧ y = ⊤ ∨ ↑x✝ = ⊤ ∧ y = 0) ∧ z < 0 then ⊤ else ↑x✝ ^ z * y ^ z\n[PROOFSTEP]\ninduction y using ENNReal.recTopCoe\n[GOAL]\ncase inr.inr.coe.top\nz : ℝ\nhz : z < 0 ∨ 0 < z\nx✝ : ℝ≥0\nhx0 : ↑x✝ ≠ 0\nhy0 : ⊤ ≠ 0\nhxy : ↑x✝ ≤ ⊤\n⊢ (↑x✝ * ⊤) ^ z = if (↑x✝ = 0 ∧ ⊤ = ⊤ ∨ ↑x✝ = ⊤ ∧ ⊤ = 0) ∧ z < 0 then ⊤ else ↑x✝ ^ z * ⊤ ^ z\n[PROOFSTEP]\nrw [ne_eq, coe_eq_zero] at hx0 \n[GOAL]\ncase inr.inr.coe.top\nz : ℝ\nhz : z < 0 ∨ 0 < z\nx✝ : ℝ≥0\nhx0 : ¬x✝ = 0\nhy0 : ⊤ ≠ 0\nhxy : ↑x✝ ≤ ⊤\n⊢ (↑x✝ * ⊤) ^ z = if (↑x✝ = 0 ∧ ⊤ = ⊤ ∨ ↑x✝ = ⊤ ∧ ⊤ = 0) ∧ z < 0 then ⊤ else ↑x✝ ^ z * ⊤ ^ z\n[PROOFSTEP]\ncases' hz with hz hz\n[GOAL]\ncase inr.inr.coe.top.inl\nz : ℝ\nx✝ : ℝ≥0\nhx0 : ¬x✝ = 0\nhy0 : ⊤ ≠ 0\nhxy : ↑x✝ ≤ ⊤\nhz : z < 0\n⊢ (↑x✝ * ⊤) ^ z = if (↑x✝ = 0 ∧ ⊤ = ⊤ ∨ ↑x✝ = ⊤ ∧ ⊤ = 0) ∧ z < 0 then ⊤ else ↑x✝ ^ z * ⊤ ^ z\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr.inr.coe.top.inr\nz : ℝ\nx✝ : ℝ≥0\nhx0 : ¬x✝ = 0\nhy0 : ⊤ ≠ 0\nhxy : ↑x✝ ≤ ⊤\nhz : 0 < z\n⊢ (↑x✝ * ⊤) ^ z = if (↑x✝ = 0 ∧ ⊤ = ⊤ ∨ ↑x✝ = ⊤ ∧ ⊤ = 0) ∧ z < 0 then ⊤ else ↑x✝ ^ z * ⊤ ^ z\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr.inr.coe.coe\nz : ℝ\nhz : z < 0 ∨ 0 < z\nx✝¹ : ℝ≥0\nhx0 : ↑x✝¹ ≠ 0\nx✝ : ℝ≥0\nhy0 : ↑x✝ ≠ 0\nhxy : ↑x✝¹ ≤ ↑x✝\n⊢ (↑x✝¹ * ↑x✝) ^ z = if (↑x✝¹ = 0 ∧ ↑x✝ = ⊤ ∨ ↑x✝¹ = ⊤ ∧ ↑x✝ = 0) ∧ z < 0 then ⊤ else ↑x✝¹ ^ z * ↑x✝ ^ z\n[PROOFSTEP]\nsimp only [*, false_and_iff, and_false_iff, false_or_iff, if_false]\n[GOAL]\ncase inr.inr.coe.coe\nz : ℝ\nhz : z < 0 ∨ 0 < z\nx✝¹ : ℝ≥0\nhx0 : ↑x✝¹ ≠ 0\nx✝ : ℝ≥0\nhy0 : ↑x✝ ≠ 0\nhxy : ↑x✝¹ ≤ ↑x✝\n⊢ (↑x✝¹ * ↑x✝) ^ z = ↑x✝¹ ^ z * ↑x✝ ^ z\n[PROOFSTEP]\nnorm_cast at *\n[GOAL]\ncase inr.inr.coe.coe\nz : ℝ\nx✝¹ x✝ : ℝ≥0\nhz : z < 0 ∨ 0 < z\nhx0 : ¬x✝¹ = 0\nhy0 : ¬x✝ = 0\nhxy : x✝¹ ≤ x✝\n⊢ ↑(x✝¹ * x✝) ^ z = ↑x✝¹ ^ z * ↑x✝ ^ z\n[PROOFSTEP]\nrw [coe_rpow_of_ne_zero (mul_ne_zero hx0 hy0), NNReal.mul_rpow]\n[GOAL]\ncase inr.inr.coe.coe\nz : ℝ\nx✝¹ x✝ : ℝ≥0\nhz : z < 0 ∨ 0 < z\nhx0 : ¬x✝¹ = 0\nhy0 : ¬x✝ = 0\nhxy : x✝¹ ≤ x✝\n⊢ ↑(x✝¹ ^ z * x✝ ^ z) = ↑x✝¹ ^ z * ↑x✝ ^ z\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx y : ℝ≥0∞\nhx : x ≠ ⊤\nhy : y ≠ ⊤\nz : ℝ\n⊢ (x * y) ^ z = x ^ z * y ^ z\n[PROOFSTEP]\nsimp [*, mul_rpow_eq_ite]\n[GOAL]\nx y : ℝ≥0∞\nhx : x ≠ 0\nhy : y ≠ 0\nz : ℝ\n⊢ (x * y) ^ z = x ^ z * y ^ z\n[PROOFSTEP]\nsimp [*, mul_rpow_eq_ite]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 ≤ z\n⊢ (x * y) ^ z = x ^ z * y ^ z\n[PROOFSTEP]\nsimp [hz.not_lt, mul_rpow_eq_ite]\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\n⊢ x⁻¹ ^ y = (x ^ y)⁻¹\n[PROOFSTEP]\nrcases eq_or_ne y 0 with (rfl | hy)\n[GOAL]\ncase inl\nx : ℝ≥0∞\n⊢ x⁻¹ ^ 0 = (x ^ 0)⁻¹\n[PROOFSTEP]\nsimp only [rpow_zero, inv_one]\n[GOAL]\ncase inr\nx : ℝ≥0∞\ny : ℝ\nhy : y ≠ 0\n⊢ x⁻¹ ^ y = (x ^ y)⁻¹\n[PROOFSTEP]\nreplace hy := hy.lt_or_lt\n[GOAL]\ncase inr\nx : ℝ≥0∞\ny : ℝ\nhy : y < 0 ∨ 0 < y\n⊢ x⁻¹ ^ y = (x ^ y)⁻¹\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | h0)\n[GOAL]\ncase inr.inl\ny : ℝ\nhy : y < 0 ∨ 0 < y\n⊢ 0⁻¹ ^ y = (0 ^ y)⁻¹\n[PROOFSTEP]\ncases hy\n[GOAL]\ncase inr.inl.inl\ny : ℝ\nh✝ : y < 0\n⊢ 0⁻¹ ^ y = (0 ^ y)⁻¹\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr.inl.inr\ny : ℝ\nh✝ : 0 < y\n⊢ 0⁻¹ ^ y = (0 ^ y)⁻¹\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr.inr\nx : ℝ≥0∞\ny : ℝ\nhy : y < 0 ∨ 0 < y\nh0 : x ≠ 0\n⊢ x⁻¹ ^ y = (x ^ y)⁻¹\n[PROOFSTEP]\nrcases eq_or_ne x ⊤ with (rfl | h_top)\n[GOAL]\ncase inr.inr.inl\ny : ℝ\nhy : y < 0 ∨ 0 < y\nh0 : ⊤ ≠ 0\n⊢ ⊤⁻¹ ^ y = (⊤ ^ y)⁻¹\n[PROOFSTEP]\ncases hy\n[GOAL]\ncase inr.inr.inl.inl\ny : ℝ\nh0 : ⊤ ≠ 0\nh✝ : y < 0\n⊢ ⊤⁻¹ ^ y = (⊤ ^ y)⁻¹\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr.inr.inl.inr\ny : ℝ\nh0 : ⊤ ≠ 0\nh✝ : 0 < y\n⊢ ⊤⁻¹ ^ y = (⊤ ^ y)⁻¹\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr.inr.inr\nx : ℝ≥0∞\ny : ℝ\nhy : y < 0 ∨ 0 < y\nh0 : x ≠ 0\nh_top : x ≠ ⊤\n⊢ x⁻¹ ^ y = (x ^ y)⁻¹\n[PROOFSTEP]\napply ENNReal.eq_inv_of_mul_eq_one_left\n[GOAL]\ncase inr.inr.inr.h\nx : ℝ≥0∞\ny : ℝ\nhy : y < 0 ∨ 0 < y\nh0 : x ≠ 0\nh_top : x ≠ ⊤\n⊢ x⁻¹ ^ y * x ^ y = 1\n[PROOFSTEP]\nrw [← mul_rpow_of_ne_zero (ENNReal.inv_ne_zero.2 h_top) h0, ENNReal.inv_mul_cancel h0 h_top, one_rpow]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 ≤ z\n⊢ (x / y) ^ z = x ^ z / y ^ z\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_rpow_of_nonneg _ _ hz, inv_rpow, div_eq_mul_inv]\n[GOAL]\nz : ℝ\nh : 0 < z\n⊢ StrictMono fun x => x ^ z\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\nz : ℝ\nh : 0 < z\nx y : ℝ≥0∞\nhxy : x < y\n⊢ (fun x => x ^ z) x < (fun x => x ^ z) y\n[PROOFSTEP]\nlift x to ℝ≥0 using ne_top_of_lt hxy\n[GOAL]\ncase intro\nz : ℝ\nh : 0 < z\ny : ℝ≥0∞\nx : ℝ≥0\nhxy : ↑x < y\n⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) y\n[PROOFSTEP]\nrcases eq_or_ne y ∞ with (rfl | hy)\n[GOAL]\ncase intro.inl\nz : ℝ\nh : 0 < z\nx : ℝ≥0\nhxy : ↑x < ⊤\n⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) ⊤\n[PROOFSTEP]\nsimp only [top_rpow_of_pos h, coe_rpow_of_nonneg _ h.le, coe_lt_top]\n[GOAL]\ncase intro.inr\nz : ℝ\nh : 0 < z\ny : ℝ≥0∞\nx : ℝ≥0\nhxy : ↑x < y\nhy : y ≠ ⊤\n⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) y\n[PROOFSTEP]\nlift y to ℝ≥0 using hy\n[GOAL]\ncase intro.inr.intro\nz : ℝ\nh : 0 < z\nx y : ℝ≥0\nhxy : ↑x < ↑y\n⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) ↑y\n[PROOFSTEP]\nsimp only [coe_rpow_of_nonneg _ h.le, NNReal.rpow_lt_rpow (coe_lt_coe.1 hxy) h, coe_lt_coe]\n[GOAL]\nz : ℝ\nh : 0 ≤ z\nh0 : 0 = z\n⊢ Monotone fun x => x ^ 0\n[PROOFSTEP]\nsimp only [rpow_zero, monotone_const]\n[GOAL]\ny : ℝ\nhy : 0 < y\nx : ℝ≥0∞\n⊢ (fun x => x ^ y) ((fun x => x ^ (1 / y)) x) = x\n[PROOFSTEP]\ndsimp\n[GOAL]\ny : ℝ\nhy : 0 < y\nx : ℝ≥0∞\n⊢ (x ^ (1 / y)) ^ y = x\n[PROOFSTEP]\nrw [← rpow_mul, one_div_mul_cancel hy.ne.symm, rpow_one]\n[GOAL]\ny : ℝ\nhy : 0 < y\n⊢ OrderIso.symm (orderIsoRpow y hy) = orderIsoRpow (1 / y) (_ : 0 < 1 / y)\n[PROOFSTEP]\nsimp only [orderIsoRpow, one_div_one_div]\n[GOAL]\ny : ℝ\nhy : 0 < y\n⊢ OrderIso.symm\n (StrictMono.orderIsoOfRightInverse (fun x => x ^ y) (_ : StrictMono fun x => x ^ y) (fun x => x ^ (1 / y))\n (_ : ∀ (x : ℝ≥0∞), (fun x => x ^ y) ((fun x => x ^ (1 / y)) x) = x)) =\n StrictMono.orderIsoOfRightInverse (fun x => x ^ (1 / y)) (_ : StrictMono fun x => x ^ (1 / y)) (fun x => x ^ y)\n (_ : Function.RightInverse (fun x => x ^ y) fun x => x ^ (1 / y))\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ≤ y ^ (1 / z) ↔ x ^ z ≤ y\n[PROOFSTEP]\nnth_rw 1 [← rpow_one x]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ^ 1 ≤ y ^ (1 / z) ↔ x ^ z ≤ y\n[PROOFSTEP]\nnth_rw 1 [← @_root_.mul_inv_cancel _ _ z hz.ne']\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ^ (z * z⁻¹) ≤ y ^ (1 / z) ↔ x ^ z ≤ y\n[PROOFSTEP]\nrw [rpow_mul, ← one_div, @rpow_le_rpow_iff _ _ (1 / z) (by simp [hz])]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ 0 < 1 / z\n[PROOFSTEP]\nsimp [hz]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x < y ^ (1 / z) ↔ x ^ z < y\n[PROOFSTEP]\nnth_rw 1 [← rpow_one x]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ^ 1 < y ^ (1 / z) ↔ x ^ z < y\n[PROOFSTEP]\nnth_rw 1 [← @_root_.mul_inv_cancel _ _ z (ne_of_lt hz).symm]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ^ (z * z⁻¹) < y ^ (1 / z) ↔ x ^ z < y\n[PROOFSTEP]\nrw [rpow_mul, ← one_div, @rpow_lt_rpow_iff _ _ (1 / z) (by simp [hz])]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ 0 < 1 / z\n[PROOFSTEP]\nsimp [hz]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ^ (1 / z) ≤ y ↔ x ≤ y ^ z\n[PROOFSTEP]\nnth_rw 1 [← ENNReal.rpow_one y]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ^ (1 / z) ≤ y ^ 1 ↔ x ≤ y ^ z\n[PROOFSTEP]\nnth_rw 2 [← @_root_.mul_inv_cancel _ _ z hz.ne.symm]\n[GOAL]\nx y : ℝ≥0∞\nz : ℝ\nhz : 0 < z\n⊢ x ^ (1 / z) ≤ y ^ (z * z⁻¹) ↔ x ≤ y ^ z\n[PROOFSTEP]\nrw [ENNReal.rpow_mul, ← one_div, ENNReal.rpow_le_rpow_iff (one_div_pos.2 hz)]\n[GOAL]\nx : ℝ≥0∞\ny z : ℝ\nhx : 1 < x\nhx' : x ≠ ⊤\nhyz : y < z\n⊢ x ^ y < x ^ z\n[PROOFSTEP]\nlift x to ℝ≥0 using hx'\n[GOAL]\ncase intro\ny z : ℝ\nhyz : y < z\nx : ℝ≥0\nhx : 1 < ↑x\n⊢ ↑x ^ y < ↑x ^ z\n[PROOFSTEP]\nrw [one_lt_coe_iff] at hx \n[GOAL]\ncase intro\ny z : ℝ\nhyz : y < z\nx : ℝ≥0\nhx : 1 < x\n⊢ ↑x ^ y < ↑x ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero (ne_of_gt (lt_trans zero_lt_one hx)), NNReal.rpow_lt_rpow_of_exponent_lt hx hyz]\n[GOAL]\nx : ℝ≥0∞\ny z : ℝ\nhx : 1 ≤ x\nhyz : y ≤ z\n⊢ x ^ y ≤ x ^ z\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (Hy | Hy | Hy)\n[GOAL]\ncase none.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y < 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase none.inr.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y = 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase none.inr.inr\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : 0 < y\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase none.inl.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y < 0\nHz : z < 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inl.inr.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y < 0\nHz : z = 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inl.inr.inr\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y < 0\nHz : 0 < z\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inr.inl.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y = 0\nHz : z < 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inr.inl.inr.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y = 0\nHz : z = 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inr.inl.inr.inr\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y = 0\nHz : 0 < z\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inr.inr.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : 0 < y\nHz : z < 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inr.inr.inr.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : 0 < y\nHz : z = 0\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inr.inr.inr.inr\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : 0 < y\nHz : 0 < z\n⊢ none ^ y ≤ none ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl]\n[GOAL]\ncase none.inr.inl.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : y = 0\nHz : z < 0\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase none.inr.inr.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : 0 < y\nHz : z < 0\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase none.inr.inr.inr.inl\ny z : ℝ\nhyz : y ≤ z\nhx : 1 ≤ none\nHy : 0 < y\nHz : z = 0\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase some\ny z : ℝ\nhyz : y ≤ z\nval✝ : ℝ≥0\nhx : 1 ≤ Option.some val✝\n⊢ Option.some val✝ ^ y ≤ Option.some val✝ ^ z\n[PROOFSTEP]\nsimp only [one_le_coe_iff, some_eq_coe] at hx \n[GOAL]\ncase some\ny z : ℝ\nhyz : y ≤ z\nval✝ : ℝ≥0\nhx : 1 ≤ val✝\n⊢ Option.some val✝ ^ y ≤ Option.some val✝ ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero (ne_of_gt (lt_of_lt_of_le zero_lt_one hx)), NNReal.rpow_le_rpow_of_exponent_le hx hyz]\n[GOAL]\nx : ℝ≥0∞\ny z : ℝ\nhx0 : 0 < x\nhx1 : x < 1\nhyz : z < y\n⊢ x ^ y < x ^ z\n[PROOFSTEP]\nlift x to ℝ≥0 using ne_of_lt (lt_of_lt_of_le hx1 le_top)\n[GOAL]\ncase intro\ny z : ℝ\nhyz : z < y\nx : ℝ≥0\nhx0 : 0 < ↑x\nhx1 : ↑x < 1\n⊢ ↑x ^ y < ↑x ^ z\n[PROOFSTEP]\nsimp only [coe_lt_one_iff, coe_pos] at hx0 hx1 \n[GOAL]\ncase intro\ny z : ℝ\nhyz : z < y\nx : ℝ≥0\nhx0 : 0 < x\nhx1 : x < 1\n⊢ ↑x ^ y < ↑x ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero (ne_of_gt hx0), NNReal.rpow_lt_rpow_of_exponent_gt hx0 hx1 hyz]\n[GOAL]\nx : ℝ≥0∞\ny z : ℝ\nhx1 : x ≤ 1\nhyz : z ≤ y\n⊢ x ^ y ≤ x ^ z\n[PROOFSTEP]\nlift x to ℝ≥0 using ne_of_lt (lt_of_le_of_lt hx1 coe_lt_top)\n[GOAL]\ncase intro\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nrcases lt_trichotomy y 0 with (Hy | Hy | Hy)\n[GOAL]\ncase pos.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y < 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase pos.inr.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y = 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase pos.inr.inr\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : 0 < y\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (Hz | Hz | Hz)\n[GOAL]\ncase pos.inl.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y < 0\nHz : z < 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inl.inr.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y < 0\nHz : z = 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inl.inr.inr\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y < 0\nHz : 0 < z\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inr.inl.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y = 0\nHz : z < 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inr.inl.inr.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y = 0\nHz : z = 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inr.inl.inr.inr\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y = 0\nHz : 0 < z\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inr.inr.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : 0 < y\nHz : z < 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inr.inr.inr.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : 0 < y\nHz : z = 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inr.inr.inr.inr\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : 0 < y\nHz : 0 < z\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [Hy, Hz, h, zero_rpow_of_neg, zero_rpow_of_pos, le_refl]\n[GOAL]\ncase pos.inl.inr.inl\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y < 0\nHz : z = 0\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos.inl.inr.inr\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y < 0\nHz : 0 < z\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos.inr.inl.inr.inr\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : x = 0\nHy : y = 0\nHz : 0 < z\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : ↑x ≤ 1\nh : ¬x = 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nrw [coe_le_one_iff] at hx1 \n[GOAL]\ncase neg\ny z : ℝ\nhyz : z ≤ y\nx : ℝ≥0\nhx1 : x ≤ 1\nh : ¬x = 0\n⊢ ↑x ^ y ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero h, NNReal.rpow_le_rpow_of_exponent_ge (bot_lt_iff_ne_bot.mpr h) hx1 hyz]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : x ≤ 1\nh_one_le : 1 ≤ z\n⊢ x ^ z ≤ x\n[PROOFSTEP]\nnth_rw 2 [← ENNReal.rpow_one x]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : x ≤ 1\nh_one_le : 1 ≤ z\n⊢ x ^ z ≤ x ^ 1\n[PROOFSTEP]\nexact ENNReal.rpow_le_rpow_of_exponent_ge hx h_one_le\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : 1 ≤ x\nh_one_le : 1 ≤ z\n⊢ x ≤ x ^ z\n[PROOFSTEP]\nnth_rw 1 [← ENNReal.rpow_one x]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : 1 ≤ x\nh_one_le : 1 ≤ z\n⊢ x ^ 1 ≤ x ^ z\n[PROOFSTEP]\nexact ENNReal.rpow_le_rpow_of_exponent_le hx h_one_le\n[GOAL]\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhp_nonneg : 0 ≤ p\n⊢ 0 < x ^ p\n[PROOFSTEP]\nby_cases hp_zero : p = 0\n[GOAL]\ncase pos\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhp_nonneg : 0 ≤ p\nhp_zero : p = 0\n⊢ 0 < x ^ p\n[PROOFSTEP]\nsimp [hp_zero, zero_lt_one]\n[GOAL]\ncase neg\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhp_nonneg : 0 ≤ p\nhp_zero : ¬p = 0\n⊢ 0 < x ^ p\n[PROOFSTEP]\nrw [← Ne.def] at hp_zero \n[GOAL]\ncase neg\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhp_nonneg : 0 ≤ p\nhp_zero : p ≠ 0\n⊢ 0 < x ^ p\n[PROOFSTEP]\nhave hp_pos := lt_of_le_of_ne hp_nonneg hp_zero.symm\n[GOAL]\ncase neg\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhp_nonneg : 0 ≤ p\nhp_zero : p ≠ 0\nhp_pos : 0 < p\n⊢ 0 < x ^ p\n[PROOFSTEP]\nrw [← zero_rpow_of_pos hp_pos]\n[GOAL]\ncase neg\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhp_nonneg : 0 ≤ p\nhp_zero : p ≠ 0\nhp_pos : 0 < p\n⊢ 0 ^ p < x ^ p\n[PROOFSTEP]\nexact rpow_lt_rpow hx_pos hp_pos\n[GOAL]\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhx_ne_top : x ≠ ⊤\n⊢ 0 < x ^ p\n[PROOFSTEP]\ncases' lt_or_le 0 p with hp_pos hp_nonpos\n[GOAL]\ncase inl\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhx_ne_top : x ≠ ⊤\nhp_pos : 0 < p\n⊢ 0 < x ^ p\n[PROOFSTEP]\nexact rpow_pos_of_nonneg hx_pos (le_of_lt hp_pos)\n[GOAL]\ncase inr\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhx_ne_top : x ≠ ⊤\nhp_nonpos : p ≤ 0\n⊢ 0 < x ^ p\n[PROOFSTEP]\nrw [← neg_neg p, rpow_neg, ENNReal.inv_pos]\n[GOAL]\ncase inr\np : ℝ\nx : ℝ≥0∞\nhx_pos : 0 < x\nhx_ne_top : x ≠ ⊤\nhp_nonpos : p ≤ 0\n⊢ x ^ (-p) ≠ ⊤\n[PROOFSTEP]\nexact rpow_ne_top_of_nonneg (Right.nonneg_neg_iff.mpr hp_nonpos) hx_ne_top\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : x < 1\nhz : 0 < z\n⊢ x ^ z < 1\n[PROOFSTEP]\nlift x to ℝ≥0 using ne_of_lt (lt_of_lt_of_le hx le_top)\n[GOAL]\ncase intro\nz : ℝ\nhz : 0 < z\nx : ℝ≥0\nhx : ↑x < 1\n⊢ ↑x ^ z < 1\n[PROOFSTEP]\nsimp only [coe_lt_one_iff] at hx \n[GOAL]\ncase intro\nz : ℝ\nhz : 0 < z\nx : ℝ≥0\nhx : x < 1\n⊢ ↑x ^ z < 1\n[PROOFSTEP]\nsimp [coe_rpow_of_nonneg _ (le_of_lt hz), NNReal.rpow_lt_one hx hz]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : x ≤ 1\nhz : 0 ≤ z\n⊢ x ^ z ≤ 1\n[PROOFSTEP]\nlift x to ℝ≥0 using ne_of_lt (lt_of_le_of_lt hx coe_lt_top)\n[GOAL]\ncase intro\nz : ℝ\nhz : 0 ≤ z\nx : ℝ≥0\nhx : ↑x ≤ 1\n⊢ ↑x ^ z ≤ 1\n[PROOFSTEP]\nsimp only [coe_le_one_iff] at hx \n[GOAL]\ncase intro\nz : ℝ\nhz : 0 ≤ z\nx : ℝ≥0\nhx : x ≤ 1\n⊢ ↑x ^ z ≤ 1\n[PROOFSTEP]\nsimp [coe_rpow_of_nonneg _ hz, NNReal.rpow_le_one hx hz]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : 1 < x\nhz : z < 0\n⊢ x ^ z < 1\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nz : ℝ\nhz : z < 0\nhx : 1 < none\n⊢ none ^ z < 1\n[PROOFSTEP]\nsimp [top_rpow_of_neg hz, zero_lt_one]\n[GOAL]\ncase some\nz : ℝ\nhz : z < 0\nval✝ : ℝ≥0\nhx : 1 < Option.some val✝\n⊢ Option.some val✝ ^ z < 1\n[PROOFSTEP]\nsimp only [some_eq_coe, one_lt_coe_iff] at hx \n[GOAL]\ncase some\nz : ℝ\nhz : z < 0\nval✝ : ℝ≥0\nhx : 1 < val✝\n⊢ Option.some val✝ ^ z < 1\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero (ne_of_gt (lt_trans zero_lt_one hx)), NNReal.rpow_lt_one_of_one_lt_of_neg hx hz]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : 1 ≤ x\nhz : z < 0\n⊢ x ^ z ≤ 1\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nz : ℝ\nhz : z < 0\nhx : 1 ≤ none\n⊢ none ^ z ≤ 1\n[PROOFSTEP]\nsimp [top_rpow_of_neg hz, zero_lt_one]\n[GOAL]\ncase some\nz : ℝ\nhz : z < 0\nval✝ : ℝ≥0\nhx : 1 ≤ Option.some val✝\n⊢ Option.some val✝ ^ z ≤ 1\n[PROOFSTEP]\nsimp only [one_le_coe_iff, some_eq_coe] at hx \n[GOAL]\ncase some\nz : ℝ\nhz : z < 0\nval✝ : ℝ≥0\nhx : 1 ≤ val✝\n⊢ Option.some val✝ ^ z ≤ 1\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero (ne_of_gt (lt_of_lt_of_le zero_lt_one hx)),\n NNReal.rpow_le_one_of_one_le_of_nonpos hx (le_of_lt hz)]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : 1 < x\nhz : 0 < z\n⊢ 1 < x ^ z\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nz : ℝ\nhz : 0 < z\nhx : 1 < none\n⊢ 1 < none ^ z\n[PROOFSTEP]\nsimp [top_rpow_of_pos hz]\n[GOAL]\ncase some\nz : ℝ\nhz : 0 < z\nval✝ : ℝ≥0\nhx : 1 < Option.some val✝\n⊢ 1 < Option.some val✝ ^ z\n[PROOFSTEP]\nsimp only [some_eq_coe, one_lt_coe_iff] at hx \n[GOAL]\ncase some\nz : ℝ\nhz : 0 < z\nval✝ : ℝ≥0\nhx : 1 < val✝\n⊢ 1 < Option.some val✝ ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_nonneg _ (le_of_lt hz), NNReal.one_lt_rpow hx hz]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx : 1 ≤ x\nhz : 0 < z\n⊢ 1 ≤ x ^ z\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nz : ℝ\nhz : 0 < z\nhx : 1 ≤ none\n⊢ 1 ≤ none ^ z\n[PROOFSTEP]\nsimp [top_rpow_of_pos hz]\n[GOAL]\ncase some\nz : ℝ\nhz : 0 < z\nval✝ : ℝ≥0\nhx : 1 ≤ Option.some val✝\n⊢ 1 ≤ Option.some val✝ ^ z\n[PROOFSTEP]\nsimp only [one_le_coe_iff, some_eq_coe] at hx \n[GOAL]\ncase some\nz : ℝ\nhz : 0 < z\nval✝ : ℝ≥0\nhx : 1 ≤ val✝\n⊢ 1 ≤ Option.some val✝ ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_nonneg _ (le_of_lt hz), NNReal.one_le_rpow hx (le_of_lt hz)]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx1 : 0 < x\nhx2 : x < 1\nhz : z < 0\n⊢ 1 < x ^ z\n[PROOFSTEP]\nlift x to ℝ≥0 using ne_of_lt (lt_of_lt_of_le hx2 le_top)\n[GOAL]\ncase intro\nz : ℝ\nhz : z < 0\nx : ℝ≥0\nhx1 : 0 < ↑x\nhx2 : ↑x < 1\n⊢ 1 < ↑x ^ z\n[PROOFSTEP]\nsimp only [coe_lt_one_iff, coe_pos] at hx1 hx2 ⊢\n[GOAL]\ncase intro\nz : ℝ\nhz : z < 0\nx : ℝ≥0\nhx1 : 0 < x\nhx2 : x < 1\n⊢ 1 < ↑x ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero (ne_of_gt hx1), NNReal.one_lt_rpow_of_pos_of_lt_one_of_neg hx1 hx2 hz]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\nhx1 : 0 < x\nhx2 : x ≤ 1\nhz : z < 0\n⊢ 1 ≤ x ^ z\n[PROOFSTEP]\nlift x to ℝ≥0 using ne_of_lt (lt_of_le_of_lt hx2 coe_lt_top)\n[GOAL]\ncase intro\nz : ℝ\nhz : z < 0\nx : ℝ≥0\nhx1 : 0 < ↑x\nhx2 : ↑x ≤ 1\n⊢ 1 ≤ ↑x ^ z\n[PROOFSTEP]\nsimp only [coe_le_one_iff, coe_pos] at hx1 hx2 ⊢\n[GOAL]\ncase intro\nz : ℝ\nhz : z < 0\nx : ℝ≥0\nhx1 : 0 < x\nhx2 : x ≤ 1\n⊢ 1 ≤ ↑x ^ z\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero (ne_of_gt hx1), NNReal.one_le_rpow_of_pos_of_le_one_of_nonpos hx1 hx2 (le_of_lt hz)]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\n⊢ ENNReal.toNNReal x ^ z = ENNReal.toNNReal (x ^ z)\n[PROOFSTEP]\nrcases lt_trichotomy z 0 with (H | H | H)\n[GOAL]\ncase inl\nx : ℝ≥0∞\nz : ℝ\nH : z < 0\n⊢ ENNReal.toNNReal x ^ z = ENNReal.toNNReal (x ^ z)\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase inl.none\nz : ℝ\nH : z < 0\n⊢ ENNReal.toNNReal none ^ z = ENNReal.toNNReal (none ^ z)\n[PROOFSTEP]\nsimp [H, ne_of_lt]\n[GOAL]\ncase inl.some\nz : ℝ\nH : z < 0\nx : ℝ≥0\n⊢ ENNReal.toNNReal (Option.some x) ^ z = ENNReal.toNNReal (Option.some x ^ z)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nz : ℝ\nH : z < 0\nx : ℝ≥0\nhx : x = 0\n⊢ ENNReal.toNNReal (Option.some x) ^ z = ENNReal.toNNReal (Option.some x ^ z)\n[PROOFSTEP]\nsimp [hx, H, ne_of_lt]\n[GOAL]\ncase neg\nz : ℝ\nH : z < 0\nx : ℝ≥0\nhx : ¬x = 0\n⊢ ENNReal.toNNReal (Option.some x) ^ z = ENNReal.toNNReal (Option.some x ^ z)\n[PROOFSTEP]\nsimp [coe_rpow_of_ne_zero hx]\n[GOAL]\ncase inr.inl\nx : ℝ≥0∞\nz : ℝ\nH : z = 0\n⊢ ENNReal.toNNReal x ^ z = ENNReal.toNNReal (x ^ z)\n[PROOFSTEP]\nsimp [H]\n[GOAL]\ncase inr.inr\nx : ℝ≥0∞\nz : ℝ\nH : 0 < z\n⊢ ENNReal.toNNReal x ^ z = ENNReal.toNNReal (x ^ z)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inr.inr.none\nz : ℝ\nH : 0 < z\n⊢ ENNReal.toNNReal none ^ z = ENNReal.toNNReal (none ^ z)\n[PROOFSTEP]\nsimp [H, ne_of_gt]\n[GOAL]\ncase inr.inr.some\nz : ℝ\nH : 0 < z\nval✝ : ℝ≥0\n⊢ ENNReal.toNNReal (Option.some val✝) ^ z = ENNReal.toNNReal (Option.some val✝ ^ z)\n[PROOFSTEP]\nsimp [coe_rpow_of_nonneg _ (le_of_lt H)]\n[GOAL]\nx : ℝ≥0∞\nz : ℝ\n⊢ ENNReal.toReal x ^ z = ENNReal.toReal (x ^ z)\n[PROOFSTEP]\nrw [ENNReal.toReal, ENNReal.toReal, ← NNReal.coe_rpow, ENNReal.toNNReal_rpow]\n[GOAL]\nx p : ℝ\nhx_pos : 0 < x\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nsimp_rw [ENNReal.ofReal]\n[GOAL]\nx p : ℝ\nhx_pos : 0 < x\n⊢ ↑(toNNReal x) ^ p = ↑(toNNReal (x ^ p))\n[PROOFSTEP]\nrw [coe_rpow_of_ne_zero, coe_eq_coe, Real.toNNReal_rpow_of_nonneg hx_pos.le]\n[GOAL]\ncase h\nx p : ℝ\nhx_pos : 0 < x\n⊢ toNNReal x ≠ 0\n[PROOFSTEP]\nsimp [hx_pos]\n[GOAL]\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\nhp0 : p = 0\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nsimp [hp0]\n[GOAL]\ncase neg\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\nhp0 : ¬p = 0\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nby_cases hx0 : x = 0\n[GOAL]\ncase pos\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\nhp0 : ¬p = 0\nhx0 : x = 0\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nrw [← Ne.def] at hp0 \n[GOAL]\ncase pos\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\nhp0 : p ≠ 0\nhx0 : x = 0\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nhave hp_pos : 0 < p := lt_of_le_of_ne hp_nonneg hp0.symm\n[GOAL]\ncase pos\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\nhp0 : p ≠ 0\nhx0 : x = 0\nhp_pos : 0 < p\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nsimp [hx0, hp_pos, hp_pos.ne.symm]\n[GOAL]\ncase neg\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\nhp0 : ¬p = 0\nhx0 : ¬x = 0\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nrw [← Ne.def] at hx0 \n[GOAL]\ncase neg\nx p : ℝ\nhx_nonneg : 0 ≤ x\nhp_nonneg : 0 ≤ p\nhp0 : ¬p = 0\nhx0 : x ≠ 0\n⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)\n[PROOFSTEP]\nexact ofReal_rpow_of_pos (hx_nonneg.lt_of_ne hx0.symm)\n[GOAL]\nx : ℝ\nhx : x ≠ 0\n⊢ Function.Injective fun y => y ^ x\n[PROOFSTEP]\nintro y z hyz\n[GOAL]\nx : ℝ\nhx : x ≠ 0\ny z : ℝ≥0∞\nhyz : (fun y => y ^ x) y = (fun y => y ^ x) z\n⊢ y = z\n[PROOFSTEP]\ndsimp only at hyz \n[GOAL]\nx : ℝ\nhx : x ≠ 0\ny z : ℝ≥0∞\nhyz : y ^ x = z ^ x\n⊢ y = z\n[PROOFSTEP]\nrw [← rpow_one y, ← rpow_one z, ← _root_.mul_inv_cancel hx, rpow_mul, rpow_mul, hyz]\n[GOAL]\nx : ℝ\nhx : x ≠ 0\ny : ℝ≥0∞\n⊢ (fun y => y ^ x) (y ^ x⁻¹) = y\n[PROOFSTEP]\nsimp_rw [← rpow_mul, _root_.inv_mul_cancel hx, rpow_one]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "llama_tokens": 33377, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424450764199, "lm_q2_score": 0.7490872187162397, "lm_q1q2_score": 0.6336846733763107}} {"text": "[GOAL]\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\n⊢ Rat.Nonneg (a /. b) ↔ 0 ≤ a\n[PROOFSTEP]\ngeneralize ha : a /. b = x\n[GOAL]\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nx : ℚ\nha : a /. b = x\n⊢ Rat.Nonneg x ↔ 0 ≤ a\n[PROOFSTEP]\ncases' x with n₁ d₁ h₁ c₁\n[GOAL]\ncase mk'\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = mk' n₁ d₁\n⊢ Rat.Nonneg (mk' n₁ d₁) ↔ 0 ≤ a\n[PROOFSTEP]\nrw [num_den'] at ha \n[GOAL]\ncase mk'\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\n⊢ Rat.Nonneg (mk' n₁ d₁) ↔ 0 ≤ a\n[PROOFSTEP]\nsimp [Rat.Nonneg]\n[GOAL]\ncase mk'\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\n⊢ 0 ≤ n₁ ↔ 0 ≤ a\n[PROOFSTEP]\nhave d0 := Int.ofNat_lt.2 (Nat.pos_of_ne_zero h₁)\n[GOAL]\ncase mk'\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\n⊢ 0 ≤ n₁ ↔ 0 ≤ a\n[PROOFSTEP]\nhave := (divInt_eq_iff (ne_of_gt h) (ne_of_gt d0)).1 ha\n[GOAL]\ncase mk'\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\n⊢ 0 ≤ n₁ ↔ 0 ≤ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk'.mp\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\n⊢ 0 ≤ n₁ → 0 ≤ a\n[PROOFSTEP]\nintro h₂\n[GOAL]\ncase mk'.mpr\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\n⊢ 0 ≤ a → 0 ≤ n₁\n[PROOFSTEP]\nintro h₂\n[GOAL]\ncase mk'.mp\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\nh₂ : 0 ≤ n₁\n⊢ 0 ≤ a\n[PROOFSTEP]\napply nonneg_of_mul_nonneg_left _ d0\n[GOAL]\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\nh₂ : 0 ≤ n₁\n⊢ 0 ≤ a * ↑d₁\n[PROOFSTEP]\nrw [this]\n[GOAL]\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\nh₂ : 0 ≤ n₁\n⊢ 0 ≤ n₁ * b\n[PROOFSTEP]\nexact mul_nonneg h₂ (le_of_lt h)\n[GOAL]\ncase mk'.mpr\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\nh₂ : 0 ≤ a\n⊢ 0 ≤ n₁\n[PROOFSTEP]\napply nonneg_of_mul_nonneg_left _ h\n[GOAL]\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\nh₂ : 0 ≤ a\n⊢ 0 ≤ n₁ * b\n[PROOFSTEP]\nrw [← this]\n[GOAL]\na✝ b✝ c : ℚ\na b : ℤ\nh : 0 < b\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nc₁ : Nat.coprime (Int.natAbs n₁) d₁\nha : a /. b = n₁ /. ↑d₁\nd0 : ↑0 < ↑d₁\nthis : a * ↑d₁ = n₁ * b\nh₂ : 0 ≤ a\n⊢ 0 ≤ a * ↑d₁\n[PROOFSTEP]\nexact mul_nonneg h₂ (Int.ofNat_zero_le _)\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\n⊢ Rat.Nonneg (n₁ /. ↑d₁) → Rat.Nonneg (n₂ /. ↑d₂) → Rat.Nonneg (n₁ /. ↑d₁ + n₂ /. ↑d₂)\n[PROOFSTEP]\nhave d₁0 : 0 < (d₁ : ℤ) := Int.coe_nat_pos.2 (Nat.pos_of_ne_zero h₁)\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\n⊢ Rat.Nonneg (n₁ /. ↑d₁) → Rat.Nonneg (n₂ /. ↑d₂) → Rat.Nonneg (n₁ /. ↑d₁ + n₂ /. ↑d₂)\n[PROOFSTEP]\nhave d₂0 : 0 < (d₂ : ℤ) := Int.coe_nat_pos.2 (Nat.pos_of_ne_zero h₂)\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\n⊢ Rat.Nonneg (n₁ /. ↑d₁) → Rat.Nonneg (n₂ /. ↑d₂) → Rat.Nonneg (n₁ /. ↑d₁ + n₂ /. ↑d₂)\n[PROOFSTEP]\nsimp only [d₁0, d₂0, h₁, h₂, mul_pos, divInt_nonneg, add_def'', Ne.def, Nat.cast_eq_zero, not_false_iff]\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\n⊢ 0 ≤ n₁ → 0 ≤ n₂ → 0 ≤ n₁ * ↑d₂ + n₂ * ↑d₁\n[PROOFSTEP]\nintro n₁0 n₂0\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ n₁ * ↑d₂ + n₂ * ↑d₁\n[PROOFSTEP]\napply add_nonneg\n[GOAL]\ncase ha\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ n₁ * ↑d₂\n[PROOFSTEP]\napply mul_nonneg\n[GOAL]\ncase hb\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ n₂ * ↑d₁\n[PROOFSTEP]\napply mul_nonneg\n[GOAL]\ncase ha.ha\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ n₁\n[PROOFSTEP]\nfirst\n| assumption\n| apply Int.ofNat_zero_le\n[GOAL]\ncase ha.ha\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ n₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase ha.hb\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ ↑d₂\n[PROOFSTEP]\nfirst\n| assumption\n| apply Int.ofNat_zero_le\n[GOAL]\ncase ha.hb\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ ↑d₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase ha.hb\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ ↑d₂\n[PROOFSTEP]\napply Int.ofNat_zero_le\n[GOAL]\ncase hb.ha\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ n₂\n[PROOFSTEP]\nfirst\n| assumption\n| apply Int.ofNat_zero_le\n[GOAL]\ncase hb.ha\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ n₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hb.hb\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ ↑d₁\n[PROOFSTEP]\nfirst\n| assumption\n| apply Int.ofNat_zero_le\n[GOAL]\ncase hb.hb\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ ↑d₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hb.hb\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\nn₁0 : 0 ≤ n₁\nn₂0 : 0 ≤ n₂\n⊢ 0 ≤ ↑d₁\n[PROOFSTEP]\napply Int.ofNat_zero_le\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\n⊢ Rat.Nonneg (n₁ /. ↑d₁) → Rat.Nonneg (n₂ /. ↑d₂) → Rat.Nonneg (n₁ /. ↑d₁ * (n₂ /. ↑d₂))\n[PROOFSTEP]\nhave d₁0 : 0 < (d₁ : ℤ) := Int.coe_nat_pos.2 (Nat.pos_of_ne_zero h₁)\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\n⊢ Rat.Nonneg (n₁ /. ↑d₁) → Rat.Nonneg (n₂ /. ↑d₂) → Rat.Nonneg (n₁ /. ↑d₁ * (n₂ /. ↑d₂))\n[PROOFSTEP]\nhave d₂0 : 0 < (d₂ : ℤ) := Int.coe_nat_pos.2 (Nat.pos_of_ne_zero h₂)\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\n⊢ Rat.Nonneg (n₁ /. ↑d₁) → Rat.Nonneg (n₂ /. ↑d₂) → Rat.Nonneg (n₁ /. ↑d₁ * (n₂ /. ↑d₂))\n[PROOFSTEP]\nrw [mul_def' d₁0.ne.symm d₂0.ne.symm, divInt_nonneg _ d₁0, divInt_nonneg _ d₂0, divInt_nonneg _ (mul_pos d₁0 d₂0)]\n[GOAL]\na✝ b✝ c a b : ℚ\nn₁ : ℤ\nd₁ : ℕ\nh₁ : d₁ ≠ 0\nn₂ : ℤ\nd₂ : ℕ\nh₂ : d₂ ≠ 0\nd₁0 : 0 < ↑d₁\nd₂0 : 0 < ↑d₂\n⊢ 0 ≤ n₁ → 0 ≤ n₂ → 0 ≤ n₁ * n₂\n[PROOFSTEP]\napply mul_nonneg\n[GOAL]\na✝ b c a : ℚ\nn : ℤ\nd : ℕ\nh : d ≠ 0\n⊢ Rat.Nonneg (n /. ↑d) → Rat.Nonneg (-(n /. ↑d)) → n /. ↑d = 0\n[PROOFSTEP]\nhave d0 : 0 < (d : ℤ) := Int.coe_nat_pos.2 (Nat.pos_of_ne_zero h)\n[GOAL]\na✝ b c a : ℚ\nn : ℤ\nd : ℕ\nh : d ≠ 0\nd0 : 0 < ↑d\n⊢ Rat.Nonneg (n /. ↑d) → Rat.Nonneg (-(n /. ↑d)) → n /. ↑d = 0\n[PROOFSTEP]\nrw [divInt_nonneg _ d0, neg_def, divInt_nonneg _ d0, Right.nonneg_neg_iff, divInt_eq_zero d0.ne.symm]\n[GOAL]\na✝ b c a : ℚ\nn : ℤ\nd : ℕ\nh : d ≠ 0\nd0 : 0 < ↑d\n⊢ 0 ≤ n → n ≤ 0 → n = 0\n[PROOFSTEP]\nexact fun h₁ h₂ => le_antisymm h₂ h₁\n[GOAL]\na b c : ℚ\n⊢ Rat.Nonneg a ∨ Rat.Nonneg (-a)\n[PROOFSTEP]\ncases' a with n\n[GOAL]\ncase mk'\nb c : ℚ\nn : ℤ\nden✝ : ℕ\nden_nz✝ : den✝ ≠ 0\nreduced✝ : Nat.coprime (Int.natAbs n) den✝\n⊢ Rat.Nonneg (mk' n den✝) ∨ Rat.Nonneg (-mk' n den✝)\n[PROOFSTEP]\nexact Or.imp_right neg_nonneg_of_nonpos (le_total 0 n)\n[GOAL]\na b c : ℚ\n⊢ Decidable (Rat.Nonneg a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase mk'\nb c : ℚ\nnum✝ : ℤ\nden✝ : ℕ\nden_nz✝ : den✝ ≠ 0\nreduced✝ : Nat.coprime (Int.natAbs num✝) den✝\n⊢ Decidable (Rat.Nonneg (mk' num✝ den✝))\n[PROOFSTEP]\nunfold Rat.Nonneg\n[GOAL]\ncase mk'\nb c : ℚ\nnum✝ : ℤ\nden✝ : ℕ\nden_nz✝ : den✝ ≠ 0\nreduced✝ : Nat.coprime (Int.natAbs num✝) den✝\n⊢ Decidable (0 ≤ (mk' num✝ den✝).num)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na✝ b c : ℚ\nC : ℚ → Sort u\na : ℚ\nH : (n : ℤ) → (d : ℕ) → (nz : d ≠ 0) → (red : Nat.coprime (Int.natAbs n) d) → C (mk' n d)\nn : ℤ\nd : ℕ\nh : 0 < d\nh' : Nat.coprime (Int.natAbs n) d\n⊢ C (n /. ↑d)\n[PROOFSTEP]\nrw [← mk_eq_divInt _ _ h.ne' h']\n[GOAL]\na✝ b c : ℚ\nC : ℚ → Sort u\na : ℚ\nH : (n : ℤ) → (d : ℕ) → (nz : d ≠ 0) → (red : Nat.coprime (Int.natAbs n) d) → C (mk' n d)\nn : ℤ\nd : ℕ\nh : 0 < d\nh' : Nat.coprime (Int.natAbs n) d\n⊢ C (mk' n d)\n[PROOFSTEP]\nexact\n H n d h.ne'\n _\n -- Porting note: TODO can this be shortened?\n[GOAL]\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\n⊢ mk' na da ≤ mk' nb db ↔ Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nchange Rat.blt _ _ = false ↔ _\n[GOAL]\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\n⊢ Rat.blt (mk' nb db) (mk' na da) = false ↔ Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nunfold Rat.blt\n[GOAL]\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\n⊢ (if (decide ((mk' nb db).num < 0) && decide (0 ≤ (mk' na da).num)) = true then true\n else\n if (mk' nb db).num = 0 then decide (0 < (mk' na da).num)\n else\n if (decide (0 < (mk' nb db).num) && decide ((mk' na da).num ≤ 0)) = true then false\n else decide ((mk' nb db).num * ↑(mk' na da).den < (mk' na da).num * ↑(mk' nb db).den)) =\n false ↔\n Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nsimp [-divInt_ofNat, mkRat_eq]\n[GOAL]\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\n⊢ (if nb < 0 ∧ 0 ≤ na then False else if nb = 0 then na ≤ 0 else (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da) ↔\n Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nsplit_ifs with h h'\n[GOAL]\ncase pos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ False ↔ Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nrw [Rat.sub_def]\n[GOAL]\ncase pos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ False ↔\n Rat.Nonneg\n (normalize ((mk' nb db).num * ↑(mk' na da).den - (mk' na da).num * ↑(mk' nb db).den)\n ((mk' nb db).den * (mk' na da).den))\n[PROOFSTEP]\nsimp [Rat.Nonneg]\n[GOAL]\ncase pos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ (normalize (nb * ↑da - na * ↑db) (db * da)).num < 0\n[PROOFSTEP]\nsimp [normalize_eq]\n[GOAL]\ncase pos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ (nb * ↑da - na * ↑db) / ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da)) < 0\n[PROOFSTEP]\napply Int.ediv_neg'\n[GOAL]\ncase pos.Ha\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ nb * ↑da - na * ↑db < 0\n[PROOFSTEP]\nrw [sub_neg]\n[GOAL]\ncase pos.Ha\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ nb * ↑da < na * ↑db\n[PROOFSTEP]\napply lt_of_lt_of_le\n[GOAL]\ncase pos.Ha.a\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ nb * ↑da < ?pos.Ha.b✝\n[PROOFSTEP]\napply mul_neg_of_neg_of_pos h.1\n[GOAL]\ncase pos.Ha.a\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ 0 < ↑da\n[PROOFSTEP]\nrwa [Nat.cast_pos, pos_iff_ne_zero]\n[GOAL]\ncase pos.Ha.a\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ 0 ≤ na * ↑db\n[PROOFSTEP]\napply mul_nonneg h.2 (Nat.cast_nonneg _)\n[GOAL]\ncase pos.Hb\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ 0 < ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da))\n[PROOFSTEP]\nsimp only [Nat.cast_pos]\n[GOAL]\ncase pos.Hb\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ 0 < Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da)\n[PROOFSTEP]\napply Nat.gcd_pos_of_pos_right\n[GOAL]\ncase pos.Hb.npos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ 0 < db * da\n[PROOFSTEP]\napply mul_pos\n[GOAL]\ncase pos.Hb.npos.ha\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ 0 < db\n[PROOFSTEP]\nrwa [pos_iff_ne_zero]\n[GOAL]\ncase pos.Hb.npos.hb\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : nb < 0 ∧ 0 ≤ na\n⊢ 0 < da\n[PROOFSTEP]\nrwa [pos_iff_ne_zero]\n[GOAL]\ncase pos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : nb = 0\n⊢ na ≤ 0 ↔ Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nsimp only [divInt_ofNat, ← zero_iff_num_zero, mkRat_eq_zero hb] at h' \n[GOAL]\ncase pos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : nb = 0\n⊢ na ≤ 0 ↔ Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nsimp [h', Rat.Nonneg]\n[GOAL]\ncase neg\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\n⊢ (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da ↔ Rat.Nonneg (mk' nb db - mk' na da)\n[PROOFSTEP]\nsimp [Rat.Nonneg, Rat.sub_def, normalize_eq]\n[GOAL]\ncase neg\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\n⊢ (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da ↔\n 0 ≤ (nb * ↑da - na * ↑db) / ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da))\n[PROOFSTEP]\nrefine ⟨fun H => ?_, fun H _ => ?_⟩\n[GOAL]\ncase neg.refine_1\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\n⊢ 0 ≤ (nb * ↑da - na * ↑db) / ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da))\n[PROOFSTEP]\nrefine Int.ediv_nonneg ?_ (Nat.cast_nonneg _)\n[GOAL]\ncase neg.refine_1\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\n⊢ 0 ≤ nb * ↑da - na * ↑db\n[PROOFSTEP]\nrw [sub_nonneg]\n[GOAL]\ncase neg.refine_1\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\n⊢ na * ↑db ≤ nb * ↑da\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg.refine_1\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\n⊢ na * ↑db ≤ nb * ↑da\n[PROOFSTEP]\nobtain hb | hb := Ne.lt_or_lt h'\n[GOAL]\ncase neg.refine_1.inl\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb✝ : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\nhb : nb < 0\n⊢ na * ↑db ≤ nb * ↑da\n[PROOFSTEP]\napply H\n[GOAL]\ncase neg.refine_1.inl\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb✝ : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\nhb : nb < 0\n⊢ 0 < nb → 0 < na\n[PROOFSTEP]\nintro H'\n[GOAL]\ncase neg.refine_1.inl\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb✝ : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\nhb : nb < 0\nH' : 0 < nb\n⊢ 0 < na\n[PROOFSTEP]\nexact (hb.trans H').false.elim\n[GOAL]\ncase neg.refine_1.inr\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb✝ : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\nhb : 0 < nb\n⊢ na * ↑db ≤ nb * ↑da\n[PROOFSTEP]\nobtain ha | ha := le_or_lt na 0\n[GOAL]\ncase neg.refine_1.inr.inl\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha✝ : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb✝ : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\nhb : 0 < nb\nha : na ≤ 0\n⊢ na * ↑db ≤ nb * ↑da\n[PROOFSTEP]\napply le_trans <| mul_nonpos_of_nonpos_of_nonneg ha (Nat.cast_nonneg _)\n[GOAL]\ncase neg.refine_1.inr.inl\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha✝ : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb✝ : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\nhb : 0 < nb\nha : na ≤ 0\n⊢ 0 ≤ nb * ↑da\n[PROOFSTEP]\nexact mul_nonneg hb.le (Nat.cast_nonneg _)\n[GOAL]\ncase neg.refine_1.inr.inr\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha✝ : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb✝ : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh' : ¬nb = 0\nH : (0 < nb → 0 < na) → na * ↑db ≤ nb * ↑da\nh : nb < 0 → na < 0\nhb : 0 < nb\nha : 0 < na\n⊢ na * ↑db ≤ nb * ↑da\n[PROOFSTEP]\nexact H (fun _ => ha)\n[GOAL]\ncase neg.refine_2\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nH : 0 ≤ (nb * ↑da - na * ↑db) / ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da))\nx✝ : 0 < nb → 0 < na\n⊢ na * ↑db ≤ nb * ↑da\n[PROOFSTEP]\nrw [← sub_nonneg]\n[GOAL]\ncase neg.refine_2\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nH : 0 ≤ (nb * ↑da - na * ↑db) / ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da))\nx✝ : 0 < nb → 0 < na\n⊢ 0 ≤ nb * ↑da - na * ↑db\n[PROOFSTEP]\ncontrapose! H\n[GOAL]\ncase neg.refine_2\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nx✝ : 0 < nb → 0 < na\nH : nb * ↑da - na * ↑db < 0\n⊢ (nb * ↑da - na * ↑db) / ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da)) < 0\n[PROOFSTEP]\napply Int.ediv_neg' H\n[GOAL]\ncase neg.refine_2\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nx✝ : 0 < nb → 0 < na\nH : nb * ↑da - na * ↑db < 0\n⊢ 0 < ↑(Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da))\n[PROOFSTEP]\nsimp only [Nat.cast_pos]\n[GOAL]\ncase neg.refine_2\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nx✝ : 0 < nb → 0 < na\nH : nb * ↑da - na * ↑db < 0\n⊢ 0 < Nat.gcd (Int.natAbs (nb * ↑da - na * ↑db)) (db * da)\n[PROOFSTEP]\napply Nat.gcd_pos_of_pos_right\n[GOAL]\ncase neg.refine_2.npos\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nx✝ : 0 < nb → 0 < na\nH : nb * ↑da - na * ↑db < 0\n⊢ 0 < db * da\n[PROOFSTEP]\napply mul_pos\n[GOAL]\ncase neg.refine_2.npos.ha\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nx✝ : 0 < nb → 0 < na\nH : nb * ↑da - na * ↑db < 0\n⊢ 0 < db\n[PROOFSTEP]\nrwa [pos_iff_ne_zero]\n[GOAL]\ncase neg.refine_2.npos.hb\na✝ b✝ c a b : ℚ\nna : ℤ\nda : ℕ\nha : da ≠ 0\nhared : Nat.coprime (Int.natAbs na) da\nnb : ℤ\ndb : ℕ\nhb : db ≠ 0\nhbred : Nat.coprime (Int.natAbs nb) db\nh : ¬(nb < 0 ∧ 0 ≤ na)\nh' : ¬nb = 0\nx✝ : 0 < nb → 0 < na\nH : nb * ↑da - na * ↑db < 0\n⊢ 0 < da\n[PROOFSTEP]\nrwa [pos_iff_ne_zero]\n[GOAL]\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb0 : 0 < b\nd0 : 0 < d\n⊢ a /. b ≤ c /. d ↔ a * d ≤ c * b\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg]\n[GOAL]\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb0 : 0 < b\nd0 : 0 < d\n⊢ Rat.Nonneg (c /. d - a /. b) ↔ a * d ≤ c * b\n[PROOFSTEP]\nshow Rat.Nonneg _ ↔ _\n[GOAL]\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb0 : 0 < b\nd0 : 0 < d\n⊢ Rat.Nonneg (c /. d - a /. b) ↔ a * d ≤ c * b\n[PROOFSTEP]\nrw [← sub_nonneg]\n[GOAL]\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb0 : 0 < b\nd0 : 0 < d\n⊢ Rat.Nonneg (c /. d - a /. b) ↔ 0 ≤ c * b - a * d\n[PROOFSTEP]\nsimp [sub_eq_add_neg, ne_of_gt b0, ne_of_gt d0, mul_pos d0 b0]\n[GOAL]\na b c : ℚ\n⊢ a ≤ a\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg]\n[GOAL]\na b c : ℚ\n⊢ Rat.Nonneg (a - a)\n[PROOFSTEP]\nshow Rat.Nonneg (a - a)\n[GOAL]\na b c : ℚ\n⊢ Rat.Nonneg (a - a)\n[PROOFSTEP]\nrw [sub_self]\n[GOAL]\na b c : ℚ\n⊢ Rat.Nonneg 0\n[PROOFSTEP]\nexact le_refl (0 : ℤ)\n[GOAL]\na b c : ℚ\n⊢ a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nhave := Rat.nonneg_total (b - a)\n[GOAL]\na b c : ℚ\nthis : Rat.Nonneg (b - a) ∨ Rat.Nonneg (-(b - a))\n⊢ a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg, Rat.le_iff_Nonneg]\n[GOAL]\na b c : ℚ\nthis : Rat.Nonneg (b - a) ∨ Rat.Nonneg (-(b - a))\n⊢ Rat.Nonneg (b - a) ∨ Rat.Nonneg (a - b)\n[PROOFSTEP]\nrwa [neg_sub] at this \n[GOAL]\na✝ b✝ c a b : ℚ\nhab : a ≤ b\nhba : b ≤ a\n⊢ a = b\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg] at hab hba \n[GOAL]\na✝ b✝ c a b : ℚ\nhab : Rat.Nonneg (b - a)\nhba : Rat.Nonneg (a - b)\n⊢ a = b\n[PROOFSTEP]\nrw [sub_eq_add_neg] at hba \n[GOAL]\na✝ b✝ c a b : ℚ\nhab : Rat.Nonneg (b - a)\nhba : Rat.Nonneg (a + -b)\n⊢ a = b\n[PROOFSTEP]\nrw [← neg_sub, sub_eq_add_neg] at hab \n[GOAL]\na✝ b✝ c a b : ℚ\nhab : Rat.Nonneg (-(a + -b))\nhba : Rat.Nonneg (a + -b)\n⊢ a = b\n[PROOFSTEP]\nhave := eq_neg_of_add_eq_zero_left (Rat.nonneg_antisymm hba hab)\n[GOAL]\na✝ b✝ c a b : ℚ\nhab : Rat.Nonneg (-(a + -b))\nhba : Rat.Nonneg (a + -b)\nthis : a = - -b\n⊢ a = b\n[PROOFSTEP]\nrwa [neg_neg] at this \n[GOAL]\na✝ b✝ c✝ a b c : ℚ\nhab : a ≤ b\nhbc : b ≤ c\n⊢ a ≤ c\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg] at hab hbc \n[GOAL]\na✝ b✝ c✝ a b c : ℚ\nhab : Rat.Nonneg (b - a)\nhbc : Rat.Nonneg (c - b)\n⊢ a ≤ c\n[PROOFSTEP]\nhave : Rat.Nonneg (b - a + (c - b)) := Rat.nonneg_add hab hbc\n[GOAL]\na✝ b✝ c✝ a b c : ℚ\nhab : Rat.Nonneg (b - a)\nhbc : Rat.Nonneg (c - b)\nthis : Rat.Nonneg (b - a + (c - b))\n⊢ a ≤ c\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg, add_left_comm (b + -a) c (-b), add_comm (b + -a) (-b), add_left_comm (-b) b (-a),\n add_comm (-b) (-a), add_neg_cancel_comm_assoc, ← sub_eq_add_neg] at this \n[GOAL]\na✝ b✝ c✝ a b c : ℚ\nhab : Rat.Nonneg (b - a)\nhbc : Rat.Nonneg (c - b)\nthis : Rat.Nonneg (c - a)\n⊢ a ≤ c\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg]\n[GOAL]\na✝ b✝ c✝ a b c : ℚ\nhab : Rat.Nonneg (b - a)\nhbc : Rat.Nonneg (c - b)\nthis : Rat.Nonneg (c - a)\n⊢ Rat.Nonneg (c - a)\n[PROOFSTEP]\nexact this\n[GOAL]\na b c x✝¹ x✝ : ℚ\n⊢ x✝¹ < x✝ ↔ x✝¹ ≤ x✝ ∧ ¬x✝ ≤ x✝¹\n[PROOFSTEP]\nrw [← Rat.not_le, and_iff_right_of_imp (Rat.le_total _ _).resolve_left]\n -- Extra instances to short-circuit type class resolution\n[GOAL]\na b c x✝¹ x✝ : ℚ\n⊢ Decidable ((fun x x_1 => x ≤ x_1) x✝¹ x✝)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ LT ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ DistribLattice ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ Lattice ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ SemilatticeInf ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ SemilatticeSup ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ Inf ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ Sup ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ PartialOrder ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ Preorder ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c p q : ℚ\n⊢ p ≤ q ↔ p.num * ↑q.den ≤ q.num * ↑p.den\n[PROOFSTEP]\nrw [← @num_den q, ← @num_den p]\n[GOAL]\na b c p q : ℚ\n⊢ p.num /. ↑p.den ≤ q.num /. ↑q.den ↔\n (p.num /. ↑p.den).num * ↑(q.num /. ↑q.den).den ≤ (q.num /. ↑q.den).num * ↑(p.num /. ↑p.den).den\n[PROOFSTEP]\nconv_rhs => simp only [num_den]\n[GOAL]\na b c p q : ℚ\n| (p.num /. ↑p.den).num * ↑(q.num /. ↑q.den).den ≤ (q.num /. ↑q.den).num * ↑(p.num /. ↑p.den).den\n[PROOFSTEP]\nsimp only [num_den]\n[GOAL]\na b c p q : ℚ\n| (p.num /. ↑p.den).num * ↑(q.num /. ↑q.den).den ≤ (q.num /. ↑q.den).num * ↑(p.num /. ↑p.den).den\n[PROOFSTEP]\nsimp only [num_den]\n[GOAL]\na b c p q : ℚ\n| (p.num /. ↑p.den).num * ↑(q.num /. ↑q.den).den ≤ (q.num /. ↑q.den).num * ↑(p.num /. ↑p.den).den\n[PROOFSTEP]\nsimp only [num_den]\n[GOAL]\na b c p q : ℚ\n⊢ p.num /. ↑p.den ≤ q.num /. ↑q.den ↔ p.num * ↑q.den ≤ q.num * ↑p.den\n[PROOFSTEP]\nexact Rat.le_def (by exact_mod_cast p.pos) (by exact_mod_cast q.pos)\n[GOAL]\na b c p q : ℚ\n⊢ 0 < ↑p.den\n[PROOFSTEP]\nexact_mod_cast p.pos\n[GOAL]\na b c p q : ℚ\n⊢ 0 < ↑q.den\n[PROOFSTEP]\nexact_mod_cast q.pos\n[GOAL]\na b c p q : ℚ\n⊢ p < q ↔ p.num * ↑q.den < q.num * ↑p.den\n[PROOFSTEP]\nrw [lt_iff_le_and_ne, Rat.le_def']\n[GOAL]\na b c p q : ℚ\n⊢ p.num * ↑q.den ≤ q.num * ↑p.den ∧ p ≠ q ↔ p.num * ↑q.den < q.num * ↑p.den\n[PROOFSTEP]\nsuffices p ≠ q ↔ p.num * q.den ≠ q.num * p.den by\n constructor <;> intro h\n · exact lt_iff_le_and_ne.mpr ⟨h.left, this.mp h.right⟩\n · have tmp := lt_iff_le_and_ne.mp h\n exact ⟨tmp.left, this.mpr tmp.right⟩\n[GOAL]\na b c p q : ℚ\nthis : p ≠ q ↔ p.num * ↑q.den ≠ q.num * ↑p.den\n⊢ p.num * ↑q.den ≤ q.num * ↑p.den ∧ p ≠ q ↔ p.num * ↑q.den < q.num * ↑p.den\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\na b c p q : ℚ\nthis : p ≠ q ↔ p.num * ↑q.den ≠ q.num * ↑p.den\n⊢ p.num * ↑q.den ≤ q.num * ↑p.den ∧ p ≠ q → p.num * ↑q.den < q.num * ↑p.den\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\na b c p q : ℚ\nthis : p ≠ q ↔ p.num * ↑q.den ≠ q.num * ↑p.den\n⊢ p.num * ↑q.den < q.num * ↑p.den → p.num * ↑q.den ≤ q.num * ↑p.den ∧ p ≠ q\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\na b c p q : ℚ\nthis : p ≠ q ↔ p.num * ↑q.den ≠ q.num * ↑p.den\nh : p.num * ↑q.den ≤ q.num * ↑p.den ∧ p ≠ q\n⊢ p.num * ↑q.den < q.num * ↑p.den\n[PROOFSTEP]\nexact lt_iff_le_and_ne.mpr ⟨h.left, this.mp h.right⟩\n[GOAL]\ncase mpr\na b c p q : ℚ\nthis : p ≠ q ↔ p.num * ↑q.den ≠ q.num * ↑p.den\nh : p.num * ↑q.den < q.num * ↑p.den\n⊢ p.num * ↑q.den ≤ q.num * ↑p.den ∧ p ≠ q\n[PROOFSTEP]\nhave tmp := lt_iff_le_and_ne.mp h\n[GOAL]\ncase mpr\na b c p q : ℚ\nthis : p ≠ q ↔ p.num * ↑q.den ≠ q.num * ↑p.den\nh : p.num * ↑q.den < q.num * ↑p.den\ntmp : p.num * ↑q.den ≤ q.num * ↑p.den ∧ p.num * ↑q.den ≠ q.num * ↑p.den\n⊢ p.num * ↑q.den ≤ q.num * ↑p.den ∧ p ≠ q\n[PROOFSTEP]\nexact ⟨tmp.left, this.mpr tmp.right⟩\n[GOAL]\na b c p q : ℚ\n⊢ p ≠ q ↔ p.num * ↑q.den ≠ q.num * ↑p.den\n[PROOFSTEP]\nexact not_iff_not.mpr eq_iff_mul_eq_mul\n[GOAL]\na✝ b c a : ℚ\n⊢ Rat.Nonneg a ↔ 0 ≤ a\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg]\n[GOAL]\na✝ b c a : ℚ\n⊢ Rat.Nonneg a ↔ Rat.Nonneg (a - 0)\n[PROOFSTEP]\nshow Rat.Nonneg a ↔ Rat.Nonneg (a - 0)\n[GOAL]\na✝ b c a : ℚ\n⊢ Rat.Nonneg a ↔ Rat.Nonneg (a - 0)\n[PROOFSTEP]\nsimp\n[GOAL]\na✝ b✝ c✝ a b c : ℚ\n⊢ c + a ≤ c + b ↔ a ≤ b\n[PROOFSTEP]\nrw [Rat.le_iff_Nonneg, add_sub_add_left_eq_sub, Rat.le_iff_Nonneg]\n[GOAL]\na✝ b✝ c a b : ℚ\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ 0 ≤ a * b\n[PROOFSTEP]\nrw [← nonneg_iff_zero_le] at ha hb ⊢\n[GOAL]\na✝ b✝ c a b : ℚ\nha : Rat.Nonneg a\nhb : Rat.Nonneg b\n⊢ Rat.Nonneg (a * b)\n[PROOFSTEP]\nexact Rat.nonneg_mul ha hb\n[GOAL]\na b c : ℚ\nsrc✝² : Field ℚ := field\nsrc✝¹ : LinearOrder ℚ := linearOrder\nsrc✝ : Semiring ℚ := semiring\n⊢ 0 ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\na b c : ℚ\n⊢ LinearOrderedCommRing ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ LinearOrderedRing ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ OrderedRing ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ LinearOrderedSemiring ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ OrderedSemiring ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ LinearOrderedAddCommGroup ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ OrderedAddCommGroup ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ OrderedCancelAddCommMonoid ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b c : ℚ\n⊢ OrderedAddCommMonoid ℚ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na✝ b c a : ℚ\n⊢ a.num ≤ 0 ↔ a ≤ 0\n[PROOFSTEP]\nsimpa [(by cases a; rfl : (-a).num = -a.num)] using @num_nonneg_iff_zero_le (-a)\n[GOAL]\na✝ b c a : ℚ\n⊢ (-a).num = -a.num\n[PROOFSTEP]\ncases a\n[GOAL]\ncase mk'\na b c : ℚ\nnum✝ : ℤ\nden✝ : ℕ\nden_nz✝ : den✝ ≠ 0\nreduced✝ : Nat.coprime (Int.natAbs num✝) den✝\n⊢ (-mk' num✝ den✝).num = -(mk' num✝ den✝).num\n[PROOFSTEP]\nrfl\n[GOAL]\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb_pos : 0 < b\nd_pos : 0 < d\n⊢ ↑a / ↑b < ↑c / ↑d ↔ a * d < c * b\n[PROOFSTEP]\nsimp only [lt_iff_le_not_le]\n[GOAL]\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb_pos : 0 < b\nd_pos : 0 < d\n⊢ ↑a / ↑b ≤ ↑c / ↑d ∧ ¬↑c / ↑d ≤ ↑a / ↑b ↔ a * d ≤ c * b ∧ ¬c * b ≤ a * d\n[PROOFSTEP]\napply and_congr\n[GOAL]\ncase h₁\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb_pos : 0 < b\nd_pos : 0 < d\n⊢ ↑a / ↑b ≤ ↑c / ↑d ↔ a * d ≤ c * b\n[PROOFSTEP]\nsimp [div_num_den, Rat.le_def b_pos d_pos]\n[GOAL]\ncase h₂\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb_pos : 0 < b\nd_pos : 0 < d\n⊢ ¬↑c / ↑d ≤ ↑a / ↑b ↔ ¬c * b ≤ a * d\n[PROOFSTEP]\napply not_congr\n[GOAL]\ncase h₂.h\na✝ b✝ c✝ : ℚ\na b c d : ℤ\nb_pos : 0 < b\nd_pos : 0 < d\n⊢ ↑c / ↑d ≤ ↑a / ↑b ↔ c * b ≤ a * d\n[PROOFSTEP]\nsimp [div_num_den, Rat.le_def d_pos b_pos]\n[GOAL]\na b c q : ℚ\n⊢ q < 1 ↔ q.num < ↑q.den\n[PROOFSTEP]\nsimp [Rat.lt_def]\n[GOAL]\na b c q : ℚ\n⊢ |q| = ↑(Int.natAbs q.num) /. ↑q.den\n[PROOFSTEP]\ncases' le_total q 0 with hq hq\n[GOAL]\ncase inl\na b c q : ℚ\nhq : q ≤ 0\n⊢ |q| = ↑(Int.natAbs q.num) /. ↑q.den\n[PROOFSTEP]\nrw [abs_of_nonpos hq]\n[GOAL]\ncase inl\na b c q : ℚ\nhq : q ≤ 0\n⊢ -q = ↑(Int.natAbs q.num) /. ↑q.den\n[PROOFSTEP]\nrw [← @num_den q, ← divInt_zero_one, Rat.le_def (Int.coe_nat_pos.2 q.pos) zero_lt_one, mul_one, zero_mul] at hq \n[GOAL]\ncase inl\na b c q : ℚ\nhq : q.num ≤ 0\n⊢ -q = ↑(Int.natAbs q.num) /. ↑q.den\n[PROOFSTEP]\nrw [Int.ofNat_natAbs_of_nonpos hq, ← neg_def, num_den]\n[GOAL]\ncase inr\na b c q : ℚ\nhq : 0 ≤ q\n⊢ |q| = ↑(Int.natAbs q.num) /. ↑q.den\n[PROOFSTEP]\nrw [abs_of_nonneg hq]\n[GOAL]\ncase inr\na b c q : ℚ\nhq : 0 ≤ q\n⊢ q = ↑(Int.natAbs q.num) /. ↑q.den\n[PROOFSTEP]\nrw [← @num_den q, ← divInt_zero_one, Rat.le_def zero_lt_one (Int.coe_nat_pos.2 q.pos), mul_one, zero_mul] at hq \n[GOAL]\ncase inr\na b c q : ℚ\nhq : 0 ≤ q.num\n⊢ q = ↑(Int.natAbs q.num) /. ↑q.den\n[PROOFSTEP]\nrw [Int.natAbs_of_nonneg hq, num_den]\n", "meta": {"mathlib_filename": "Mathlib.Data.Rat.Order", "llama_tokens": 20166, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677506936878, "lm_q2_score": 0.7461389817407017, "lm_q1q2_score": 0.6327017940515414}} {"text": "[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ninst✝ : (i : I) → Distrib (f i)\n⊢ ∀ (a b c : (i : I) → f i), a * (b + c) = a * b + a * c\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ninst✝ : (i : I) → Distrib (f i)\na✝ b✝ c✝ : (i : I) → f i\n⊢ a✝ * (b✝ + c✝) = a✝ * b✝ + a✝ * c✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ninst✝ : (i : I) → Distrib (f i)\na✝ b✝ c✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝ * (b✝ + c✝)) x✝ = (a✝ * b✝ + a✝ * c✝) x✝\n[PROOFSTEP]\nexact mul_add _ _ _\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ninst✝ : (i : I) → Distrib (f i)\n⊢ ∀ (a b c : (i : I) → f i), (a + b) * c = a * c + b * c\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ninst✝ : (i : I) → Distrib (f i)\na✝ b✝ c✝ : (i : I) → f i\n⊢ (a✝ + b✝) * c✝ = a✝ * c✝ + b✝ * c✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ninst✝ : (i : I) → Distrib (f i)\na✝ b✝ c✝ : (i : I) → f i\nx✝ : I\n⊢ ((a✝ + b✝) * c✝) x✝ = (a✝ * c✝ + b✝ * c✝) x✝\n[PROOFSTEP]\nexact add_mul _ _ _\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Pi", "llama_tokens": 724, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267762381843, "lm_q2_score": 0.7279754548076478, "lm_q1q2_score": 0.6324845675810546}} {"text": "[GOAL]\nG : Type u_1\ninst✝ : Group G\na b : G\nn m : ℤ\n⊢ a * b ^ n * b ^ m = a * b ^ (n + m)\n[PROOFSTEP]\nrw [mul_assoc, ← zpow_add]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na b : G\nm : ℤ\n⊢ a * b * b ^ m = a * b ^ (m + 1)\n[PROOFSTEP]\nrw [mul_assoc, mul_self_zpow]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na b : G\nn : ℤ\n⊢ a * b ^ n * b = a * b ^ (n + 1)\n[PROOFSTEP]\nrw [mul_assoc, mul_zpow_self]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.Group", "llama_tokens": 215, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8723473614033683, "lm_q2_score": 0.7248702702332475, "lm_q1q2_score": 0.63233866759772}} {"text": "[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ bernoulli' n = 1 - ∑ k in range n, ↑(Nat.choose n k) / (↑n - ↑k + 1) * bernoulli' k\n[PROOFSTEP]\nrw [bernoulli'_def', ← Fin.sum_univ_eq_sum_range]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in range (succ n), ↑(Nat.choose n (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1\n[PROOFSTEP]\nrw [sum_range_succ_comm, bernoulli'_def n, tsub_self, choose_zero_right, sub_self, zero_add, div_one, cast_one, one_mul,\n sub_add, ← sum_sub_distrib, ← sub_eq_zero, sub_sub_cancel_left, neg_eq_zero]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ x in range n,\n (↑(Nat.choose n x) / (↑n - ↑x + 1) * bernoulli' x - ↑(Nat.choose n (n - x)) / (↑n - ↑x + 1) * bernoulli' x) =\n 0\n[PROOFSTEP]\nexact Finset.sum_eq_zero (fun x hx => by rw [choose_symm (le_of_lt (mem_range.1 hx)), sub_self])\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn x : ℕ\nhx : x ∈ range n\n⊢ ↑(Nat.choose n x) / (↑n - ↑x + 1) * bernoulli' x - ↑(Nat.choose n (n - x)) / (↑n - ↑x + 1) * bernoulli' x = 0\n[PROOFSTEP]\nrw [choose_symm (le_of_lt (mem_range.1 hx)), sub_self]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in antidiagonal n, ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli' k.fst = 1\n[PROOFSTEP]\nrefine' ((sum_antidiagonal_eq_sum_range_succ_mk _ n).trans _).trans (bernoulli'_spec n)\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in range (succ n),\n ↑(Nat.choose ((k, n - k).fst + (k, n - k).snd) (k, n - k).snd) / (↑(k, n - k).snd + 1) *\n bernoulli' (k, n - k).fst =\n ∑ k in range (succ n), ↑(Nat.choose n (n - k)) / (↑n - ↑k + 1) * bernoulli' k\n[PROOFSTEP]\nrefine' sum_congr rfl fun x hx => _\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn x : ℕ\nhx : x ∈ range (succ n)\n⊢ ↑(Nat.choose ((x, n - x).fst + (x, n - x).snd) (x, n - x).snd) / (↑(x, n - x).snd + 1) * bernoulli' (x, n - x).fst =\n ↑(Nat.choose n (n - x)) / (↑n - ↑x + 1) * bernoulli' x\n[PROOFSTEP]\nsimp only [add_tsub_cancel_of_le, mem_range_succ_iff.mp hx, cast_sub]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli' 0 = 1\n[PROOFSTEP]\nrw [bernoulli'_def]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ 1 - ∑ k in range 0, ↑(Nat.choose 0 k) / (↑0 - ↑k + 1) * bernoulli' k = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli' 1 = 1 / 2\n[PROOFSTEP]\nrw [bernoulli'_def]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ 1 - ∑ k in range 1, ↑(Nat.choose 1 k) / (↑1 - ↑k + 1) * bernoulli' k = 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli' 2 = 1 / 6\n[PROOFSTEP]\nrw [bernoulli'_def, sum_range_succ, sum_range_succ, sum_range_zero]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ 1 - (0 + ↑(Nat.choose 2 0) / (↑2 - ↑0 + 1) * bernoulli' 0 + ↑(Nat.choose 2 1) / (↑2 - ↑1 + 1) * bernoulli' 1) = 1 / 6\n[PROOFSTEP]\nnorm_num\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli' 3 = 0\n[PROOFSTEP]\nrw [bernoulli'_def, sum_range_succ, sum_range_succ, sum_range_succ, sum_range_zero]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ 1 -\n (0 + ↑(Nat.choose 3 0) / (↑3 - ↑0 + 1) * bernoulli' 0 + ↑(Nat.choose 3 1) / (↑3 - ↑1 + 1) * bernoulli' 1 +\n ↑(Nat.choose 3 2) / (↑3 - ↑2 + 1) * bernoulli' 2) =\n 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli' 4 = -1 / 30\n[PROOFSTEP]\nhave : Nat.choose 4 2 = 6 := by\n decide\n -- shrug\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ Nat.choose 4 2 = 6\n[PROOFSTEP]\ndecide\n -- shrug\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nthis : Nat.choose 4 2 = 6\n⊢ bernoulli' 4 = -1 / 30\n[PROOFSTEP]\nrw [bernoulli'_def, sum_range_succ, sum_range_succ, sum_range_succ, sum_range_succ, sum_range_zero, this]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nthis : Nat.choose 4 2 = 6\n⊢ 1 -\n (0 + ↑(Nat.choose 4 0) / (↑4 - ↑0 + 1) * bernoulli' 0 + ↑(Nat.choose 4 1) / (↑4 - ↑1 + 1) * bernoulli' 1 +\n ↑6 / (↑4 - ↑2 + 1) * bernoulli' 2 +\n ↑(Nat.choose 4 3) / (↑4 - ↑3 + 1) * bernoulli' 3) =\n -1 / 30\n[PROOFSTEP]\nnorm_num\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in range n, ↑(Nat.choose n k) * bernoulli' k = ↑n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ∑ k in range zero, ↑(Nat.choose zero k) * bernoulli' k = ↑zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in range (succ n), ↑(Nat.choose (succ n) k) * bernoulli' k = ↑(succ n)\n[PROOFSTEP]\nsuffices\n ((n + 1 : ℚ) * ∑ k in range n, ↑(n.choose k) / (n - k + 1) * bernoulli' k) =\n ∑ x in range n, ↑(n.succ.choose x) * bernoulli' x\n by\n rw_mod_cast [sum_range_succ, bernoulli'_def, ← this, choose_succ_self_right]\n ring\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nthis :\n (↑n + 1) * ∑ k in range n, ↑(Nat.choose n k) / (↑n - ↑k + 1) * bernoulli' k =\n ∑ x in range n, ↑(Nat.choose (succ n) x) * bernoulli' x\n⊢ ∑ k in range (succ n), ↑(Nat.choose (succ n) k) * bernoulli' k = ↑(succ n)\n[PROOFSTEP]\nrw_mod_cast [sum_range_succ, bernoulli'_def, ← this, choose_succ_self_right]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nthis :\n ↑(n + 1) * ∑ x in range n, Rat.divInt (↑(Nat.choose n x)) (Int.subNatNat n x + 1) * bernoulli' x =\n ∑ x in range n, ↑(Nat.choose (succ n) x) * bernoulli' x\n⊢ ↑(n + 1) * ∑ x in range n, Rat.divInt (↑(Nat.choose n x)) (Int.subNatNat n x + 1) * bernoulli' x +\n ↑(n + 1) * (1 - ∑ x in range n, Rat.divInt (↑(Nat.choose n x)) (Int.subNatNat n x + 1) * bernoulli' x) =\n ↑(succ n)\n[PROOFSTEP]\nring\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ (↑n + 1) * ∑ k in range n, ↑(Nat.choose n k) / (↑n - ↑k + 1) * bernoulli' k =\n ∑ x in range n, ↑(Nat.choose (succ n) x) * bernoulli' x\n[PROOFSTEP]\nsimp_rw [mul_sum, ← mul_assoc]\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ x in range n, (↑n + 1) * (↑(Nat.choose n x) / (↑n - ↑x + 1)) * bernoulli' x =\n ∑ x in range n, ↑(Nat.choose (succ n) x) * bernoulli' x\n[PROOFSTEP]\nrefine' sum_congr rfl fun k hk => _\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn k : ℕ\nhk : k ∈ range n\n⊢ (↑n + 1) * (↑(Nat.choose n k) / (↑n - ↑k + 1)) * bernoulli' k = ↑(Nat.choose (succ n) k) * bernoulli' k\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.e_a\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn k : ℕ\nhk : k ∈ range n\n⊢ (↑n + 1) * (↑(Nat.choose n k) / (↑n - ↑k + 1)) = ↑(Nat.choose (succ n) k)\n[PROOFSTEP]\nhave : ((n - k : ℕ) : ℚ) + 1 ≠ 0 := by norm_cast; exact succ_ne_zero _\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn k : ℕ\nhk : k ∈ range n\n⊢ ↑(n - k) + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn k : ℕ\nhk : k ∈ range n\n⊢ ¬n - k + 1 = 0\n[PROOFSTEP]\nexact succ_ne_zero _\n[GOAL]\ncase succ.e_a\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn k : ℕ\nhk : k ∈ range n\nthis : ↑(n - k) + 1 ≠ 0\n⊢ (↑n + 1) * (↑(Nat.choose n k) / (↑n - ↑k + 1)) = ↑(Nat.choose (succ n) k)\n[PROOFSTEP]\nfield_simp [← cast_sub (mem_range.1 hk).le, mul_comm]\n[GOAL]\ncase succ.e_a\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn k : ℕ\nhk : k ∈ range n\nthis : ↑(n - k) + 1 ≠ 0\n⊢ ↑(Nat.choose n k) * (↑n + 1) = ↑(Nat.choose (succ n) k) * (↑(n - k) + 1)\n[PROOFSTEP]\nrw_mod_cast [tsub_add_eq_add_tsub (mem_range.1 hk).le, choose_mul_succ_eq]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli'PowerSeries A * (exp A - 1) = X * exp A\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(coeff A n) (bernoulli'PowerSeries A * (exp A - 1)) = ↑(coeff A n) (X * exp A)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ↑(coeff A zero) (bernoulli'PowerSeries A * (exp A - 1)) = ↑(coeff A zero) (X * exp A)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(coeff A (succ n)) (bernoulli'PowerSeries A * (exp A - 1)) = ↑(coeff A (succ n)) (X * exp A)\n[PROOFSTEP]\nrw [bernoulli'PowerSeries, coeff_mul, mul_comm X, sum_antidiagonal_succ']\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(coeff A (n + 1, 0).fst) (PowerSeries.mk fun n => ↑(algebraMap ℚ A) (bernoulli' n / ↑n !)) *\n ↑(coeff A (n + 1, 0).snd) (exp A - 1) +\n ∑ p in antidiagonal n,\n ↑(coeff A (p.fst, p.snd + 1).fst) (PowerSeries.mk fun n => ↑(algebraMap ℚ A) (bernoulli' n / ↑n !)) *\n ↑(coeff A (p.fst, p.snd + 1).snd) (exp A - 1) =\n ↑(coeff A (succ n)) (exp A * X)\n[PROOFSTEP]\nsuffices (∑ p in antidiagonal n, bernoulli' p.1 / p.1! * ((p.2 + 1) * p.2! : ℚ)⁻¹) = (n ! : ℚ)⁻¹ by\n simpa [map_sum] using congr_arg (algebraMap ℚ A) this\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nthis : ∑ p in antidiagonal n, bernoulli' p.fst / ↑p.fst ! * ((↑p.snd + 1) * ↑p.snd !)⁻¹ = (↑n !)⁻¹\n⊢ ↑(coeff A (n + 1, 0).fst) (PowerSeries.mk fun n => ↑(algebraMap ℚ A) (bernoulli' n / ↑n !)) *\n ↑(coeff A (n + 1, 0).snd) (exp A - 1) +\n ∑ p in antidiagonal n,\n ↑(coeff A (p.fst, p.snd + 1).fst) (PowerSeries.mk fun n => ↑(algebraMap ℚ A) (bernoulli' n / ↑n !)) *\n ↑(coeff A (p.fst, p.snd + 1).snd) (exp A - 1) =\n ↑(coeff A (succ n)) (exp A * X)\n[PROOFSTEP]\nsimpa [map_sum] using congr_arg (algebraMap ℚ A) this\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ p in antidiagonal n, bernoulli' p.fst / ↑p.fst ! * ((↑p.snd + 1) * ↑p.snd !)⁻¹ = (↑n !)⁻¹\n[PROOFSTEP]\napply eq_inv_of_mul_eq_one_left\n[GOAL]\ncase h.succ.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ (∑ p in antidiagonal n, bernoulli' p.fst / ↑p.fst ! * ((↑p.snd + 1) * ↑p.snd !)⁻¹) * ↑n ! = 1\n[PROOFSTEP]\nrw [sum_mul]\n[GOAL]\ncase h.succ.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ x in antidiagonal n, bernoulli' x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑x.snd !)⁻¹ * ↑n ! = 1\n[PROOFSTEP]\nconvert bernoulli'_spec' n using 1\n[GOAL]\ncase h.e'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ x in antidiagonal n, bernoulli' x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑x.snd !)⁻¹ * ↑n ! =\n ∑ k in antidiagonal n, ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli' k.fst\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∀ (x : ℕ × ℕ),\n x ∈ antidiagonal n →\n bernoulli' x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑x.snd !)⁻¹ * ↑n ! =\n ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst\n[PROOFSTEP]\nsimp_rw [mem_antidiagonal]\n[GOAL]\ncase h.e'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∀ (x : ℕ × ℕ),\n x.fst + x.snd = n →\n bernoulli' x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑x.snd !)⁻¹ * ↑n ! =\n ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst\n[PROOFSTEP]\nrintro ⟨i, j⟩ rfl\n[GOAL]\ncase h.e'_2.mk\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\ni j : ℕ\n⊢ bernoulli' (i, j).fst / ↑(i, j).fst ! * ((↑(i, j).snd + 1) * ↑(i, j).snd !)⁻¹ * ↑((i, j).fst + (i, j).snd)! =\n ↑(Nat.choose ((i, j).fst + (i, j).snd) (i, j).snd) / (↑(i, j).snd + 1) * bernoulli' (i, j).fst\n[PROOFSTEP]\nhave := factorial_mul_factorial_dvd_factorial_add i j\n[GOAL]\ncase h.e'_2.mk\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\ni j : ℕ\nthis : i ! * j ! ∣ (i + j)!\n⊢ bernoulli' (i, j).fst / ↑(i, j).fst ! * ((↑(i, j).snd + 1) * ↑(i, j).snd !)⁻¹ * ↑((i, j).fst + (i, j).snd)! =\n ↑(Nat.choose ((i, j).fst + (i, j).snd) (i, j).snd) / (↑(i, j).snd + 1) * bernoulli' (i, j).fst\n[PROOFSTEP]\nfield_simp [mul_comm _ (bernoulli' i), mul_assoc, add_choose]\n[GOAL]\ncase h.e'_2.mk\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\ni j : ℕ\nthis : i ! * j ! ∣ (i + j)!\n⊢ bernoulli' i * ↑(i + j)! / (↑i ! * ((↑j + 1) * ↑j !)) = bernoulli' i * ↑(i + j)! / (↑i ! * (↑j ! * (↑j + 1)))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_2.mk\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\ni j : ℕ\nthis : i ! * j ! ∣ (i + j)!\n⊢ bernoulli' i * ↑(i + j)! / ↑(i ! * ((j + 1) * j !)) = bernoulli' i * ↑(i + j)! / ↑(i ! * (j ! * (j + 1)))\n[PROOFSTEP]\nrw [mul_comm (j + 1), mul_div_assoc, ← mul_assoc]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\n⊢ bernoulli' n = 0\n[PROOFSTEP]\nlet B := mk fun n => bernoulli' n / (n ! : ℚ)\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\n⊢ bernoulli' n = 0\n[PROOFSTEP]\nsuffices (B - evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\n by\n cases' mul_eq_mul_right_iff.mp this with h h <;> simp only [PowerSeries.ext_iff, evalNegHom, coeff_X] at h \n · apply eq_zero_of_neg_eq\n specialize h n\n split_ifs at h <;> simp_all [h_odd.neg_one_pow, factorial_ne_zero]\n · simpa using h 1\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\n⊢ bernoulli' n = 0\n[PROOFSTEP]\ncases' mul_eq_mul_right_iff.mp this with h h\n[GOAL]\ncase inl\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh : B - ↑evalNegHom B = X\n⊢ bernoulli' n = 0\n[PROOFSTEP]\nsimp only [PowerSeries.ext_iff, evalNegHom, coeff_X] at h \n[GOAL]\ncase inr\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh : exp ℚ - 1 = 0\n⊢ bernoulli' n = 0\n[PROOFSTEP]\nsimp only [PowerSeries.ext_iff, evalNegHom, coeff_X] at h \n[GOAL]\ncase inl\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh :\n ∀ (n : ℕ),\n ↑(coeff ℚ n)\n ((PowerSeries.mk fun n => bernoulli' n / ↑n !) -\n ↑(rescale (-1)) (PowerSeries.mk fun n => bernoulli' n / ↑n !)) =\n if n = 1 then 1 else 0\n⊢ bernoulli' n = 0\n[PROOFSTEP]\napply eq_zero_of_neg_eq\n[GOAL]\ncase inl.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh :\n ∀ (n : ℕ),\n ↑(coeff ℚ n)\n ((PowerSeries.mk fun n => bernoulli' n / ↑n !) -\n ↑(rescale (-1)) (PowerSeries.mk fun n => bernoulli' n / ↑n !)) =\n if n = 1 then 1 else 0\n⊢ -bernoulli' n = bernoulli' n\n[PROOFSTEP]\nspecialize h n\n[GOAL]\ncase inl.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh :\n ↑(coeff ℚ n)\n ((PowerSeries.mk fun n => bernoulli' n / ↑n !) - ↑(rescale (-1)) (PowerSeries.mk fun n => bernoulli' n / ↑n !)) =\n if n = 1 then 1 else 0\n⊢ -bernoulli' n = bernoulli' n\n[PROOFSTEP]\nsplit_ifs at h \n[GOAL]\ncase pos\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh✝ : n = 1\nh :\n ↑(coeff ℚ n)\n ((PowerSeries.mk fun n => bernoulli' n / ↑n !) - ↑(rescale (-1)) (PowerSeries.mk fun n => bernoulli' n / ↑n !)) =\n 1\n⊢ -bernoulli' n = bernoulli' n\n[PROOFSTEP]\nsimp_all [h_odd.neg_one_pow, factorial_ne_zero]\n[GOAL]\ncase neg\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh✝ : ¬n = 1\nh :\n ↑(coeff ℚ n)\n ((PowerSeries.mk fun n => bernoulli' n / ↑n !) - ↑(rescale (-1)) (PowerSeries.mk fun n => bernoulli' n / ↑n !)) =\n 0\n⊢ -bernoulli' n = bernoulli' n\n[PROOFSTEP]\nsimp_all [h_odd.neg_one_pow, factorial_ne_zero]\n[GOAL]\ncase inr\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nthis : (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\nh : ∀ (n : ℕ), ↑(coeff ℚ n) (exp ℚ - 1) = ↑(coeff ℚ n) 0\n⊢ bernoulli' n = 0\n[PROOFSTEP]\nsimpa using h 1\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\n⊢ (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\n[PROOFSTEP]\nhave h : B * (exp ℚ - 1) = X * exp ℚ := by simpa [bernoulli'PowerSeries] using bernoulli'PowerSeries_mul_exp_sub_one ℚ\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\n⊢ B * (exp ℚ - 1) = X * exp ℚ\n[PROOFSTEP]\nsimpa [bernoulli'PowerSeries] using bernoulli'PowerSeries_mul_exp_sub_one ℚ\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nh : B * (exp ℚ - 1) = X * exp ℚ\n⊢ (B - ↑evalNegHom B) * (exp ℚ - 1) = X * (exp ℚ - 1)\n[PROOFSTEP]\nrw [sub_mul, h, mul_sub X, sub_right_inj, ← neg_sub, mul_neg, neg_eq_iff_eq_neg]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nh : B * (exp ℚ - 1) = X * exp ℚ\n⊢ ↑evalNegHom B * (1 - exp ℚ) = -(X * 1)\n[PROOFSTEP]\nsuffices evalNegHom (B * (exp ℚ - 1)) * exp ℚ = evalNegHom (X * exp ℚ) * exp ℚ\n by\n rw [map_mul, map_mul] at this \n simpa [mul_assoc, sub_mul, mul_comm (evalNegHom (exp ℚ)), exp_mul_exp_neg_eq_one]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nh : B * (exp ℚ - 1) = X * exp ℚ\nthis : ↑evalNegHom (B * (exp ℚ - 1)) * exp ℚ = ↑evalNegHom (X * exp ℚ) * exp ℚ\n⊢ ↑evalNegHom B * (1 - exp ℚ) = -(X * 1)\n[PROOFSTEP]\nrw [map_mul, map_mul] at this \n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nh : B * (exp ℚ - 1) = X * exp ℚ\nthis : ↑evalNegHom B * ↑evalNegHom (exp ℚ - 1) * exp ℚ = ↑evalNegHom X * ↑evalNegHom (exp ℚ) * exp ℚ\n⊢ ↑evalNegHom B * (1 - exp ℚ) = -(X * 1)\n[PROOFSTEP]\nsimpa [mul_assoc, sub_mul, mul_comm (evalNegHom (exp ℚ)), exp_mul_exp_neg_eq_one]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh_odd : Odd n\nhlt : 1 < n\nB : PowerSeries ℚ := PowerSeries.mk fun n => bernoulli' n / ↑n !\nh : B * (exp ℚ - 1) = X * exp ℚ\n⊢ ↑evalNegHom (B * (exp ℚ - 1)) * exp ℚ = ↑evalNegHom (X * exp ℚ) * exp ℚ\n[PROOFSTEP]\ncongr\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ bernoulli' n = (-1) ^ n * bernoulli n\n[PROOFSTEP]\nsimp [bernoulli, ← mul_assoc, ← sq, ← pow_mul, mul_comm n 2, pow_mul]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli 0 = 1\n[PROOFSTEP]\nsimp [bernoulli]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli 1 = -1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulli 1 = -(1 / 2)\n[PROOFSTEP]\nsimp [bernoulli]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhn : n ≠ 1\n⊢ bernoulli n = bernoulli' n\n[PROOFSTEP]\nby_cases h0 : n = 0\n[GOAL]\ncase pos\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhn : n ≠ 1\nh0 : n = 0\n⊢ bernoulli n = bernoulli' n\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase neg\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhn : n ≠ 1\nh0 : ¬n = 0\n⊢ bernoulli n = bernoulli' n\n[PROOFSTEP]\nrw [bernoulli, neg_one_pow_eq_pow_mod_two]\n[GOAL]\ncase neg\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhn : n ≠ 1\nh0 : ¬n = 0\n⊢ (-1) ^ (n % 2) * bernoulli' n = bernoulli' n\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h h\n[GOAL]\ncase neg.inl\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhn : n ≠ 1\nh0 : ¬n = 0\nh : n % 2 = 0\n⊢ (-1) ^ (n % 2) * bernoulli' n = bernoulli' n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg.inr\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhn : n ≠ 1\nh0 : ¬n = 0\nh : n % 2 = 1\n⊢ (-1) ^ (n % 2) * bernoulli' n = bernoulli' n\n[PROOFSTEP]\nsimp [bernoulli'_odd_eq_zero (odd_iff.mpr h) (one_lt_iff_ne_zero_and_ne_one.mpr ⟨h0, hn⟩)]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in range n, ↑(Nat.choose n k) * bernoulli k = if n = 1 then 1 else 0\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ∑ k in range zero, ↑(Nat.choose zero k) * bernoulli k = if zero = 1 then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in range (succ n), ↑(Nat.choose (succ n) k) * bernoulli k = if succ n = 1 then 1 else 0\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase succ.zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ∑ k in range (succ zero), ↑(Nat.choose (succ zero) k) * bernoulli k = if succ zero = 1 then 1 else 0\n[PROOFSTEP]\nrw [sum_range_one]\n[GOAL]\ncase succ.zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ↑(Nat.choose (succ zero) 0) * bernoulli 0 = if succ zero = 1 then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli k = if succ (succ n) = 1 then 1 else 0\n[PROOFSTEP]\nsuffices (∑ i in range n, ↑((n + 2).choose (i + 2)) * bernoulli (i + 2)) = n / 2\n by\n simp only [this, sum_range_succ', cast_succ, bernoulli_one, bernoulli_zero, choose_one_right, mul_one,\n choose_zero_right, cast_zero, if_false, zero_add, succ_succ_ne_one]\n ring\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nthis : ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2\n⊢ ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli k = if succ (succ n) = 1 then 1 else 0\n[PROOFSTEP]\nsimp only [this, sum_range_succ', cast_succ, bernoulli_one, bernoulli_zero, choose_one_right, mul_one,\n choose_zero_right, cast_zero, if_false, zero_add, succ_succ_ne_one]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nthis : ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2\n⊢ ↑n / 2 + (↑n + 1 + 1) * (-1 / 2) + 1 = 0\n[PROOFSTEP]\nring\n[GOAL]\ncase succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2\n[PROOFSTEP]\nhave f := sum_bernoulli' n.succ.succ\n[GOAL]\ncase succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nf : ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli' k = ↑(succ (succ n))\n⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2\n[PROOFSTEP]\nsimp_rw [sum_range_succ', cast_succ, ← eq_sub_iff_add_eq] at f \n[GOAL]\ncase succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nf :\n ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =\n ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -\n ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)\n⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2\n[PROOFSTEP]\nrefine' Eq.trans _ (Eq.trans f _)\n[GOAL]\ncase succ.succ.refine'_1\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nf :\n ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =\n ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -\n ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)\n⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) =\n ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.succ.refine'_1.e_f\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nf :\n ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =\n ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -\n ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)\n⊢ (fun i => ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2)) = fun k =>\n ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1)\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase succ.succ.refine'_1.e_f.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nf :\n ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =\n ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -\n ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)\nx : ℕ\n⊢ ↑(Nat.choose (n + 2) (x + 2)) * bernoulli (x + 2) = ↑(Nat.choose (succ (succ n)) (x + 1 + 1)) * bernoulli' (x + 1 + 1)\n[PROOFSTEP]\nrw [bernoulli_eq_bernoulli'_of_ne_one (succ_ne_zero x ∘ succ.inj)]\n[GOAL]\ncase succ.succ.refine'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nf :\n ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =\n ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -\n ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)\n⊢ ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -\n ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1) =\n ↑n / 2\n[PROOFSTEP]\nsimp only [one_div, mul_one, bernoulli'_zero, cast_one, choose_zero_right, add_sub_cancel, zero_add, choose_one_right,\n cast_succ, cast_add, cast_one, bernoulli'_one, one_div]\n[GOAL]\ncase succ.succ.refine'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nf :\n ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =\n ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -\n ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)\n⊢ ↑n + 1 + 1 - (↑0 + 1) - (↑n + 1 + 1) * 2⁻¹ = ↑n / 2\n[PROOFSTEP]\nring\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in antidiagonal n, ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst = if n = 0 then 1 else 0\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ∑ k in antidiagonal zero, ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst =\n if zero = 0 then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in antidiagonal (succ n), ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst =\n if succ n = 0 then 1 else 0\n[PROOFSTEP]\nrw [if_neg (succ_ne_zero _)]\n -- algebra facts\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in antidiagonal (succ n), ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst = 0\n[PROOFSTEP]\nhave h₁ : (1, n) ∈ antidiagonal n.succ := by simp [mem_antidiagonal, add_comm]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ (1, n) ∈ antidiagonal (succ n)\n[PROOFSTEP]\nsimp [mem_antidiagonal, add_comm]\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\n⊢ ∑ k in antidiagonal (succ n), ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst = 0\n[PROOFSTEP]\nhave h₂ : (n : ℚ) + 1 ≠ 0 := by norm_cast; exact succ_ne_zero _\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\n⊢ ↑n + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\n⊢ ¬n + 1 = 0\n[PROOFSTEP]\nexact succ_ne_zero _\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\n⊢ ∑ k in antidiagonal (succ n), ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst = 0\n[PROOFSTEP]\nhave h₃ : (1 + n).choose n = n + 1 := by\n simp [add_comm]\n -- key equation: the corresponding fact for `bernoulli'`\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\n⊢ Nat.choose (1 + n) n = n + 1\n[PROOFSTEP]\nsimp [add_comm]\n -- key equation: the corresponding fact for `bernoulli'`\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\n⊢ ∑ k in antidiagonal (succ n), ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst = 0\n[PROOFSTEP]\nhave H := bernoulli'_spec' n.succ\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH : ∑ k in antidiagonal (succ n), ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli' k.fst = 1\n⊢ ∑ k in antidiagonal (succ n), ↑(Nat.choose (k.fst + k.snd) k.snd) / (↑k.snd + 1) * bernoulli k.fst = 0\n[PROOFSTEP]\nrw [sum_eq_add_sum_diff_singleton h₁] at H ⊢\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\n⊢ ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli x.fst =\n 0\n[PROOFSTEP]\napply add_eq_of_eq_sub'\n[GOAL]\ncase succ.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\n⊢ ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli x.fst =\n 0 - ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli (1, n).fst\n[PROOFSTEP]\nconvert eq_sub_of_add_eq' H using 1\n[GOAL]\ncase h.e'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\n⊢ ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli x.fst =\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst\n[PROOFSTEP]\nrefine' sum_congr rfl fun p h => _\n[GOAL]\ncase h.e'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\np : ℕ × ℕ\nh : p ∈ antidiagonal (succ n) \\ {(1, n)}\n⊢ ↑(Nat.choose (p.fst + p.snd) p.snd) / (↑p.snd + 1) * bernoulli p.fst =\n ↑(Nat.choose (p.fst + p.snd) p.snd) / (↑p.snd + 1) * bernoulli' p.fst\n[PROOFSTEP]\nobtain ⟨h', h''⟩ : p ∈ _ ∧ p ≠ _ := by rwa [mem_sdiff, mem_singleton] at h \n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\np : ℕ × ℕ\nh : p ∈ antidiagonal (succ n) \\ {(1, n)}\n⊢ p ∈ ?m.773103 ∧ p ≠ ?m.773150\n[PROOFSTEP]\nrwa [mem_sdiff, mem_singleton] at h \n[GOAL]\ncase h.e'_2.intro\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\np : ℕ × ℕ\nh : p ∈ antidiagonal (succ n) \\ {(1, n)}\nh' : p ∈ antidiagonal (succ n)\nh'' : p ≠ (1, n)\n⊢ ↑(Nat.choose (p.fst + p.snd) p.snd) / (↑p.snd + 1) * bernoulli p.fst =\n ↑(Nat.choose (p.fst + p.snd) p.snd) / (↑p.snd + 1) * bernoulli' p.fst\n[PROOFSTEP]\nsimp [bernoulli_eq_bernoulli'_of_ne_one ((not_congr (antidiagonal_congr h' h₁)).mp h'')]\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\n⊢ 0 - ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli (1, n).fst =\n 1 - ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst\n[PROOFSTEP]\nfield_simp [h₃]\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nh₁ : (1, n) ∈ antidiagonal (succ n)\nh₂ : ↑n + 1 ≠ 0\nh₃ : Nat.choose (1 + n) n = n + 1\nH :\n ↑(Nat.choose ((1, n).fst + (1, n).snd) (1, n).snd) / (↑(1, n).snd + 1) * bernoulli' (1, n).fst +\n ∑ x in antidiagonal (succ n) \\ {(1, n)}, ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli' x.fst =\n 1\n⊢ 1 = 2 - 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ bernoulliPowerSeries A * (exp A - 1) = X\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(coeff A n) (bernoulliPowerSeries A * (exp A - 1)) = ↑(coeff A n) X\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase h.zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ↑(coeff A zero) (bernoulliPowerSeries A * (exp A - 1)) = ↑(coeff A zero) X\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(coeff A (succ n)) (bernoulliPowerSeries A * (exp A - 1)) = ↑(coeff A (succ n)) X\n[PROOFSTEP]\nsimp only [bernoulliPowerSeries, coeff_mul, coeff_X, sum_antidiagonal_succ', one_div, coeff_mk, coeff_one, coeff_exp,\n LinearMap.map_sub, factorial, if_pos, cast_succ, cast_one, cast_mul, sub_zero, RingHom.map_one, add_eq_zero_iff,\n if_false, _root_.inv_one, zero_add, one_ne_zero, mul_zero, and_false_iff, sub_self, ← RingHom.map_mul, ← map_sum]\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(algebraMap ℚ A) (bernoulli (n + 1) / ((↑n + 1) * ↑(Nat.add n 0)!)) * (↑(algebraMap ℚ A) (↑0 + 1)⁻¹ - 1) +\n ↑(algebraMap ℚ A) (∑ x in antidiagonal n, bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(Nat.add x.snd 0)!)⁻¹) =\n if succ n = 1 then 1 else 0\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.succ.zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\n⊢ ↑(algebraMap ℚ A) (bernoulli (zero + 1) / ((↑zero + 1) * ↑(Nat.add zero 0)!)) * (↑(algebraMap ℚ A) (↑0 + 1)⁻¹ - 1) +\n ↑(algebraMap ℚ A)\n (∑ x in antidiagonal zero, bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(Nat.add x.snd 0)!)⁻¹) =\n if succ zero = 1 then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(algebraMap ℚ A) (bernoulli (succ n + 1) / ((↑(succ n) + 1) * ↑(Nat.add (succ n) 0)!)) *\n (↑(algebraMap ℚ A) (↑0 + 1)⁻¹ - 1) +\n ↑(algebraMap ℚ A)\n (∑ x in antidiagonal (succ n), bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(Nat.add x.snd 0)!)⁻¹) =\n if succ (succ n) = 1 then 1 else 0\n[PROOFSTEP]\nrw [if_neg n.succ_succ_ne_one]\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ↑(algebraMap ℚ A) (bernoulli (succ n + 1) / ((↑(succ n) + 1) * ↑(Nat.add (succ n) 0)!)) *\n (↑(algebraMap ℚ A) (↑0 + 1)⁻¹ - 1) +\n ↑(algebraMap ℚ A)\n (∑ x in antidiagonal (succ n), bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(Nat.add x.snd 0)!)⁻¹) =\n 0\n[PROOFSTEP]\nhave hfact : ∀ m, (m ! : ℚ) ≠ 0 := fun m => by exact_mod_cast factorial_ne_zero m\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn m : ℕ\n⊢ ↑m ! ≠ 0\n[PROOFSTEP]\nexact_mod_cast factorial_ne_zero m\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\n⊢ ↑(algebraMap ℚ A) (bernoulli (succ n + 1) / ((↑(succ n) + 1) * ↑(Nat.add (succ n) 0)!)) *\n (↑(algebraMap ℚ A) (↑0 + 1)⁻¹ - 1) +\n ↑(algebraMap ℚ A)\n (∑ x in antidiagonal (succ n), bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(Nat.add x.snd 0)!)⁻¹) =\n 0\n[PROOFSTEP]\nhave hite2 : ite (n.succ = 0) 1 0 = (0 : ℚ) := if_neg n.succ_ne_zero\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\n⊢ ↑(algebraMap ℚ A) (bernoulli (succ n + 1) / ((↑(succ n) + 1) * ↑(Nat.add (succ n) 0)!)) *\n (↑(algebraMap ℚ A) (↑0 + 1)⁻¹ - 1) +\n ↑(algebraMap ℚ A)\n (∑ x in antidiagonal (succ n), bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(Nat.add x.snd 0)!)⁻¹) =\n 0\n[PROOFSTEP]\nsimp only [CharP.cast_eq_zero, zero_add, inv_one, map_one, sub_self, mul_zero, add_eq]\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\n⊢ ↑(algebraMap ℚ A) (∑ x in antidiagonal (succ n), bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(x.snd + 0)!)⁻¹) = 0\n[PROOFSTEP]\nrw [← map_zero (algebraMap ℚ A), ← zero_div (n.succ ! : ℚ), ← hite2, ← bernoulli_spec', sum_div]\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\n⊢ ↑(algebraMap ℚ A) (∑ x in antidiagonal (succ n), bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(x.snd + 0)!)⁻¹) =\n ↑(algebraMap ℚ A)\n (∑ x in antidiagonal (succ n), ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli x.fst / ↑(succ n)!)\n[PROOFSTEP]\nrefine' congr_arg (algebraMap ℚ A) (sum_congr rfl fun x h => eq_div_of_mul_eq (hfact n.succ) _)\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x ∈ antidiagonal (succ n)\n⊢ bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(x.snd + 0)!)⁻¹ * ↑(succ n)! =\n ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli x.fst\n[PROOFSTEP]\nrw [mem_antidiagonal] at h \n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x.fst + x.snd = succ n\n⊢ bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(x.snd + 0)!)⁻¹ * ↑(succ n)! =\n ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli x.fst\n[PROOFSTEP]\nhave hj : (x.2 + 1 : ℚ) ≠ 0 := by norm_cast; exact succ_ne_zero _\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x.fst + x.snd = succ n\n⊢ ↑x.snd + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x.fst + x.snd = succ n\n⊢ ¬x.snd + 1 = 0\n[PROOFSTEP]\nexact succ_ne_zero _\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x.fst + x.snd = succ n\nhj : ↑x.snd + 1 ≠ 0\n⊢ bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(x.snd + 0)!)⁻¹ * ↑(succ n)! =\n ↑(Nat.choose (x.fst + x.snd) x.snd) / (↑x.snd + 1) * bernoulli x.fst\n[PROOFSTEP]\nrw [← h, add_choose, cast_div_charZero (factorial_mul_factorial_dvd_factorial_add _ _)]\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x.fst + x.snd = succ n\nhj : ↑x.snd + 1 ≠ 0\n⊢ bernoulli x.fst / ↑x.fst ! * ((↑x.snd + 1) * ↑(x.snd + 0)!)⁻¹ * ↑(x.fst + x.snd)! =\n ↑(x.fst + x.snd)! / ↑(x.fst ! * x.snd !) / (↑x.snd + 1) * bernoulli x.fst\n[PROOFSTEP]\nfield_simp [mul_ne_zero hj (hfact x.2), hfact x.1, mul_comm _ (bernoulli x.1), mul_assoc, Nat.factorial_ne_zero, hj]\n -- porting note: was `cc`, which was not yet ported\n[GOAL]\ncase h.succ.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x.fst + x.snd = succ n\nhj : ↑x.snd + 1 ≠ 0\n⊢ ↑x.snd ! * (↑x.snd + 1) = (↑x.snd + 1) * ↑x.snd ! ∨ bernoulli x.fst = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase h.succ.succ.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\nhfact : ∀ (m : ℕ), ↑m ! ≠ 0\nhite2 : (if succ n = 0 then 1 else 0) = 0\nx : ℕ × ℕ\nh : x.fst + x.snd = succ n\nhj : ↑x.snd + 1 ≠ 0\n⊢ ↑x.snd ! * (↑x.snd + 1) = (↑x.snd + 1) * ↑x.snd !\n[PROOFSTEP]\nring\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\n⊢ ∑ k in range n, ↑k ^ p = ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / (↑p + 1)\n[PROOFSTEP]\nhave hne : ∀ m : ℕ, (m ! : ℚ) ≠ 0 := fun m => by exact_mod_cast factorial_ne_zero m\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p m : ℕ\n⊢ ↑m ! ≠ 0\n[PROOFSTEP]\nexact_mod_cast factorial_ne_zero m\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\n⊢ ∑ k in range n, ↑k ^ p = ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / (↑p + 1)\n[PROOFSTEP]\nhave h_cauchy :\n ((mk fun p => bernoulli p / p !) * mk fun q => coeff ℚ (q + 1) (exp ℚ ^ n)) =\n mk fun p => ∑ i in range (p + 1), bernoulli i * (p + 1).choose i * (n : ℚ) ^ (p + 1 - i) / (p + 1)! :=\n by\n ext q : 1\n let f a b :=\n bernoulli a / a ! *\n coeff ℚ (b + 1)\n (exp ℚ ^ n)\n -- key step: use `PowerSeries.coeff_mul` and then rewrite sums\n simp only [coeff_mul, coeff_mk, cast_mul, sum_antidiagonal_eq_sum_range_succ f]\n apply sum_congr rfl\n intros m h\n simp only [exp_pow_eq_rescale_exp, rescale, one_div, coeff_mk, RingHom.coe_mk, coeff_exp, RingHom.id_apply, cast_mul,\n algebraMap_rat_rat]\n -- manipulate factorials and binomial coefficients\n simp at h \n rw [choose_eq_factorial_div_factorial h.le, eq_comm, div_eq_iff (hne q.succ), succ_eq_add_one,\n mul_assoc _ _ (q.succ ! : ℚ), mul_comm _ (q.succ ! : ℚ), ← mul_assoc, div_mul_eq_mul_div]\n simp only [add_eq, add_zero, ge_iff_le, IsUnit.mul_iff, Nat.isUnit_iff, succ.injEq, cast_mul, cast_succ,\n MonoidHom.coe_mk, OneHom.coe_mk, coeff_exp, Algebra.id.map_eq_id, one_div, map_inv₀, map_natCast, coeff_mk,\n mul_inv_rev]\n rw [mul_comm ((n : ℚ) ^ (q - m + 1)), ← mul_assoc _ _ ((n : ℚ) ^ (q - m + 1)), ← one_div, mul_one_div, div_div,\n tsub_add_eq_add_tsub (le_of_lt_succ h), cast_div, cast_mul]\n · ring\n · exact factorial_mul_factorial_dvd_factorial h.le\n ·\n simp [hne, factorial_ne_zero]\n -- same as our goal except we pull out `p!` for convenience\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\n⊢ ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n[PROOFSTEP]\next q : 1\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\n⊢ ↑(coeff ℚ q) ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n ↑(coeff ℚ q)\n (PowerSeries.mk fun p =>\n ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!)\n[PROOFSTEP]\nlet f a b :=\n bernoulli a / a ! *\n coeff ℚ (b + 1)\n (exp ℚ ^ n)\n -- key step: use `PowerSeries.coeff_mul` and then rewrite sums\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\n⊢ ↑(coeff ℚ q) ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n ↑(coeff ℚ q)\n (PowerSeries.mk fun p =>\n ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!)\n[PROOFSTEP]\nsimp only [coeff_mul, coeff_mk, cast_mul, sum_antidiagonal_eq_sum_range_succ f]\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\n⊢ ∑ x in range (succ q), bernoulli x / ↑x ! * ↑(coeff ℚ (q - x + 1)) (exp ℚ ^ n) =\n ∑ i in range (q + 1), bernoulli i * ↑(Nat.choose (q + 1) i) * ↑n ^ (q + 1 - i) / ↑(q + 1)!\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\n⊢ ∀ (x : ℕ),\n x ∈ range (succ q) →\n bernoulli x / ↑x ! * ↑(coeff ℚ (q - x + 1)) (exp ℚ ^ n) =\n bernoulli x * ↑(Nat.choose (q + 1) x) * ↑n ^ (q + 1 - x) / ↑(q + 1)!\n[PROOFSTEP]\nintros m h\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m ∈ range (succ q)\n⊢ bernoulli m / ↑m ! * ↑(coeff ℚ (q - m + 1)) (exp ℚ ^ n) =\n bernoulli m * ↑(Nat.choose (q + 1) m) * ↑n ^ (q + 1 - m) / ↑(q + 1)!\n[PROOFSTEP]\nsimp only [exp_pow_eq_rescale_exp, rescale, one_div, coeff_mk, RingHom.coe_mk, coeff_exp, RingHom.id_apply, cast_mul,\n algebraMap_rat_rat]\n -- manipulate factorials and binomial coefficients\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m ∈ range (succ q)\n⊢ bernoulli m / ↑m ! *\n ↑(coeff ℚ (q - m + 1))\n (↑{\n toOneHom :=\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) },\n map_mul' :=\n (_ :\n ∀ (f g : PowerSeries ℚ),\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n (f * g) =\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n f *\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n g) }\n (exp ℚ)) =\n bernoulli m * ↑(Nat.choose (q + 1) m) * ↑n ^ (q + 1 - m) / ↑(q + 1)!\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m < succ q\n⊢ bernoulli m / ↑m ! *\n ↑(coeff ℚ (q - m + 1))\n (↑{\n toOneHom :=\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) },\n map_mul' :=\n (_ :\n ∀ (f g : PowerSeries ℚ),\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n (f * g) =\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n f *\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n g) }\n (exp ℚ)) =\n bernoulli m * ↑(Nat.choose (q + 1) m) * ↑n ^ (q + 1 - m) / ↑(q + 1)!\n[PROOFSTEP]\nrw [choose_eq_factorial_div_factorial h.le, eq_comm, div_eq_iff (hne q.succ), succ_eq_add_one,\n mul_assoc _ _ (q.succ ! : ℚ), mul_comm _ (q.succ ! : ℚ), ← mul_assoc, div_mul_eq_mul_div]\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m < succ q\n⊢ bernoulli m * ↑((q + 1)! / (m ! * (q + 1 - m)!)) * ↑n ^ (q + 1 - m) =\n bernoulli m * ↑(succ q)! / ↑m ! *\n ↑(coeff ℚ (q - m + 1))\n (↑{\n toOneHom :=\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) },\n map_mul' :=\n (_ :\n ∀ (f g : PowerSeries ℚ),\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n (f * g) =\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n f *\n OneHom.toFun\n { toFun := fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f,\n map_one' := (_ : (fun f => PowerSeries.mk fun n_1 => ↑n ^ n_1 * ↑(coeff ℚ n_1) f) 1 = 1) }\n g) }\n (exp ℚ))\n[PROOFSTEP]\nsimp only [add_eq, add_zero, ge_iff_le, IsUnit.mul_iff, Nat.isUnit_iff, succ.injEq, cast_mul, cast_succ,\n MonoidHom.coe_mk, OneHom.coe_mk, coeff_exp, Algebra.id.map_eq_id, one_div, map_inv₀, map_natCast, coeff_mk,\n mul_inv_rev]\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m < succ q\n⊢ bernoulli m * ↑((q + 1)! / (m ! * (q + 1 - m)!)) * ↑n ^ (q + 1 - m) =\n bernoulli m * ↑(succ q)! / ↑m ! * (↑n ^ (q - m + 1) * (↑(q - m + 1)!)⁻¹)\n[PROOFSTEP]\nrw [mul_comm ((n : ℚ) ^ (q - m + 1)), ← mul_assoc _ _ ((n : ℚ) ^ (q - m + 1)), ← one_div, mul_one_div, div_div,\n tsub_add_eq_add_tsub (le_of_lt_succ h), cast_div, cast_mul]\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m < succ q\n⊢ bernoulli m * (↑(q + 1)! / (↑m ! * ↑(q + 1 - m)!)) * ↑n ^ (q + 1 - m) =\n bernoulli m * ↑(succ q)! / (↑m ! * ↑(q + 1 - m)!) * ↑n ^ (q + 1 - m)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.n_dvd\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m < succ q\n⊢ m ! * (q + 1 - m)! ∣ (q + 1)!\n[PROOFSTEP]\nexact factorial_mul_factorial_dvd_factorial h.le\n[GOAL]\ncase h.n_nonzero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nq : ℕ\nf : ℕ → ℕ → ℚ := fun a b => bernoulli a / ↑a ! * ↑(coeff ℚ (b + 1)) (exp ℚ ^ n)\nm : ℕ\nh : m < succ q\n⊢ ↑(m ! * (q + 1 - m)!) ≠ 0\n[PROOFSTEP]\nsimp [hne, factorial_ne_zero]\n -- same as our goal except we pull out `p!` for convenience\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ ∑ k in range n, ↑k ^ p = ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / (↑p + 1)\n[PROOFSTEP]\nhave hps :\n (∑ k in range n, (k : ℚ) ^ p) =\n (∑ i in range (p + 1), bernoulli i * (p + 1).choose i * (n : ℚ) ^ (p + 1 - i) / (p + 1)!) * p ! :=\n by\n suffices\n (mk fun p => ∑ k in range n, (k : ℚ) ^ p * algebraMap ℚ ℚ p !⁻¹) =\n mk fun p => ∑ i in range (p + 1), bernoulli i * (p + 1).choose i * (n : ℚ) ^ (p + 1 - i) / (p + 1)!\n by\n rw [← div_eq_iff (hne p), div_eq_mul_inv, sum_mul]\n rw [PowerSeries.ext_iff] at this \n simpa using this p\n have hexp : exp ℚ - 1 ≠ 0 := by\n simp only [exp, PowerSeries.ext_iff, Ne, not_forall]\n use 1\n simp\n have h_r : exp ℚ ^ n - 1 = X * mk fun p => coeff ℚ (p + 1) (exp ℚ ^ n) :=\n by\n have h_const : C ℚ (constantCoeff ℚ (exp ℚ ^ n)) = 1 := by simp\n rw [← h_const, sub_const_eq_X_mul_shift]\n -- key step: a chain of equalities of power series\n -- porting note: altered proof slightly\n rw [← mul_right_inj' hexp, mul_comm]\n simp only [← cast_pow]\n rw [← exp_pow_sum, geom_sum_mul, h_r, ← bernoulliPowerSeries_mul_exp_sub_one, bernoulliPowerSeries, mul_right_comm]\n simp only [mul_comm, mul_eq_mul_left_iff, hexp, or_false]\n refine' Eq.trans (mul_eq_mul_right_iff.mpr _) (Eq.trans h_cauchy _)\n · left\n congr\n ·\n simp only [mul_comm, factorial, cast_succ, cast_pow]\n -- massage `hps` into our goal\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ ∑ k in range n, ↑k ^ p =\n (∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!) * ↑p !\n[PROOFSTEP]\nsuffices\n (mk fun p => ∑ k in range n, (k : ℚ) ^ p * algebraMap ℚ ℚ p !⁻¹) =\n mk fun p => ∑ i in range (p + 1), bernoulli i * (p + 1).choose i * (n : ℚ) ^ (p + 1 - i) / (p + 1)!\n by\n rw [← div_eq_iff (hne p), div_eq_mul_inv, sum_mul]\n rw [PowerSeries.ext_iff] at this \n simpa using this p\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nthis :\n (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ ∑ k in range n, ↑k ^ p =\n (∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!) * ↑p !\n[PROOFSTEP]\nrw [← div_eq_iff (hne p), div_eq_mul_inv, sum_mul]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nthis :\n (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ ∑ x in range n, ↑x ^ p * (↑p !)⁻¹ =\n ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n[PROOFSTEP]\nrw [PowerSeries.ext_iff] at this \n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nthis✝ :\n (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nthis :\n ∀ (n_1 : ℕ),\n ↑(coeff ℚ n_1) (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) =\n ↑(coeff ℚ n_1)\n (PowerSeries.mk fun p =>\n ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!)\n⊢ ∑ x in range n, ↑x ^ p * (↑p !)⁻¹ =\n ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n[PROOFSTEP]\nsimpa using this p\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n[PROOFSTEP]\nhave hexp : exp ℚ - 1 ≠ 0 := by\n simp only [exp, PowerSeries.ext_iff, Ne, not_forall]\n use 1\n simp\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ exp ℚ - 1 ≠ 0\n[PROOFSTEP]\nsimp only [exp, PowerSeries.ext_iff, Ne, not_forall]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ ∃ x, ¬↑(coeff ℚ x) ((PowerSeries.mk fun n => ↑(algebraMap ℚ ℚ) (1 / ↑n !)) - 1) = ↑(coeff ℚ x) 0\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n⊢ ¬↑(coeff ℚ 1) ((PowerSeries.mk fun n => ↑(algebraMap ℚ ℚ) (1 / ↑n !)) - 1) = ↑(coeff ℚ 1) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\n⊢ (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n[PROOFSTEP]\nhave h_r : exp ℚ ^ n - 1 = X * mk fun p => coeff ℚ (p + 1) (exp ℚ ^ n) :=\n by\n have h_const : C ℚ (constantCoeff ℚ (exp ℚ ^ n)) = 1 := by simp\n rw [← h_const, sub_const_eq_X_mul_shift]\n -- key step: a chain of equalities of power series\n -- porting note: altered proof slightly\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\n⊢ exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n[PROOFSTEP]\nhave h_const : C ℚ (constantCoeff ℚ (exp ℚ ^ n)) = 1 := by simp\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\n⊢ ↑(C ℚ) (↑(constantCoeff ℚ) (exp ℚ ^ n)) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_const : ↑(C ℚ) (↑(constantCoeff ℚ) (exp ℚ ^ n)) = 1\n⊢ exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n[PROOFSTEP]\nrw [← h_const, sub_const_eq_X_mul_shift]\n -- key step: a chain of equalities of power series\n -- porting note: altered proof slightly\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n[PROOFSTEP]\nrw [← mul_right_inj' hexp, mul_comm]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ (PowerSeries.mk fun p => ∑ k in range n, ↑k ^ p * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) * (exp ℚ - 1) =\n (exp ℚ - 1) *\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\n[PROOFSTEP]\nsimp only [← cast_pow]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ (PowerSeries.mk fun p => ∑ x in range n, ↑(x ^ p) * ↑(algebraMap ℚ ℚ) (↑p !)⁻¹) * (exp ℚ - 1) =\n (exp ℚ - 1) *\n PowerSeries.mk fun p =>\n ∑ x in range (p + 1), bernoulli x * ↑(Nat.choose (p + 1) x) * ↑(n ^ (p + 1 - x)) / ↑(p + 1)!\n[PROOFSTEP]\nrw [← exp_pow_sum, geom_sum_mul, h_r, ← bernoulliPowerSeries_mul_exp_sub_one, bernoulliPowerSeries, mul_right_comm]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ ((PowerSeries.mk fun n_1 => ↑(algebraMap ℚ ((fun x => ℚ) (exp ℚ ^ n))) (bernoulli n_1 / ↑n_1 !)) *\n PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)) *\n (exp ((fun x => ℚ) (exp ℚ ^ n)) - 1) =\n (exp ℚ - 1) *\n PowerSeries.mk fun p =>\n ∑ x in range (p + 1), bernoulli x * ↑(Nat.choose (p + 1) x) * ↑(n ^ (p + 1 - x)) / ↑(p + 1)!\n[PROOFSTEP]\nsimp only [mul_comm, mul_eq_mul_left_iff, hexp, or_false]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ ((PowerSeries.mk fun n_1 => ↑(algebraMap ℚ ℚ) (bernoulli n_1 / ↑n_1 !)) *\n PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p =>\n ∑ x in range (p + 1), ↑(n ^ (p + 1 - x)) * (bernoulli x * ↑(Nat.choose (p + 1) x)) / ↑(p + 1)!\n[PROOFSTEP]\nrefine' Eq.trans (mul_eq_mul_right_iff.mpr _) (Eq.trans h_cauchy _)\n[GOAL]\ncase refine'_1\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ ((PowerSeries.mk fun n_1 => ↑(algebraMap ℚ ℚ) (bernoulli n_1 / ↑n_1 !)) =\n PowerSeries.mk fun p => bernoulli p / ↑p !) ∨\n (PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)) = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase refine'_1.h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ (PowerSeries.mk fun n_1 => ↑(algebraMap ℚ ℚ) (bernoulli n_1 / ↑n_1 !)) = PowerSeries.mk fun p => bernoulli p / ↑p !\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_2\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhexp : exp ℚ - 1 ≠ 0\nh_r : exp ℚ ^ n - 1 = X * PowerSeries.mk fun p => ↑(coeff ℚ (p + 1)) (exp ℚ ^ n)\n⊢ (PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!) =\n PowerSeries.mk fun p =>\n ∑ x in range (p + 1), ↑(n ^ (p + 1 - x)) * (bernoulli x * ↑(Nat.choose (p + 1) x)) / ↑(p + 1)!\n[PROOFSTEP]\nsimp only [mul_comm, factorial, cast_succ, cast_pow]\n -- massage `hps` into our goal\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhps :\n ∑ k in range n, ↑k ^ p =\n (∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!) * ↑p !\n⊢ ∑ k in range n, ↑k ^ p = ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / (↑p + 1)\n[PROOFSTEP]\nrw [hps, sum_mul]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhps :\n ∑ k in range n, ↑k ^ p =\n (∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!) * ↑p !\n⊢ ∑ x in range (p + 1), bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) / ↑(p + 1)! * ↑p ! =\n ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / (↑p + 1)\n[PROOFSTEP]\nrefine' sum_congr rfl fun x _ => _\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhps :\n ∑ k in range n, ↑k ^ p =\n (∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!) * ↑p !\nx : ℕ\nx✝ : x ∈ range (p + 1)\n⊢ bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) / ↑(p + 1)! * ↑p ! =\n bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) / (↑p + 1)\n[PROOFSTEP]\nfield_simp [mul_right_comm _ ↑p !, ← mul_assoc _ _ ↑p !, cast_add_one_ne_zero, hne]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nhne : ∀ (m : ℕ), ↑m ! ≠ 0\nh_cauchy :\n ((PowerSeries.mk fun p => bernoulli p / ↑p !) * PowerSeries.mk fun q => ↑(coeff ℚ (q + 1)) (exp ℚ ^ n)) =\n PowerSeries.mk fun p => ∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!\nhps :\n ∑ k in range n, ↑k ^ p =\n (∑ i in range (p + 1), bernoulli i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(p + 1)!) * ↑p !\nx : ℕ\nx✝ : x ∈ range (p + 1)\n⊢ bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) * ↑p ! * (↑p + 1) =\n bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) * ((↑p + 1) * ↑p !)\n[PROOFSTEP]\nring\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\n⊢ ∑ k in Ico 1 (n + 1), ↑k ^ p =\n ∑ i in range (p + 1), bernoulli' i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / (↑p + 1)\n[PROOFSTEP]\nrw [← Nat.cast_succ]\n -- dispose of the trivial case\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\n⊢ ∑ k in Ico 1 (n + 1), ↑k ^ p =\n ∑ i in range (p + 1), bernoulli' i * ↑(Nat.choose (p + 1) i) * ↑n ^ (p + 1 - i) / ↑(succ p)\n[PROOFSTEP]\ncases' p with p p\n[GOAL]\ncase zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn : ℕ\n⊢ ∑ k in Ico 1 (n + 1), ↑k ^ zero =\n ∑ i in range (zero + 1), bernoulli' i * ↑(Nat.choose (zero + 1) i) * ↑n ^ (zero + 1 - i) / ↑(succ zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\n⊢ ∑ k in Ico 1 (n + 1), ↑k ^ succ p =\n ∑ i in range (succ p + 1), bernoulli' i * ↑(Nat.choose (succ p + 1) i) * ↑n ^ (succ p + 1 - i) / ↑(succ (succ p))\n[PROOFSTEP]\nlet f i := bernoulli i * p.succ.succ.choose i * (n : ℚ) ^ (p.succ.succ - i) / p.succ.succ\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\n⊢ ∑ k in Ico 1 (n + 1), ↑k ^ succ p =\n ∑ i in range (succ p + 1), bernoulli' i * ↑(Nat.choose (succ p + 1) i) * ↑n ^ (succ p + 1 - i) / ↑(succ (succ p))\n[PROOFSTEP]\nlet f' i := bernoulli' i * p.succ.succ.choose i * (n : ℚ) ^ (p.succ.succ - i) / p.succ.succ\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\n⊢ ∑ k in Ico 1 (n + 1), ↑k ^ succ p =\n ∑ i in range (succ p + 1), bernoulli' i * ↑(Nat.choose (succ p + 1) i) * ↑n ^ (succ p + 1 - i) / ↑(succ (succ p))\n[PROOFSTEP]\nsuffices (∑ k in Ico 1 n.succ, (k : ℚ) ^ p.succ) = ∑ i in range p.succ.succ, f' i by convert this\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nthis : ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ i in range (succ (succ p)), f' i\n⊢ ∑ k in Ico 1 (n + 1), ↑k ^ succ p =\n ∑ i in range (succ p + 1), bernoulli' i * ↑(Nat.choose (succ p + 1) i) * ↑n ^ (succ p + 1 - i) / ↑(succ (succ p))\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\n⊢ ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ i in range (succ (succ p)), f' i\n[PROOFSTEP]\nhave hle := Nat.le_add_left 1 n\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\n⊢ ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ i in range (succ (succ p)), f' i\n[PROOFSTEP]\nhave hne : (p + 1 + 1 : ℚ) ≠ 0 := by norm_cast; exact succ_ne_zero p.succ\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\n⊢ ↑p + 1 + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\n⊢ ¬p + 1 + 1 = 0\n[PROOFSTEP]\nexact succ_ne_zero p.succ\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\n⊢ ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ i in range (succ (succ p)), f' i\n[PROOFSTEP]\nhave h1 : ∀ r : ℚ, r * (p + 1 + 1) * (n : ℚ) ^ p.succ / (p + 1 + 1 : ℚ) = r * (n : ℚ) ^ p.succ := fun r => by\n rw [mul_div_right_comm, mul_div_cancel _ hne]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nr : ℚ\n⊢ r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\n[PROOFSTEP]\nrw [mul_div_right_comm, mul_div_cancel _ hne]\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\n⊢ ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ i in range (succ (succ p)), f' i\n[PROOFSTEP]\nhave h2 : f 1 + (n : ℚ) ^ p.succ = 1 / 2 * (n : ℚ) ^ p.succ :=\n by\n simp_rw [bernoulli_one, choose_one_right, succ_sub_succ_eq_sub, cast_succ, tsub_zero, h1]\n ring\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\n⊢ f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\n[PROOFSTEP]\nsimp_rw [bernoulli_one, choose_one_right, succ_sub_succ_eq_sub, cast_succ, tsub_zero, h1]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\n⊢ -1 / 2 * ↑n ^ succ p + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\n[PROOFSTEP]\nring\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\n⊢ ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ i in range (succ (succ p)), f' i\n[PROOFSTEP]\nhave :\n (∑ i in range p, bernoulli (i + 2) * (p + 2).choose (i + 2) * (n : ℚ) ^ (p - i) / ↑(p + 2)) =\n ∑ i in range p, bernoulli' (i + 2) * (p + 2).choose (i + 2) * (n : ℚ) ^ (p - i) / ↑(p + 2) :=\n sum_congr rfl fun i _ => by rw [bernoulli_eq_bernoulli'_of_ne_one (succ_succ_ne_one i)]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\ni : ℕ\nx✝ : i ∈ range p\n⊢ bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n[PROOFSTEP]\nrw [bernoulli_eq_bernoulli'_of_ne_one (succ_succ_ne_one i)]\n[GOAL]\ncase succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ i in range (succ (succ p)), f' i\n[PROOFSTEP]\ncalc\n (\n -- replace sum over `Ico` with sum over `range` and simplify∑ k in Ico 1 n.succ, (k : ℚ) ^ p.succ) =\n ∑ k in range n.succ, (k : ℚ) ^ p.succ :=\n by\n simp [sum_Ico_eq_sub _ hle, succ_ne_zero]\n -- extract the last term of the sum\n _ = (∑ k in range n, (k : ℚ) ^ p.succ) + (n : ℚ) ^ p.succ := by\n rw [sum_range_succ]\n -- apply the key lemma, `sum_range_pow`\n _ = (∑ i in range p.succ.succ, f i) + (n : ℚ) ^ p.succ := by\n simp [sum_range_pow]\n -- extract the first two terms of the sum\n _ = (∑ i in range p, f i.succ.succ) + f 1 + f 0 + (n : ℚ) ^ p.succ := by simp_rw [sum_range_succ']\n _ = (∑ i in range p, f i.succ.succ) + (f 1 + (n : ℚ) ^ p.succ) + f 0 := by ring\n _ = (∑ i in range p, f i.succ.succ) + 1 / 2 * (n : ℚ) ^ p.succ + f 0 := by\n rw [h2]\n -- convert from `bernoulli` to `bernoulli'`\n _ = (∑ i in range p, f' i.succ.succ) + f' 1 + f' 0 := by\n simpa [h1, fun i => show i + 2 = i + 1 + 1 from rfl]\n -- rejoin the first two terms of the sum\n _ = ∑ i in range p.succ.succ, f' i := by simp_rw [sum_range_succ']\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ k in Ico 1 (succ n), ↑k ^ succ p = ∑ k in range (succ n), ↑k ^ succ p\n[PROOFSTEP]\nsimp [sum_Ico_eq_sub _ hle, succ_ne_zero]\n -- extract the last term of the sum\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ k in range (succ n), ↑k ^ succ p = ∑ k in range n, ↑k ^ succ p + ↑n ^ succ p\n[PROOFSTEP]\nrw [sum_range_succ]\n -- apply the key lemma, `sum_range_pow`\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ k in range n, ↑k ^ succ p + ↑n ^ succ p = ∑ i in range (succ (succ p)), f i + ↑n ^ succ p\n[PROOFSTEP]\nsimp [sum_range_pow]\n -- extract the first two terms of the sum\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ i in range (succ (succ p)), f i + ↑n ^ succ p = ∑ i in range p, f (succ (succ i)) + f 1 + f 0 + ↑n ^ succ p\n[PROOFSTEP]\nsimp_rw [sum_range_succ']\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ i in range p, f (succ (succ i)) + f 1 + f 0 + ↑n ^ succ p =\n ∑ i in range p, f (succ (succ i)) + (f 1 + ↑n ^ succ p) + f 0\n[PROOFSTEP]\nring\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ i in range p, f (succ (succ i)) + (f 1 + ↑n ^ succ p) + f 0 =\n ∑ i in range p, f (succ (succ i)) + 1 / 2 * ↑n ^ succ p + f 0\n[PROOFSTEP]\nrw [h2]\n -- convert from `bernoulli` to `bernoulli'`\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ i in range p, f (succ (succ i)) + 1 / 2 * ↑n ^ succ p + f 0 = ∑ i in range p, f' (succ (succ i)) + f' 1 + f' 0\n[PROOFSTEP]\nsimpa [h1, fun i => show i + 2 = i + 1 + 1 from rfl]\n -- rejoin the first two terms of the sum\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nn p : ℕ\nf : ℕ → ℚ := fun i => bernoulli i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nf' : ℕ → ℚ := fun i => bernoulli' i * ↑(Nat.choose (succ (succ p)) i) * ↑n ^ (succ (succ p) - i) / ↑(succ (succ p))\nhle : 1 ≤ n + 1\nhne : ↑p + 1 + 1 ≠ 0\nh1 : ∀ (r : ℚ), r * (↑p + 1 + 1) * ↑n ^ succ p / (↑p + 1 + 1) = r * ↑n ^ succ p\nh2 : f 1 + ↑n ^ succ p = 1 / 2 * ↑n ^ succ p\nthis :\n ∑ i in range p, bernoulli (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2) =\n ∑ i in range p, bernoulli' (i + 2) * ↑(Nat.choose (p + 2) (i + 2)) * ↑n ^ (p - i) / ↑(p + 2)\n⊢ ∑ i in range p, f' (succ (succ i)) + f' 1 + f' 0 = ∑ i in range (succ (succ p)), f' i\n[PROOFSTEP]\nsimp_rw [sum_range_succ']\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Bernoulli", "llama_tokens": 47664, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8757869884059267, "lm_q2_score": 0.721743200312399, "lm_q1q2_score": 0.6320933038040515}} {"text": "[GOAL]\nα : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\ns : Set M\n⊢ span R (-s) = -span R s\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\ns : Set M\n⊢ span R (-s) ≤ -span R s\n[PROOFSTEP]\nrw [span_le, coe_set_neg, ← Set.neg_subset, neg_neg]\n[GOAL]\ncase a\nα : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\ns : Set M\n⊢ s ⊆ ↑(span R s)\n[PROOFSTEP]\nexact subset_span\n[GOAL]\ncase a\nα : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\ns : Set M\n⊢ -span R s ≤ span R (-s)\n[PROOFSTEP]\nrw [neg_le, span_le, coe_set_neg, ← Set.neg_subset]\n[GOAL]\ncase a\nα : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\ns : Set M\n⊢ -s ⊆ ↑(span R (-s))\n[PROOFSTEP]\nexact subset_span\n[GOAL]\nα✝ : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : Monoid α✝\ninst✝⁶ : DistribMulAction α✝ M\ninst✝⁵ : SMulCommClass α✝ R M\nα : Type u_4\ninst✝⁴ : Semiring α\ninst✝³ : Module α R\ninst✝² : Module α M\ninst✝¹ : SMulCommClass α R M\ninst✝ : IsScalarTower α R M\na : α\nS : Submodule R M\n⊢ a • S ≤ S\n[PROOFSTEP]\nrintro y ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : Monoid α✝\ninst✝⁶ : DistribMulAction α✝ M\ninst✝⁵ : SMulCommClass α✝ R M\nα : Type u_4\ninst✝⁴ : Semiring α\ninst✝³ : Module α R\ninst✝² : Module α M\ninst✝¹ : SMulCommClass α R M\ninst✝ : IsScalarTower α R M\na : α\nS : Submodule R M\nx : M\nhx : x ∈ ↑S\n⊢ ↑(DistribMulAction.toLinearMap R M a) x ∈ S\n[PROOFSTEP]\nexact smul_of_tower_mem _ a hx\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.Submodule.Pointwise", "llama_tokens": 953, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711832583695, "lm_q2_score": 0.743167997235783, "lm_q1q2_score": 0.6316713819702512}} {"text": "[GOAL]\nn : ℤ\n⊢ sqrt (n * n) = ↑(natAbs n)\n[PROOFSTEP]\nrw [sqrt, ← natAbs_mul_self, toNat_coe_nat, Nat.sqrt_eq]\n[GOAL]\nx : ℤ\nx✝ : ∃ n, n * n = x\nn : ℤ\nhn : n * n = x\n⊢ sqrt x * sqrt x = x\n[PROOFSTEP]\nrw [← hn, sqrt_eq, ← Int.ofNat_mul, natAbs_mul_self]\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Sqrt", "llama_tokens": 151, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9111797124237604, "lm_q2_score": 0.6926419704455589, "lm_q1q2_score": 0.631121311443211}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Finite α\ninst✝¹ : Nonempty α\ninst✝ : LinearOrder β\nf : α → β\n⊢ ∃ x₀, ∀ (x : α), f x ≤ f x₀\n[PROOFSTEP]\ncases nonempty_fintype α\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Finite α\ninst✝¹ : Nonempty α\ninst✝ : LinearOrder β\nf : α → β\nval✝ : Fintype α\n⊢ ∃ x₀, ∀ (x : α), f x ≤ f x₀\n[PROOFSTEP]\nsimpa using exists_max_image univ f univ_nonempty\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Finite α\ninst✝¹ : Nonempty α\ninst✝ : LinearOrder β\nf : α → β\n⊢ ∃ x₀, ∀ (x : α), f x₀ ≤ f x\n[PROOFSTEP]\ncases nonempty_fintype α\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Finite α\ninst✝¹ : Nonempty α\ninst✝ : LinearOrder β\nf : α → β\nval✝ : Fintype α\n⊢ ∃ x₀, ∀ (x : α), f x₀ ≤ f x\n[PROOFSTEP]\nsimpa using exists_min_image univ f univ_nonempty\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Lattice", "llama_tokens": 414, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8705972784807408, "lm_q2_score": 0.72487026428967, "lm_q1q2_score": 0.631070079342202}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x + a) ⁻¹' Icc b c = Icc (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x + a) ⁻¹' Ico b c = Ico (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x + a) ⁻¹' Ioc b c = Ioc (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x + a) ⁻¹' Ioo b c = Ioo (b - a) (c - a)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ -Icc a b = Icc (-b) (-a)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ -Ico a b = Ioc (-b) (-a)\n[PROOFSTEP]\nsimp [← Ici_inter_Iio, ← Ioi_inter_Iic, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ -Ioc a b = Ico (-b) (-a)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic, ← Ici_inter_Iio, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ -Ioo a b = Ioo (-b) (-a)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Ici b = Ici (b + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Ioi b = Ioi (b + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Iic b = Iic (b + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Iio b = Iio (b + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Icc b c = Icc (b + a) (c + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Ico b c = Ico (b + a) (c + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Ioc b c = Ioc (b + a) (c + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) ⁻¹' Ioo b c = Ioo (b + a) (c + a)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) ⁻¹' Icc b c = Icc (a - c) (a - b)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) ⁻¹' Ico b c = Ioc (a - c) (a - b)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic, ← Ici_inter_Iio, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) ⁻¹' Ioc b c = Ico (a - c) (a - b)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic, ← Ici_inter_Iio, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) ⁻¹' Ioo b c = Ioo (a - c) (a - b)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a + x) '' Iic b = Iic (a + b)\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a + x) '' Iio b = Iio (a + b)\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x + a) '' Iic b = Iic (b + a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x + a) '' Iio b = Iio (b + a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Ici a = Iic (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Iic a = Ici (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Ioi a = Iio (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Iio a = Ioi (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Icc a b = Icc (-b) (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Ico a b = Ioc (-b) (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Ioc a b = Ico (-b) (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ Neg.neg '' Ioo a b = Ioo (-b) (-a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Ici b = Iic (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ici b = Iic (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ici b = Iic (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Iic b = Ici (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Iic b = Ici (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Iic b = Ici (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Ioi b = Iio (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ioi b = Iio (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ioi b = Iio (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Iio b = Ioi (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Iio b = Ioi (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Iio b = Ioi (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Icc b c = Icc (a - c) (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Icc b c = Icc (a - c) (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Icc b c = Icc (a - c) (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Ico b c = Ioc (a - c) (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ico b c = Ioc (a - c) (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ico b c = Ioc (a - c) (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Ioc b c = Ico (a - c) (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ioc b c = Ico (a - c) (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ioc b c = Ico (a - c) (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => a - x) '' Ioo b c = Ioo (a - c) (a - b)\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ioo b c = Ioo (a - c) (a - b)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' Ioo b c = Ioo (a - c) (a - b)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Ici b = Ici (b - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Iic b = Iic (b - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Ioi b = Ioi (b - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Iio b = Iio (b - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Icc b c = Icc (b - a) (c - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Ico b c = Ico (b - a) (c - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Ioc b c = Ioc (b - a) (c - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedAddCommGroup α\na b c : α\n⊢ (fun x => x - a) '' Ioo b c = Ioo (b - a) (c - a)\n[PROOFSTEP]\nsimp [sub_eq_neg_add]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => a + x) ⁻¹' [[b, c]] = [[b - a, c - a]]\n[PROOFSTEP]\nsimp only [← Icc_min_max, preimage_const_add_Icc, min_sub_sub_right, max_sub_sub_right]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => x + a) ⁻¹' [[b, c]] = [[b - a, c - a]]\n[PROOFSTEP]\nsimpa only [add_comm] using preimage_const_add_uIcc a b c\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ -[[a, b]] = [[-a, -b]]\n[PROOFSTEP]\nsimp only [← Icc_min_max, preimage_neg_Icc, min_neg_neg, max_neg_neg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => x - a) ⁻¹' [[b, c]] = [[b + a, c + a]]\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => a - x) ⁻¹' [[b, c]] = [[a - b, a - c]]\n[PROOFSTEP]\nsimp_rw [← Icc_min_max, preimage_const_sub_Icc]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ Icc (a - max b c) (a - min b c) = Icc (min (a - b) (a - c)) (max (a - b) (a - c))\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, min_add_add_left, max_add_add_left, min_neg_neg, max_neg_neg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => a + x) '' [[b, c]] = [[a + b, a + c]]\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => x + a) '' [[b, c]] = [[b + a, c + a]]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => a - x) '' [[b, c]] = [[a - b, a - c]]\n[PROOFSTEP]\nhave := image_comp (fun x => a + x) fun x => -x\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nthis : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' [[b, c]] = [[a - b, a - c]]\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nthis : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)\n⊢ (fun x => a - x) '' [[b, c]] = [[a - b, a - c]]\n[PROOFSTEP]\nsimp [sub_eq_add_neg, this, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ (fun x => x - a) '' [[b, c]] = [[b - a, c - a]]\n[PROOFSTEP]\nsimp [sub_eq_add_neg, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ Neg.neg '' [[a, b]] = [[-a, -b]]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nh : [[c, d]] ⊆ [[a, b]]\n⊢ |d - c| ≤ |b - a|\n[PROOFSTEP]\nrw [← max_sub_min_eq_abs, ← max_sub_min_eq_abs]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nh : [[c, d]] ⊆ [[a, b]]\n⊢ max c d - min c d ≤ max a b - min a b\n[PROOFSTEP]\nrw [uIcc_subset_uIcc_iff_le] at h \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nh : min a b ≤ min c d ∧ max c d ≤ max a b\n⊢ max c d - min c d ≤ max a b - min a b\n[PROOFSTEP]\nexact sub_le_sub h.2 h.1\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x => x * c) ⁻¹' Ioo a b = Ioo (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x => x * c) ⁻¹' Ioc a b = Ioc (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x => x * c) ⁻¹' Ico a b = Ico (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ici_inter_Iio, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x => x * c) ⁻¹' Icc a b = Icc (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x => x * c) ⁻¹' Ioo a b = Ioo (b / c) (a / c)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio, h, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x => x * c) ⁻¹' Ioc a b = Ico (b / c) (a / c)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic, ← Ici_inter_Iio, h, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x => x * c) ⁻¹' Ico a b = Ioc (b / c) (a / c)\n[PROOFSTEP]\nsimp [← Ici_inter_Iio, ← Ioi_inter_Iic, h, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x => x * c) ⁻¹' Icc a b = Icc (b / c) (a / c)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic, h, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ioo a b = Ioo (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ioc a b = Ioc (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ico a b = Ico (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ici_inter_Iio, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Icc a b = Icc (a / c) (b / c)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic, h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Iio a = Ioi (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Iio_of_neg a h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ioi a = Iio (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Ioi_of_neg a h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Iic a = Ici (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Iic_of_neg a h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ici a = Iic (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Ici_of_neg a h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ioo a b = Ioo (b / c) (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Ioo_of_neg a b h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ioc a b = Ico (b / c) (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Ioc_of_neg a b h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Ico a b = Ioc (b / c) (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Ico_of_neg a b h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : c < 0\n⊢ (fun x x_1 => x * x_1) c ⁻¹' Icc a b = Icc (b / c) (a / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using preimage_mul_const_Icc_of_neg a b h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na : α\nha : a ≠ 0\nb c : α\nh : a < 0\n⊢ (fun x => x * a) ⁻¹' [[b, c]] = [[b / a, c / a]]\n[PROOFSTEP]\nsimp [← Icc_min_max, h, h.le, min_div_div_right_of_nonpos, max_div_div_right_of_nonpos]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na : α\nha✝ : a ≠ 0\nb c : α\nha : 0 < a\n⊢ (fun x => x * a) ⁻¹' [[b, c]] = [[b / a, c / a]]\n[PROOFSTEP]\nsimp [← Icc_min_max, ha, ha.le, min_div_div_right, max_div_div_right]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na : α\nha : a ≠ 0\nb c : α\n⊢ (fun x => a * x) ⁻¹' [[b, c]] = [[b / a, c / a]]\n[PROOFSTEP]\nsimp only [← preimage_mul_const_uIcc ha, mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na : α\nha : a ≠ 0\nb c : α\n⊢ (fun x => x / a) ⁻¹' [[b, c]] = [[b * a, c * a]]\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, preimage_mul_const_uIcc (inv_ne_zero ha), inv_inv]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nha : a = 0\n⊢ (fun x => x * a) '' [[b, c]] = [[b * a, c * a]]\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nha : ¬a = 0\n⊢ (fun x => x * a⁻¹) ⁻¹' [[b, c]] = (fun x => x / a) ⁻¹' [[b, c]]\n[PROOFSTEP]\nsimp only [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\n⊢ (fun x => a * x) '' [[b, c]] = [[a * b, a * c]]\n[PROOFSTEP]\nsimpa only [mul_comm] using image_mul_const_uIcc a b c\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\n⊢ (fun x => x / a) '' [[b, c]] = [[b / a, c / a]]\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, image_mul_const_uIcc]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ ↑(Units.mulRight (Units.mk0 c (_ : c ≠ 0))).symm ⁻¹' Icc a b = Icc (a * c) (b * c)\n[PROOFSTEP]\nsimp [h, division_def]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nhab : a ≤ b\nhc : 0 ≤ c\n⊢ (fun x => x * c) '' Icc a b = Icc (a * c) (b * c)\n[PROOFSTEP]\ncases eq_or_lt_of_le hc\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nhab : a ≤ b\nhc : 0 ≤ c\nh✝ : 0 = c\n⊢ (fun x => x * c) '' Icc a b = Icc (a * c) (b * c)\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b : α\nhab : a ≤ b\nhc : 0 ≤ 0\n⊢ (fun x => x * 0) '' Icc a b = Icc (a * 0) (b * 0)\n[PROOFSTEP]\nsimp [(nonempty_Icc.2 hab).image_const]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nhab : a ≤ b\nhc : 0 ≤ c\nh✝ : 0 < c\n⊢ (fun x => x * c) '' Icc a b = Icc (a * c) (b * c)\n[PROOFSTEP]\nexact image_mul_right_Icc' a b ‹0 < c›\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c : α\n⊢ (fun x x_1 => x * x_1) a '' Icc b c = Icc (a * b) (a * c)\n[PROOFSTEP]\nconvert image_mul_right_Icc' b c h using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c : α\n⊢ (fun x x_1 => x * x_1) a '' Icc b c = (fun x => x * a) '' Icc b c\n[PROOFSTEP]\nsimp only [mul_comm _ a]\n[GOAL]\ncase h.e'_3\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c : α\n⊢ Icc (a * b) (a * c) = Icc (b * a) (c * a)\n[PROOFSTEP]\nsimp only [mul_comm _ a]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nha : 0 ≤ a\nhbc : b ≤ c\n⊢ (fun x x_1 => x * x_1) a '' Icc b c = Icc (a * b) (a * c)\n[PROOFSTEP]\nconvert image_mul_right_Icc hbc ha using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nha : 0 ≤ a\nhbc : b ≤ c\n⊢ (fun x x_1 => x * x_1) a '' Icc b c = (fun x => x * a) '' Icc b c\n[PROOFSTEP]\nsimp only [mul_comm _ a]\n[GOAL]\ncase h.e'_3\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nha : 0 ≤ a\nhbc : b ≤ c\n⊢ Icc (a * b) (a * c) = Icc (b * a) (c * a)\n[PROOFSTEP]\nsimp only [mul_comm _ a]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a b c : α\nh : 0 < c\n⊢ ↑(Units.mulRight (Units.mk0 c (_ : c ≠ 0))).symm ⁻¹' Ioo a b = Ioo (a * c) (b * c)\n[PROOFSTEP]\nsimp [h, division_def]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c : α\n⊢ (fun x x_1 => x * x_1) a '' Ioo b c = Ioo (a * b) (a * c)\n[PROOFSTEP]\nconvert image_mul_right_Ioo b c h using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c : α\n⊢ (fun x x_1 => x * x_1) a '' Ioo b c = (fun x => x * a) '' Ioo b c\n[PROOFSTEP]\nsimp only [mul_comm _ a]\n[GOAL]\ncase h.e'_3\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c : α\n⊢ Ioo (a * b) (a * c) = Ioo (b * a) (c * a)\n[PROOFSTEP]\nsimp only [mul_comm _ a]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nha : 0 < a\n⊢ (Ioo 0 a)⁻¹ = Ioi a⁻¹\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nha : 0 < a\nx : α\n⊢ x ∈ (Ioo 0 a)⁻¹ ↔ x ∈ Ioi a⁻¹\n[PROOFSTEP]\nexact\n ⟨fun h => inv_inv x ▸ (inv_lt_inv ha h.1).2 h.2, fun h =>\n ⟨inv_pos.2 <| (inv_pos.2 ha).trans h, inv_inv a ▸ (inv_lt_inv ((inv_pos.2 ha).trans h) (inv_pos.2 ha)).2 h⟩⟩\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nha : 0 < a\n⊢ (Ioi a)⁻¹ = Ioo 0 a⁻¹\n[PROOFSTEP]\nrw [inv_eq_iff_eq_inv, inv_Ioo_0_left (inv_pos.2 ha), inv_inv]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\na : α\nk : Type u_2\ninst✝ : LinearOrderedField k\nx : k\nhx : 0 < x\n⊢ (fun y => x * y) '' Ioi 0 = Ioi 0\n[PROOFSTEP]\nerw [(Units.mk0 x hx.ne').mulLeft.image_eq_preimage, preimage_const_mul_Ioi 0 (inv_pos.mpr hx), zero_div]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c d : α\n⊢ (fun x => a * x + b) '' Icc c d = Icc (a * c + b) (a * d + b)\n[PROOFSTEP]\nsuffices (fun x => x + b) '' ((fun x => a * x) '' Icc c d) = Icc (a * c + b) (a * d + b) by\n rwa [Set.image_image] at this \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c d : α\nthis : (fun x => x + b) '' ((fun x => a * x) '' Icc c d) = Icc (a * c + b) (a * d + b)\n⊢ (fun x => a * x + b) '' Icc c d = Icc (a * c + b) (a * d + b)\n[PROOFSTEP]\nrwa [Set.image_image] at this \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ a : α\nh : 0 < a\nb c d : α\n⊢ (fun x => x + b) '' ((fun x => a * x) '' Icc c d) = Icc (a * c + b) (a * d + b)\n[PROOFSTEP]\nrw [image_mul_left_Icc' h, image_add_const_Icc]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Pointwise.Interval", "llama_tokens": 12574, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240964782011, "lm_q2_score": 0.7279754548076478, "lm_q1q2_score": 0.6298619051442546}} {"text": "[GOAL]\nk : Type u\ninst✝² : Field k\nA : Type w\ninst✝¹ : Ring A\ninst✝ : Algebra k A\n⊢ ∀ (X Y Z : ModuleCat A) (r : k) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase h\nk : Type u\ninst : Field k\nA : Type w\ninst_1 : Ring A\ninst_2 : Algebra k A\nX Y Z : ModuleCat A\nr : k\nf : X ⟶ Y\ng : Y ⟶ Z\nx✝ : ↑X\n⊢ ↑g (↑(r • f) x✝) = ↑(r • f ≫ g) x✝\n[PROOFSTEP]\nrw [LinearMap.smul_apply, LinearMap.smul_apply, LinearMap.map_smul_of_tower]\n[GOAL]\ncase h\nk : Type u\ninst : Field k\nA : Type w\ninst_1 : Ring A\ninst_2 : Algebra k A\nX Y Z : ModuleCat A\nr : k\nf : X ⟶ Y\ng : Y ⟶ Z\nx✝ : ↑X\n⊢ r • ↑g (↑f x✝) = r • ↑(f ≫ g) x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Algebra", "llama_tokens": 367, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240895276223, "lm_q2_score": 0.7279754430043072, "lm_q1q2_score": 0.6298618898718692}} {"text": "[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nE : Type u_4\nα✝ : Type u_5\nβ : Type u_6\ninst✝⁶ : SMul M α✝\ninst✝⁵ : SMul M β\ninst✝⁴ : SMul N α✝\ninst✝³ : SMul N β\na✝ : M\nx : α✝ × β\nα : Type u_7\ninst✝² : Monoid M\ninst✝¹ : AddMonoid α\ninst✝ : DistribMulAction M α\na : M\nc : β\n⊢ a • (0, c) = (0, a • c)\n[PROOFSTEP]\nrw [Prod.smul_mk, smul_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nE : Type u_4\nα : Type u_5\nβ✝ : Type u_6\ninst✝⁶ : SMul M α\ninst✝⁵ : SMul M β✝\ninst✝⁴ : SMul N α\ninst✝³ : SMul N β✝\na✝ : M\nx : α × β✝\nβ : Type u_7\ninst✝² : Monoid M\ninst✝¹ : AddMonoid β\ninst✝ : DistribMulAction M β\na : M\nb : α\n⊢ a • (b, 0) = (a • b, 0)\n[PROOFSTEP]\nrw [Prod.smul_mk, smul_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nE : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁷ : SMul M α\ninst✝⁶ : SMul M β\ninst✝⁵ : SMul N α\ninst✝⁴ : SMul N β\na✝ : M\nx : α × β\ninst✝³ : Pow α E\ninst✝² : Pow β E\ninst✝¹ : FaithfulSMul M α\ninst✝ : Nonempty β\nm₁✝ m₂✝ : M\nh : ∀ (a : α × β), m₁✝ • a = m₂✝ • a\nb : β\na : α\n⊢ m₁✝ • a = m₂✝ • a\n[PROOFSTEP]\ninjection h (a, b)\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nE : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁷ : SMul M α\ninst✝⁶ : SMul M β\ninst✝⁵ : SMul N α\ninst✝⁴ : SMul N β\na✝ : M\nx : α × β\ninst✝³ : Pow α E\ninst✝² : Pow β E\ninst✝¹ : Nonempty α\ninst✝ : FaithfulSMul M β\nm₁✝ m₂✝ : M\nh : ∀ (a : α × β), m₁✝ • a = m₂✝ • a\na : α\nb : β\n⊢ m₁✝ • b = m₂✝ • b\n[PROOFSTEP]\ninjection h (a, b)\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nE : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Mul N\ninst✝⁴ : Mul P\ninst✝³ : SMul M N\ninst✝² : SMul M P\ninst✝¹ : SMulCommClass M N N\ninst✝ : SMulCommClass M P P\nc : M\nx y : N × P\n⊢ c • x • y = x • c • y\n[PROOFSTEP]\nsimp [smul_def, mul_def, mul_smul_comm]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nE : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Mul N\ninst✝⁴ : Mul P\ninst✝³ : SMul M N\ninst✝² : SMul M P\ninst✝¹ : IsScalarTower M N N\ninst✝ : IsScalarTower M P P\nc : M\nx y : N × P\n⊢ (c • x) • y = c • x • y\n[PROOFSTEP]\nsimp [smul_def, mul_def, smul_mul_assoc]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.Prod", "llama_tokens": 1225, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8539127380808499, "lm_q2_score": 0.7371581684030623, "lm_q1q2_score": 0.6294687499797231}} {"text": "[GOAL]\nα α' : Sort u\nβ β' : Sort v\nh : α = α'\nh' : α' → β = β'\n⊢ (α → β) = (α' → β')\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Sort u\nβ β' : Sort v\nh' : α → β = β'\n⊢ (α → β) = (α → β')\n[PROOFSTEP]\nshow (∀ (x : α), (fun _ => β) x) = _\n[GOAL]\ncase refl\nα : Sort u\nβ β' : Sort v\nh' : α → β = β'\n⊢ ((x : α) → (fun x => β) x) = (α → β')\n[PROOFSTEP]\nrw [funext h']\n[GOAL]\nα✝ : Sort u_1\nx y : α✝\np : HEq x y → Prop\nh : ∀ (he : x = y), p (_ : HEq x y)\nhe : HEq x y\n⊢ p he\n[PROOFSTEP]\ncases he\n[GOAL]\ncase refl\nα✝ : Sort u_1\nx : α✝\np : HEq x x → Prop\nh : ∀ (he : x = x), p (_ : HEq x x)\n⊢ p (_ : HEq x x)\n[PROOFSTEP]\nexact h rfl\n[GOAL]\nx y : Prop\np : x = y → Prop\nh : ∀ (he : x ↔ y), p (_ : x = y)\nhe : x = y\n⊢ p he\n[PROOFSTEP]\ncases he\n[GOAL]\ncase refl\nx : Prop\np : x = x → Prop\nh : ∀ (he : x ↔ x), p (_ : x = x)\n⊢ p (_ : x = x)\n[PROOFSTEP]\nexact h Iff.rfl\n", "meta": {"mathlib_filename": "Mathlib.Tactic.Congr!", "llama_tokens": 489, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357666736772, "lm_q2_score": 0.7248702702332476, "lm_q1q2_score": 0.6284884504906394}} {"text": "[GOAL]\nS : Type u_1\ninst✝ : Semiring S\na b : ℕ\n⊢ ↑(ascFactorial a b) = Polynomial.eval (↑a + 1) (pochhammer S b)\n[PROOFSTEP]\nrw [← pochhammer_nat_eq_ascFactorial, pochhammer_eval_cast, Nat.cast_add, Nat.cast_one]\n[GOAL]\nS : Type u_1\ninst✝ : Semiring S\na b : ℕ\n⊢ ↑(descFactorial a b) = Polynomial.eval (↑(a - (b - 1))) (pochhammer S b)\n[PROOFSTEP]\nrw [← pochhammer_eval_cast, pochhammer_nat_eq_descFactorial]\n[GOAL]\nS : Type u_1\ninst✝ : Semiring S\na b : ℕ\n⊢ ↑(descFactorial a b) = ↑(descFactorial (a - (b - 1) + b - 1) b)\n[PROOFSTEP]\ninduction' b with b\n[GOAL]\ncase zero\nS : Type u_1\ninst✝ : Semiring S\na b : ℕ\n⊢ ↑(descFactorial a zero) = ↑(descFactorial (a - (zero - 1) + zero - 1) zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nS : Type u_1\ninst✝ : Semiring S\na b✝ b : ℕ\nn_ih✝ : ↑(descFactorial a b) = ↑(descFactorial (a - (b - 1) + b - 1) b)\n⊢ ↑(descFactorial a (succ b)) = ↑(descFactorial (a - (succ b - 1) + succ b - 1) (succ b))\n[PROOFSTEP]\nsimp_rw [add_succ, succ_sub_one]\n[GOAL]\ncase succ\nS : Type u_1\ninst✝ : Semiring S\na b✝ b : ℕ\nn_ih✝ : ↑(descFactorial a b) = ↑(descFactorial (a - (b - 1) + b - 1) b)\n⊢ ↑(descFactorial a (succ b)) = ↑(descFactorial (a - b + b) (succ b))\n[PROOFSTEP]\nobtain h | h := le_total a b\n[GOAL]\ncase succ.inl\nS : Type u_1\ninst✝ : Semiring S\na b✝ b : ℕ\nn_ih✝ : ↑(descFactorial a b) = ↑(descFactorial (a - (b - 1) + b - 1) b)\nh : a ≤ b\n⊢ ↑(descFactorial a (succ b)) = ↑(descFactorial (a - b + b) (succ b))\n[PROOFSTEP]\nrw [descFactorial_of_lt (lt_succ_of_le h), descFactorial_of_lt (lt_succ_of_le _)]\n[GOAL]\nS : Type u_1\ninst✝ : Semiring S\na b✝ b : ℕ\nn_ih✝ : ↑(descFactorial a b) = ↑(descFactorial (a - (b - 1) + b - 1) b)\nh : a ≤ b\n⊢ a - b + b ≤ b\n[PROOFSTEP]\nrw [tsub_eq_zero_iff_le.mpr h, zero_add]\n[GOAL]\ncase succ.inr\nS : Type u_1\ninst✝ : Semiring S\na b✝ b : ℕ\nn_ih✝ : ↑(descFactorial a b) = ↑(descFactorial (a - (b - 1) + b - 1) b)\nh : b ≤ a\n⊢ ↑(descFactorial a (succ b)) = ↑(descFactorial (a - b + b) (succ b))\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le h]\n[GOAL]\nS : Type u_1\ninst✝ : Semiring S\na b : ℕ\n⊢ ↑a ! = Polynomial.eval 1 (pochhammer S a)\n[PROOFSTEP]\nrw [← zero_ascFactorial, cast_ascFactorial, cast_zero, zero_add]\n[GOAL]\nS : Type u_1\ninst✝ : Ring S\na b : ℕ\n⊢ ↑(descFactorial a 2) = ↑a * (↑a - 1)\n[PROOFSTEP]\nrw [cast_descFactorial]\n[GOAL]\nS : Type u_1\ninst✝ : Ring S\na b : ℕ\n⊢ Polynomial.eval (↑(a - (2 - 1))) (pochhammer S 2) = ↑a * (↑a - 1)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase zero\nS : Type u_1\ninst✝ : Ring S\nb : ℕ\n⊢ Polynomial.eval (↑(zero - (2 - 1))) (pochhammer S 2) = ↑zero * (↑zero - 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nS : Type u_1\ninst✝ : Ring S\nb n✝ : ℕ\n⊢ Polynomial.eval (↑(succ n✝ - (2 - 1))) (pochhammer S 2) = ↑(succ n✝) * (↑(succ n✝) - 1)\n[PROOFSTEP]\nrw [succ_sub_succ, tsub_zero, cast_succ, add_sub_cancel, pochhammer_succ_right, pochhammer_one, Polynomial.X_mul,\n Polynomial.eval_mul_X, Polynomial.eval_add, Polynomial.eval_X, cast_one, Polynomial.eval_one]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Factorial.Cast", "llama_tokens": 1548, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835248143776, "lm_q2_score": 0.7520125682019722, "lm_q1q2_score": 0.6282941111860962}} {"text": "[GOAL]\nm n : ℕ∞\n⊢ ↑(↑toNat ⊤) = ⊤ ↔ ⊤ ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ∞\nx✝ : ℕ\n⊢ ↑(↑toNat ↑x✝) = ↑x✝ ↔ ↑x✝ ≠ ⊤\n[PROOFSTEP]\nsimp [toNat_coe]\n[GOAL]\nm✝ n✝ m n : ℕ∞\nhm : m ≠ ⊤\nhn : n ≠ ⊤\n⊢ ↑toNat (m + n) = ↑toNat m + ↑toNat n\n[PROOFSTEP]\nlift m to ℕ using hm\n[GOAL]\ncase intro\nm✝ n✝ n : ℕ∞\nhn : n ≠ ⊤\nm : ℕ\n⊢ ↑toNat (↑m + n) = ↑toNat ↑m + ↑toNat n\n[PROOFSTEP]\nlift n to ℕ using hn\n[GOAL]\ncase intro.intro\nm✝ n✝ : ℕ∞\nm n : ℕ\n⊢ ↑toNat (↑m + ↑n) = ↑toNat ↑m + ↑toNat ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nm✝ n✝ n : ℕ∞\nhn : n ≠ ⊤\nm : ℕ∞\n⊢ ↑toNat (m - n) = ↑toNat m - ↑toNat n\n[PROOFSTEP]\nlift n to ℕ using hn\n[GOAL]\ncase intro\nm✝ n✝ m : ℕ∞\nn : ℕ\n⊢ ↑toNat (m - ↑n) = ↑toNat m - ↑toNat ↑n\n[PROOFSTEP]\ninduction m using ENat.recTopCoe\n[GOAL]\ncase intro.h₁\nm n✝ : ℕ∞\nn : ℕ\n⊢ ↑toNat (⊤ - ↑n) = ↑toNat ⊤ - ↑toNat ↑n\n[PROOFSTEP]\nrw [top_sub_coe, toNat_top, zero_tsub]\n[GOAL]\ncase intro.h₂\nm n✝ : ℕ∞\nn a✝ : ℕ\n⊢ ↑toNat (↑a✝ - ↑n) = ↑toNat ↑a✝ - ↑toNat ↑n\n[PROOFSTEP]\nrw [← coe_sub, toNat_coe, toNat_coe, toNat_coe]\n[GOAL]\nm✝ n✝ m : ℕ∞\nn : ℕ\nhn : n ≠ 0\n⊢ ↑toNat m = n ↔ m = ↑n\n[PROOFSTEP]\ninduction m using ENat.recTopCoe\n[GOAL]\ncase h₁\nm n✝ : ℕ∞\nn : ℕ\nhn : n ≠ 0\n⊢ ↑toNat ⊤ = n ↔ ⊤ = ↑n\n[PROOFSTEP]\nsimp [hn.symm]\n[GOAL]\ncase h₂\nm n✝ : ℕ∞\nn : ℕ\nhn : n ≠ 0\na✝ : ℕ\n⊢ ↑toNat ↑a✝ = n ↔ ↑a✝ = ↑n\n[PROOFSTEP]\nsimp [hn.symm]\n[GOAL]\nm✝ n m : ℕ∞\n⊢ Order.succ m = m + 1\n[PROOFSTEP]\ncases m\n[GOAL]\ncase none\nm n : ℕ∞\n⊢ Order.succ none = none + 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nm n : ℕ∞\nval✝ : ℕ\n⊢ Order.succ (some val✝) = some val✝ + 1\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ∞\nhm : m ≠ ⊤\n⊢ ¬IsMax m\n[PROOFSTEP]\nrwa [isMax_iff_eq_top]\n[GOAL]\nm n : ℕ∞\nP : ℕ∞ → Prop\na : ℕ∞\nh0 : P 0\nhsuc : ∀ (n : ℕ), P ↑n → P ↑(Nat.succ n)\nhtop : (∀ (n : ℕ), P ↑n) → P ⊤\n⊢ P a\n[PROOFSTEP]\nhave A : ∀ n : ℕ, P n := fun n => Nat.recOn n h0 hsuc\n[GOAL]\nm n : ℕ∞\nP : ℕ∞ → Prop\na : ℕ∞\nh0 : P 0\nhsuc : ∀ (n : ℕ), P ↑n → P ↑(Nat.succ n)\nhtop : (∀ (n : ℕ), P ↑n) → P ⊤\nA : ∀ (n : ℕ), P ↑n\n⊢ P a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nm n : ℕ∞\nP : ℕ∞ → Prop\nh0 : P 0\nhsuc : ∀ (n : ℕ), P ↑n → P ↑(Nat.succ n)\nhtop : (∀ (n : ℕ), P ↑n) → P ⊤\nA : ∀ (n : ℕ), P ↑n\n⊢ P none\n[PROOFSTEP]\nexact htop A\n[GOAL]\ncase some\nm n : ℕ∞\nP : ℕ∞ → Prop\nh0 : P 0\nhsuc : ∀ (n : ℕ), P ↑n → P ↑(Nat.succ n)\nhtop : (∀ (n : ℕ), P ↑n) → P ⊤\nA : ∀ (n : ℕ), P ↑n\nval✝ : ℕ\n⊢ P (some val✝)\n[PROOFSTEP]\nexact A _\n", "meta": {"mathlib_filename": "Mathlib.Data.ENat.Basic", "llama_tokens": 1550, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891218080991, "lm_q2_score": 0.7634837527911057, "lm_q1q2_score": 0.6277280362220711}} {"text": "[GOAL]\nn : ℕ\n⊢ bodd (succ n) = !bodd n\n[PROOFSTEP]\nsimp only [bodd, boddDiv2]\n[GOAL]\nn : ℕ\n⊢ (match boddDiv2 n with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).fst =\n !(boddDiv2 n).fst\n[PROOFSTEP]\nlet ⟨b, m⟩ := boddDiv2 n\n[GOAL]\nn : ℕ\nb : Bool\nm : ℕ\n⊢ (match (b, m) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).fst =\n !(b, m).fst\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn m : ℕ\n⊢ (match (false, m) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).fst =\n !(false, m).fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nn m : ℕ\n⊢ (match (true, m) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).fst =\n !(true, m).fst\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ\n⊢ bodd (m + n) = bxor (bodd m) (bodd n)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nm : ℕ\n⊢ bodd (m + zero) = bxor (bodd m) (bodd zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ bodd (m + succ n) = bxor (bodd m) (bodd (succ n))\n[PROOFSTEP]\nsimp [add_succ, IH]\n[GOAL]\ncase succ\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ (!bxor (bodd m) (bodd n)) = bxor (bodd m) !bodd n\n[PROOFSTEP]\ncases bodd m\n[GOAL]\ncase succ.false\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ (!bxor false (bodd n)) = bxor false !bodd n\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase succ.true\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ (!bxor true (bodd n)) = bxor true !bodd n\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase succ.false.false\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ (!bxor false false) = bxor false !false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.false.true\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ (!bxor false true) = bxor false !true\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.true.false\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ (!bxor true false) = bxor true !false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.true.true\nm n : ℕ\nIH : bodd (m + n) = bxor (bodd m) (bodd n)\n⊢ (!bxor true true) = bxor true !true\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ\n⊢ bodd (m * n) = (bodd m && bodd n)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nm : ℕ\n⊢ bodd (m * zero) = (bodd m && bodd zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bodd (m * succ n) = (bodd m && bodd (succ n))\n[PROOFSTEP]\nsimp [mul_succ, IH]\n[GOAL]\ncase succ\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bxor (bodd m && bodd n) (bodd m) = (bodd m && !bodd n)\n[PROOFSTEP]\ncases bodd m\n[GOAL]\ncase succ.false\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bxor (false && bodd n) false = (false && !bodd n)\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase succ.true\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bxor (true && bodd n) true = (true && !bodd n)\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase succ.false.false\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bxor (false && false) false = (false && !false)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.false.true\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bxor (false && true) false = (false && !true)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.true.false\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bxor (true && false) true = (true && !false)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.true.true\nm n : ℕ\nIH : bodd (m * n) = (bodd m && bodd n)\n⊢ bxor (true && true) true = (true && !true)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ n % 2 = bif bodd n then 1 else 0\n[PROOFSTEP]\nhave := congr_arg bodd (mod_add_div n 2)\n[GOAL]\nn : ℕ\nthis : bodd (n % 2 + 2 * (n / 2)) = bodd n\n⊢ n % 2 = bif bodd n then 1 else 0\n[PROOFSTEP]\nsimp [not] at this \n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\n⊢ n % 2 = bif bodd n then 1 else 0\n[PROOFSTEP]\nhave _ : ∀ b, and false b = false := by\n intro b\n cases b <;> rfl\n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\n⊢ ∀ (b : Bool), (false && b) = false\n[PROOFSTEP]\nintro b\n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\nb : Bool\n⊢ (false && b) = false\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn : ℕ\nthis : bodd (n % 2) = bodd n\n⊢ (false && false) = false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nn : ℕ\nthis : bodd (n % 2) = bodd n\n⊢ (false && true) = false\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝ : ∀ (b : Bool), (false && b) = false\n⊢ n % 2 = bif bodd n then 1 else 0\n[PROOFSTEP]\nhave _ : ∀ b, bxor b false = b := by\n intro b\n cases b <;> rfl\n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝ : ∀ (b : Bool), (false && b) = false\n⊢ ∀ (b : Bool), bxor b false = b\n[PROOFSTEP]\nintro b\n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝ : ∀ (b : Bool), (false && b) = false\nb : Bool\n⊢ bxor b false = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝ : ∀ (b : Bool), (false && b) = false\n⊢ bxor false false = false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝ : ∀ (b : Bool), (false && b) = false\n⊢ bxor true false = true\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝¹ : ∀ (b : Bool), (false && b) = false\nx✝ : ∀ (b : Bool), bxor b false = b\n⊢ n % 2 = bif bodd n then 1 else 0\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝¹ : ∀ (b : Bool), (false && b) = false\nx✝ : ∀ (b : Bool), bxor b false = b\n⊢ n % 2 = bif bodd (n % 2) then 1 else 0\n[PROOFSTEP]\ncases' mod_two_eq_zero_or_one n with h h\n[GOAL]\ncase inl\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝¹ : ∀ (b : Bool), (false && b) = false\nx✝ : ∀ (b : Bool), bxor b false = b\nh : n % 2 = 0\n⊢ n % 2 = bif bodd (n % 2) then 1 else 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inr\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝¹ : ∀ (b : Bool), (false && b) = false\nx✝ : ∀ (b : Bool), bxor b false = b\nh : n % 2 = 1\n⊢ n % 2 = bif bodd (n % 2) then 1 else 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inl\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝¹ : ∀ (b : Bool), (false && b) = false\nx✝ : ∀ (b : Bool), bxor b false = b\nh : n % 2 = 0\n⊢ 0 = bif bodd 0 then 1 else 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nn : ℕ\nthis : bodd (n % 2) = bodd n\nx✝¹ : ∀ (b : Bool), (false && b) = false\nx✝ : ∀ (b : Bool), bxor b false = b\nh : n % 2 = 1\n⊢ 1 = bif bodd 1 then 1 else 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ div2 (succ n) = bif bodd n then succ (div2 n) else div2 n\n[PROOFSTEP]\nsimp only [bodd, boddDiv2, div2]\n[GOAL]\nn : ℕ\n⊢ (match boddDiv2 n with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (boddDiv2 n).fst then succ (boddDiv2 n).snd else (boddDiv2 n).snd\n[PROOFSTEP]\ncases' boddDiv2 n with fst snd\n[GOAL]\ncase mk\nn : ℕ\nfst : Bool\nsnd : ℕ\n⊢ (match (fst, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (fst, snd).fst then succ (fst, snd).snd else (fst, snd).snd\n[PROOFSTEP]\ncases fst\n[GOAL]\ncase mk.false\nn snd : ℕ\n⊢ (match (false, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (false, snd).fst then succ (false, snd).snd else (false, snd).snd\ncase mk.true\nn snd : ℕ\n⊢ (match (true, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (true, snd).fst then succ (true, snd).snd else (true, snd).snd\n[PROOFSTEP]\ncase mk.false => simp\n[GOAL]\nn snd : ℕ\n⊢ (match (false, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (false, snd).fst then succ (false, snd).snd else (false, snd).snd\n[PROOFSTEP]\ncase mk.false => simp\n[GOAL]\nn snd : ℕ\n⊢ (match (false, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (false, snd).fst then succ (false, snd).snd else (false, snd).snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.true\nn snd : ℕ\n⊢ (match (true, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (true, snd).fst then succ (true, snd).snd else (true, snd).snd\n[PROOFSTEP]\ncase mk.true => simp\n[GOAL]\nn snd : ℕ\n⊢ (match (true, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (true, snd).fst then succ (true, snd).snd else (true, snd).snd\n[PROOFSTEP]\ncase mk.true => simp\n[GOAL]\nn snd : ℕ\n⊢ (match (true, snd) with\n | (false, m) => (true, m)\n | (true, m) => (false, succ m)).snd =\n bif (true, snd).fst then succ (true, snd).snd else (true, snd).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ (bif bodd (succ n) then 1 else 0) + 2 * div2 (succ n) = succ n\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ (bif bodd n then 0 else 1) + (bif bodd n then succ (div2 n) else div2 n) * 2 = succ n\n[PROOFSTEP]\nrefine' Eq.trans _ (congr_arg succ (bodd_add_div2 n))\n[GOAL]\nn : ℕ\n⊢ (bif bodd n then 0 else 1) + (bif bodd n then succ (div2 n) else div2 n) * 2 =\n succ ((bif bodd n then 1 else 0) + 2 * div2 n)\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase false\nn : ℕ\n⊢ (bif false then 0 else 1) + (bif false then succ (div2 n) else div2 n) * 2 =\n succ ((bif false then 1 else 0) + 2 * div2 n)\n[PROOFSTEP]\nsimp [cond, not]\n[GOAL]\ncase true\nn : ℕ\n⊢ (bif true then 0 else 1) + (bif true then succ (div2 n) else div2 n) * 2 =\n succ ((bif true then 1 else 0) + 2 * div2 n)\n[PROOFSTEP]\nsimp [cond, not]\n[GOAL]\ncase false\nn : ℕ\n⊢ 1 + div2 n * 2 = succ (div2 n * 2)\n[PROOFSTEP]\nrw [Nat.add_comm, Nat.add_succ]\n[GOAL]\ncase true\nn : ℕ\n⊢ succ (div2 n) * 2 = succ (1 + div2 n * 2)\n[PROOFSTEP]\nrw [succ_mul, Nat.add_comm 1, Nat.add_succ]\n[GOAL]\nn : ℕ\n⊢ div2 n = n / 2\n[PROOFSTEP]\nrefine' Nat.eq_of_mul_eq_mul_left (by decide) (Nat.add_left_cancel (Eq.trans _ (Nat.mod_add_div n 2).symm))\n[GOAL]\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\n⊢ n % 2 + 2 * div2 n = n\n[PROOFSTEP]\nrw [mod_two_of_bodd, bodd_add_div2]\n[GOAL]\nn : ℕ\n⊢ n + n = 0 + n + n\n[PROOFSTEP]\nrw [Nat.zero_add]\n[GOAL]\nb : Bool\nn : ℕ\n⊢ bit b n = 2 * n + bif b then 1 else 0\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn : ℕ\n⊢ bit false n = 2 * n + bif false then 1 else 0\ncase true n : ℕ ⊢ bit true n = 2 * n + bif true then 1 else 0\n[PROOFSTEP]\napply bit0_val\n[GOAL]\ncase true\nn : ℕ\n⊢ bit true n = 2 * n + bif true then 1 else 0\n[PROOFSTEP]\napply bit1_val\n[GOAL]\n⊢ ∀ (n : ℕ), shiftr 0 n = 0\n[PROOFSTEP]\nintro n\n[GOAL]\nn : ℕ\n⊢ shiftr 0 n = 0\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n⊢ shiftr 0 zero = 0\ncase succ n : ℕ IH : shiftr 0 n = 0 ⊢ shiftr 0 (succ n) = 0\n[PROOFSTEP]\ncase zero => rw [shiftr]\n[GOAL]\n⊢ shiftr 0 zero = 0\n[PROOFSTEP]\ncase zero => rw [shiftr]\n[GOAL]\n⊢ shiftr 0 zero = 0\n[PROOFSTEP]\nrw [shiftr]\n[GOAL]\ncase succ\nn : ℕ\nIH : shiftr 0 n = 0\n⊢ shiftr 0 (succ n) = 0\n[PROOFSTEP]\ncase succ =>\n rw [shiftr, div2, IH]\n rfl\n[GOAL]\nn : ℕ\nIH : shiftr 0 n = 0\n⊢ shiftr 0 (succ n) = 0\n[PROOFSTEP]\ncase succ =>\n rw [shiftr, div2, IH]\n rfl\n[GOAL]\nn : ℕ\nIH : shiftr 0 n = 0\n⊢ shiftr 0 (succ n) = 0\n[PROOFSTEP]\nrw [shiftr, div2, IH]\n[GOAL]\nn : ℕ\nIH : shiftr 0 n = 0\n⊢ (boddDiv2 0).snd = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nh : n ≠ 0\n⊢ div2 n < n\n[PROOFSTEP]\nrw [div2_val]\n[GOAL]\nn : ℕ\nh : n ≠ 0\n⊢ n / 2 < n\n[PROOFSTEP]\napply (div_lt_iff_lt_mul <| succ_pos 1).2\n[GOAL]\nn : ℕ\nh : n ≠ 0\n⊢ n < n * succ 1\n[PROOFSTEP]\nhave := Nat.mul_lt_mul_of_pos_left (lt_succ_self 1) (lt_of_le_of_ne n.zero_le h.symm)\n[GOAL]\nn : ℕ\nh : n ≠ 0\nthis : n * 1 < n * succ 1\n⊢ n < n * succ 1\n[PROOFSTEP]\nrwa [Nat.mul_one] at this \n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nn : ℕ\nn0 : n = 0\n⊢ C n\n[PROOFSTEP]\nsimp [n0]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nn : ℕ\nn0 : n = 0\n⊢ C 0\n[PROOFSTEP]\nexact z\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nn : ℕ\nn0 : ¬n = 0\n⊢ C n\n[PROOFSTEP]\nlet n' := div2 n\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nn : ℕ\nn0 : ¬n = 0\nn' : ℕ := div2 n\n⊢ C n\n[PROOFSTEP]\nhave _x : bit (bodd n) n' = n := by apply bit_decomp n\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nn : ℕ\nn0 : ¬n = 0\nn' : ℕ := div2 n\n⊢ bit (bodd n) n' = n\n[PROOFSTEP]\napply bit_decomp n\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nn : ℕ\nn0 : ¬n = 0\nn' : ℕ := div2 n\n_x : bit (bodd n) n' = n\n⊢ C n\n[PROOFSTEP]\nrw [← _x]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nn : ℕ\nn0 : ¬n = 0\nn' : ℕ := div2 n\n_x : bit (bodd n) n' = n\n⊢ C (bit (bodd n) n')\n[PROOFSTEP]\nexact f (bodd n) n' (binaryRec z f n')\n[GOAL]\nn : ℕ\nn0 : ¬n = 0\nn' : ℕ := div2 n\n_x : bit (bodd n) n' = n\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 n' n\n[PROOFSTEP]\nexact binaryRec_decreasing n0\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\n⊢ binaryRec z f 0 = z\n[PROOFSTEP]\nrw [binaryRec]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\n⊢ (if n0 : 0 = 0 then Eq.mpr (_ : C 0 = C 0) z\n else\n let n' := div2 0;\n let_fun _x := (_ : bit (bodd 0) (div2 0) = 0);\n Eq.mpr (_ : C 0 = C (bit (bodd 0) n')) (f (bodd 0) n' (binaryRec z f n'))) =\n z\n[PROOFSTEP]\nrfl\n[GOAL]\nb : Bool\nn : ℕ\n⊢ bodd (bit b n) = b\n[PROOFSTEP]\nrw [bit_val]\n[GOAL]\nb : Bool\nn : ℕ\n⊢ bodd (2 * n + bif b then 1 else 0) = b\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\nn : ℕ\n⊢ bodd (bif b then 1 else 0) = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn : ℕ\n⊢ bodd (bif false then 1 else 0) = false\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase true\nn : ℕ\n⊢ bodd (bif true then 1 else 0) = true\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase false.false\nn : ℕ\n⊢ bodd (bif false then 1 else 0) = false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase false.true\nn : ℕ\n⊢ bodd (bif false then 1 else 0) = false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true.false\nn : ℕ\n⊢ bodd (bif true then 1 else 0) = true\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true.true\nn : ℕ\n⊢ bodd (bif true then 1 else 0) = true\n[PROOFSTEP]\nrfl\n[GOAL]\nb : Bool\nn : ℕ\n⊢ div2 (bit b n) = n\n[PROOFSTEP]\nrw [bit_val, div2_val, Nat.add_comm, add_mul_div_left, div_eq_of_lt, Nat.zero_add]\n[GOAL]\nb : Bool\nn : ℕ\n⊢ (bif b then 1 else 0) < 2\n[PROOFSTEP]\ncases b\n[GOAL]\ncase H\nb : Bool\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn : ℕ\n⊢ (bif false then 1 else 0) < 2\n[PROOFSTEP]\nexact by decide\n[GOAL]\nn : ℕ\n⊢ (bif false then 1 else 0) < 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true\nn : ℕ\n⊢ (bif true then 1 else 0) < 2\n[PROOFSTEP]\nexact by decide\n[GOAL]\nn : ℕ\n⊢ (bif true then 1 else 0) < 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase H.false\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\nexact by decide\n[GOAL]\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase H.true\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\nexact by decide\n[GOAL]\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nb : Bool\nm n k : ℕ\nh : k + 1 ≤ n + 1\n⊢ shiftl' b m (n + 1 - (k + 1)) = shiftr (shiftl' b m (n + 1)) (k + 1)\n[PROOFSTEP]\nsimp [shiftl']\n[GOAL]\nb : Bool\nm n k : ℕ\nh : k + 1 ≤ n + 1\n⊢ shiftl' b m (n - k) = shiftr (bit b (shiftl' b m n)) (k + 1)\n[PROOFSTEP]\nrw [Nat.add_comm, shiftr_add]\n[GOAL]\nb : Bool\nm n k : ℕ\nh : k + 1 ≤ n + 1\n⊢ shiftl' b m (n - k) = shiftr (shiftr (bit b (shiftl' b m n)) 1) k\n[PROOFSTEP]\nsimp [shiftr, div2_bit]\n[GOAL]\nb : Bool\nm n k : ℕ\nh : k + 1 ≤ n + 1\n⊢ shiftl' b m (n - k) = shiftr (shiftl' b m n) k\n[PROOFSTEP]\nsimp [shiftl'_sub, (Nat.le_of_succ_le_succ h)]\n[GOAL]\nm : ℕ\nb : Bool\nn : ℕ\n⊢ testBit (bit b n) (succ m) = testBit n m\n[PROOFSTEP]\nhave : bodd (shiftr (shiftr (bit b n) 1) m) = bodd (shiftr n m) :=\n by\n dsimp [shiftr]\n rw [div2_bit]\n[GOAL]\nm : ℕ\nb : Bool\nn : ℕ\n⊢ bodd (shiftr (shiftr (bit b n) 1) m) = bodd (shiftr n m)\n[PROOFSTEP]\ndsimp [shiftr]\n[GOAL]\nm : ℕ\nb : Bool\nn : ℕ\n⊢ bodd (shiftr (div2 (bit b n)) m) = bodd (shiftr n m)\n[PROOFSTEP]\nrw [div2_bit]\n[GOAL]\nm : ℕ\nb : Bool\nn : ℕ\nthis : bodd (shiftr (shiftr (bit b n) 1) m) = bodd (shiftr n m)\n⊢ testBit (bit b n) (succ m) = testBit n m\n[PROOFSTEP]\nrw [← shiftr_add, Nat.add_comm] at this \n[GOAL]\nm : ℕ\nb : Bool\nn : ℕ\nthis : bodd (shiftr (bit b n) (m + 1)) = bodd (shiftr n m)\n⊢ testBit (bit b n) (succ m) = testBit n m\n[PROOFSTEP]\nexact this\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh : f false 0 z = z\nb : Bool\nn : ℕ\n⊢ binaryRec z f (bit b n) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrw [binaryRec]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh : f false 0 z = z\nb : Bool\nn : ℕ\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\nby_cases h :\n bit b n =\n 0\n -- Note: this renames the original `h : f false 0 z = z` to `h'` and leaves `h : bit b n = 0`\n[GOAL]\ncase pos\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh✝ : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\ncase neg\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh✝ : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\ncase pos h' =>\n simp [dif_pos h]\n generalize binaryRec z f (bit b n) = e\n revert e\n have bf := bodd_bit b n\n have n0 := div2_bit b n\n rw [h] at bf n0 \n simp at bf n0 \n subst bf n0\n rw [binaryRec_zero]\n intros\n rw [h']\n rfl\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\ncase pos h' =>\n simp [dif_pos h]\n generalize binaryRec z f (bit b n) = e\n revert e\n have bf := bodd_bit b n\n have n0 := div2_bit b n\n rw [h] at bf n0 \n simp at bf n0 \n subst bf n0\n rw [binaryRec_zero]\n intros\n rw [h']\n rfl\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\nsimp [dif_pos h]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\n⊢ Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\ngeneralize binaryRec z f (bit b n) = e\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\ne : C (bit b n)\n⊢ Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\nrevert e\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\n⊢ C (bit b n) → Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\nhave bf := bodd_bit b n\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\nbf : bodd (bit b n) = b\n⊢ C (bit b n) → Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\nhave n0 := div2_bit b n\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\nbf : bodd (bit b n) = b\nn0 : div2 (bit b n) = n\n⊢ C (bit b n) → Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\nrw [h] at bf n0 \n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\nbf : bodd 0 = b\nn0 : div2 0 = n\n⊢ C (bit b n) → Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\nsimp at bf n0 \n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : bit b n = 0\nbf : false = b\nn0 : 0 = n\n⊢ C (bit b n) → Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\nsubst bf n0\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nh : bit false 0 = 0\n⊢ C (bit false 0) → Eq.mpr (_ : C (bit false 0) = C 0) z = f false 0 (binaryRec z f 0)\n[PROOFSTEP]\nrw [binaryRec_zero]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nh : bit false 0 = 0\n⊢ C (bit false 0) → Eq.mpr (_ : C (bit false 0) = C 0) z = f false 0 z\n[PROOFSTEP]\nintros\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nh : bit false 0 = 0\ne✝ : C (bit false 0)\n⊢ Eq.mpr (_ : C (bit false 0) = C 0) z = f false 0 z\n[PROOFSTEP]\nrw [h']\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nh : bit false 0 = 0\ne✝ : C (bit false 0)\n⊢ Eq.mpr (_ : C (bit false 0) = C 0) z = z\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh✝ : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\ncase neg h' =>\n simp [dif_neg h]\n generalize\n @id (C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n))))\n (Eq.symm (bit_decomp (bit b n)) ▸ Eq.refl (C (bit b n))) =\n e\n revert e\n rw [bodd_bit, div2_bit]\n intros; rfl\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\ncase neg h' =>\n simp [dif_neg h]\n generalize\n @id (C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n))))\n (Eq.symm (bit_decomp (bit b n)) ▸ Eq.refl (C (bit b n))) =\n e\n revert e\n rw [bodd_bit, div2_bit]\n intros; rfl\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\nsimp [dif_neg h]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\n⊢ Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n))))\n (f (bodd (bit b n)) (div2 (bit b n)) (binaryRec z f (div2 (bit b n)))) =\n f b n (binaryRec z f n)\n[PROOFSTEP]\ngeneralize\n @id (C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n))))\n (Eq.symm (bit_decomp (bit b n)) ▸ Eq.refl (C (bit b n))) =\n e\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\ne : C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n)))\n⊢ Eq.mpr e (f (bodd (bit b n)) (div2 (bit b n)) (binaryRec z f (div2 (bit b n)))) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrevert e\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\n⊢ ∀ (e : C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n)))),\n Eq.mpr e (f (bodd (bit b n)) (div2 (bit b n)) (binaryRec z f (div2 (bit b n)))) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrw [bodd_bit, div2_bit]\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\n⊢ ∀ (e : C (bit b n) = C (bit b n)), Eq.mpr e (f b n (binaryRec z f n)) = f b n (binaryRec z f n)\n[PROOFSTEP]\nintros\n[GOAL]\nC : ℕ → Sort u\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : f false 0 z = z\nb : Bool\nn : ℕ\nh : ¬bit b n = 0\ne✝ : C (bit b n) = C (bit b n)\n⊢ Eq.mpr e✝ (f b n (binaryRec z f n)) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrfl\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\n⊢ (binaryRec (bif f true false then bit false 0 else 0) fun b n x => bit (f false b) (bif f false true then n else 0)) =\n fun n => bif f false true then n else 0\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nn : ℕ\n⊢ binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))\n n =\n bif f false true then n else 0\n[PROOFSTEP]\napply bitCasesOn n\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nn : ℕ\n⊢ ∀ (b : Bool) (n : ℕ),\n binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))\n (bit b n) =\n bif f false true then bit b n else 0\n[PROOFSTEP]\nintro b n\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))\n (bit b n) =\n bif f false true then bit b n else 0\n[PROOFSTEP]\nrw [binaryRec_eq]\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ bit (f false b) (bif f false true then n else 0) = bif f false true then bit b n else 0\n[PROOFSTEP]\ncases b\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit (f false false) (bif f false true then n else 0) = bif f false true then bit false n else 0\n[PROOFSTEP]\ntry rw [h] <;> induction' fft : f false true <;> simp [cond]\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit (f false false) (bif f false true then n else 0) = bif f false true then bit false n else 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit false (bif f false true then n else 0) = bif f false true then bit false n else 0\n[PROOFSTEP]\ninduction' fft : f false true\n[GOAL]\ncase h.false.false\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\nx✝ : Bool\nfft✝ : f false true = x✝\nfft : f false true = false\n⊢ bit false (bif false then n else 0) = bif false then bit false n else 0\n[PROOFSTEP]\nsimp [cond]\n[GOAL]\ncase h.false.true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\nx✝ : Bool\nfft✝ : f false true = x✝\nfft : f false true = true\n⊢ bit false (bif true then n else 0) = bif true then bit false n else 0\n[PROOFSTEP]\nsimp [cond]\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit (f false true) (bif f false true then n else 0) = bif f false true then bit true n else 0\n[PROOFSTEP]\ntry rw [h] <;> induction' fft : f false true <;> simp [cond]\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit (f false true) (bif f false true then n else 0) = bif f false true then bit true n else 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit (f false true) (bif f false true then n else 0) = bif f false true then bit true n else 0\n[PROOFSTEP]\ncases f false true\n[GOAL]\ncase h.true.false\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit false (bif false then n else 0) = bif false then bit true n else 0\ncase h.true.true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit true (bif true then n else 0) = bif true then bit true n else 0\n[PROOFSTEP]\ncase h.true.false => simp\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit false (bif false then n else 0) = bif false then bit true n else 0\n[PROOFSTEP]\ncase h.true.false => simp\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit false (bif false then n else 0) = bif false then bit true n else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.true.true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit true (bif true then n else 0) = bif true then bit true n else 0\n[PROOFSTEP]\ncase h.true.true => simp\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit true (bif true then n else 0) = bif true then bit true n else 0\n[PROOFSTEP]\ncase h.true.true => simp\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ n : ℕ\n⊢ bit true (bif true then n else 0) = bif true then bit true n else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.h\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ bit (f false false) (bif f false true then 0 else 0) = bif f true false then bit false 0 else 0\n[PROOFSTEP]\nrw [h, show cond (f false true) 0 0 = 0 by cases f false true <;> rfl,\n show cond (f true false) (bit false 0) 0 = 0 by cases f true false <;> rfl]\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ (bif f false true then 0 else 0) = 0\n[PROOFSTEP]\ncases f false true\n[GOAL]\ncase false\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ (bif false then 0 else 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ (bif true then 0 else 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ (bif f true false then bit false 0 else 0) = 0\n[PROOFSTEP]\ncases f true false\n[GOAL]\ncase false\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ (bif false then bit false 0 else 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ (bif true then bit false 0 else 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.h\nf : Bool → Bool → Bool\nh : f false false = false\nn✝ : ℕ\nb : Bool\nn : ℕ\n⊢ bit false 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nf : Bool → Bool → Bool\nn : ℕ\n⊢ bitwise' f 0 n = bif f false true then n else 0\n[PROOFSTEP]\nunfold bitwise'\n[GOAL]\nf : Bool → Bool → Bool\nn : ℕ\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif f true false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) 0 n =\n bif f false true then n else 0\n[PROOFSTEP]\nrw [binaryRec_zero]\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\n⊢ bitwise' f m 0 = bif f true false then m else 0\n[PROOFSTEP]\nunfold bitwise'\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif f true false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n bif f true false then m else 0\n[PROOFSTEP]\napply bitCasesOn m\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\n⊢ ∀ (b : Bool) (n : ℕ),\n binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif f true false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) (bit b n) 0 =\n bif f true false then bit b n else 0\n[PROOFSTEP]\nintros\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nb✝ : Bool\nn✝ : ℕ\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif f true false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) (bit b✝ n✝) 0 =\n bif f true false then bit b✝ n✝ else 0\n[PROOFSTEP]\nrw [binaryRec_eq, binaryRec_zero]\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nb✝ : Bool\nn✝ : ℕ\n⊢ (binaryRec (bif f true false then bit false 0 else 0) fun b n x => bit (f false b) (bif f false true then n else 0)) =\n fun n => bif f false true then n else 0\n[PROOFSTEP]\nexact bitwise'_bit_aux h\n[GOAL]\nf : Bool → Bool → Bool\n⊢ bitwise' f 0 0 = 0\n[PROOFSTEP]\nrw [bitwise'_zero_left]\n[GOAL]\nf : Bool → Bool → Bool\n⊢ (bif f false true then 0 else 0) = 0\n[PROOFSTEP]\ncases f false true\n[GOAL]\ncase false\nf : Bool → Bool → Bool\n⊢ (bif false then 0 else 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nf : Bool → Bool → Bool\n⊢ (bif true then 0 else 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\n⊢ bitwise' f (bit a m) (bit b n) = bit (f a b) (bitwise' f m n)\n[PROOFSTEP]\nunfold bitwise'\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif f true false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) (bit a m)\n (bit b n) =\n bit (f a b)\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif f true false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m n)\n[PROOFSTEP]\nrw [binaryRec_eq, binaryRec_eq]\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\n⊢ bit (f a false)\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif f true false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif f true false then bit a m else 0\n[PROOFSTEP]\ninduction' ftf : f true false\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ bit (f a false)\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif false then bit a m else 0\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ bit (f a false)\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif true then bit a m else 0\n[PROOFSTEP]\nrw [show f a false = false by cases a <;> assumption]\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ f a false = false\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ f false false = false\n[PROOFSTEP]\nassumption\n[GOAL]\ncase true\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ f true false = false\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ bit false\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif false then bit a m else 0\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ bit (f a false)\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif true then bit a m else 0\n[PROOFSTEP]\napply @congr_arg _ _ _ 0 (bit false)\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n 0\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ bit (f a false)\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif true then bit a m else 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ bit (f a false)\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif true then bit a m else 0\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n 0\n[PROOFSTEP]\nrw [show f a false = a by cases a <;> assumption]\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ f a false = a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ f false false = false\n[PROOFSTEP]\nassumption\n[GOAL]\ncase true\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ f true false = true\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ bit a\n (binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0) =\n bif true then bit a m else 0\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n 0\n[PROOFSTEP]\napply congr_arg (bit a)\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n m\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n 0\n[PROOFSTEP]\nall_goals {\n apply bitCasesOn m\n intro a m\n rw [binaryRec_eq, binaryRec_zero]\n · rfl\n · rw [← bitwise'_bit_aux h, ftf]\n}\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n m\n[PROOFSTEP]\n{ apply bitCasesOn m\n intro a m\n rw [binaryRec_eq, binaryRec_zero]\n · rfl\n · rw [← bitwise'_bit_aux h, ftf]\n}\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n m\n[PROOFSTEP]\napply bitCasesOn m\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\n⊢ ∀ (b : Bool) (n : ℕ),\n binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) (bit b n) 0 =\n bit b n\n[PROOFSTEP]\nintro a m\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na✝ : Bool\nm✝ : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\na : Bool\nm : ℕ\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif true then bit a m else 0) fun b n x => bit (f a b) (Ia n)) (bit a m) 0 =\n bit a m\n[PROOFSTEP]\nrw [binaryRec_eq, binaryRec_zero]\n[GOAL]\ncase h.true\nf : Bool → Bool → Bool\nh : f false false = false\na✝ : Bool\nm✝ : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\na : Bool\nm : ℕ\n⊢ (bif true then bit a m else 0) = bit a m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.true.h\nf : Bool → Bool → Bool\nh : f false false = false\na✝ : Bool\nm✝ : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = true\na : Bool\nm : ℕ\n⊢ (binaryRec (bif true then bit false 0 else 0) fun b n x => bit (f false b) (bif f false true then n else 0)) =\n fun n => bif f false true then n else 0\n[PROOFSTEP]\nrw [← bitwise'_bit_aux h, ftf]\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n 0\n[PROOFSTEP]\n{ apply bitCasesOn m\n intro a m\n rw [binaryRec_eq, binaryRec_zero]\n · rfl\n · rw [← bitwise'_bit_aux h, ftf]\n}\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) m 0 =\n 0\n[PROOFSTEP]\napply bitCasesOn m\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\n⊢ ∀ (b : Bool) (n : ℕ),\n binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) (bit b n) 0 =\n 0\n[PROOFSTEP]\nintro a m\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na✝ : Bool\nm✝ : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\na : Bool\nm : ℕ\n⊢ binaryRec (fun n => bif f false true then n else 0)\n (fun a m Ia => binaryRec (bif false then bit a m else 0) fun b n x => bit (f a b) (Ia n)) (bit a m) 0 =\n 0\n[PROOFSTEP]\nrw [binaryRec_eq, binaryRec_zero]\n[GOAL]\ncase h.false\nf : Bool → Bool → Bool\nh : f false false = false\na✝ : Bool\nm✝ : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\na : Bool\nm : ℕ\n⊢ (bif false then bit a m else 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.false.h\nf : Bool → Bool → Bool\nh : f false false = false\na✝ : Bool\nm✝ : ℕ\nb : Bool\nn : ℕ\nx✝ : Bool\nftf✝ : f true false = x✝\nftf : f true false = false\na : Bool\nm : ℕ\n⊢ (binaryRec (bif false then bit false 0 else 0) fun b n x => bit (f false b) (bif f false true then n else 0)) =\n fun n => bif f false true then n else 0\n[PROOFSTEP]\nrw [← bitwise'_bit_aux h, ftf]\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\na : Bool\nm : ℕ\nb : Bool\nn : ℕ\n⊢ (binaryRec (bif f true false then bit false 0 else 0) fun b n x => bit (f false b) (bif f false true then n else 0)) =\n fun n => bif f false true then n else 0\n[PROOFSTEP]\nexact bitwise'_bit_aux h\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\n⊢ bitwise' (Function.swap f) = Function.swap (bitwise' f)\n[PROOFSTEP]\nfunext m n\n[GOAL]\ncase h.h\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\n⊢ bitwise' (Function.swap f) m n = Function.swap (bitwise' f) m n\n[PROOFSTEP]\nrevert n\n[GOAL]\ncase h.h\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\n⊢ ∀ (n : ℕ), bitwise' (Function.swap f) m n = Function.swap (bitwise' f) m n\n[PROOFSTEP]\ndsimp [Function.swap]\n[GOAL]\ncase h.h\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\n⊢ ∀ (n : ℕ), bitwise' (fun y x => f x y) m n = bitwise' f n m\n[PROOFSTEP]\napply binaryRec _ _ m\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\n⊢ ∀ (n : ℕ), bitwise' (fun y x => f x y) 0 n = bitwise' f n 0\n[PROOFSTEP]\nintro n\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\n⊢ ∀ (b : Bool) (n : ℕ),\n (∀ (n_1 : ℕ), bitwise' (fun y x => f x y) n n_1 = bitwise' f n_1 n) →\n ∀ (n_1 : ℕ), bitwise' (fun y x => f x y) (bit b n) n_1 = bitwise' f n_1 (bit b n)\n[PROOFSTEP]\nintro n\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\n⊢ bitwise' (fun y x => f x y) 0 n = bitwise' f n 0\n[PROOFSTEP]\nrw [bitwise'_zero_left, bitwise'_zero_right]\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\n⊢ f false false = false\n[PROOFSTEP]\nexact h\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nn : Bool\n⊢ ∀ (n_1 : ℕ),\n (∀ (n : ℕ), bitwise' (fun y x => f x y) n_1 n = bitwise' f n n_1) →\n ∀ (n_2 : ℕ), bitwise' (fun y x => f x y) (bit n n_1) n_2 = bitwise' f n_2 (bit n n_1)\n[PROOFSTEP]\nintros a ih m'\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nn : Bool\na : ℕ\nih : ∀ (n : ℕ), bitwise' (fun y x => f x y) a n = bitwise' f n a\nm' : ℕ\n⊢ bitwise' (fun y x => f x y) (bit n a) m' = bitwise' f m' (bit n a)\n[PROOFSTEP]\napply bitCasesOn m'\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nn : Bool\na : ℕ\nih : ∀ (n : ℕ), bitwise' (fun y x => f x y) a n = bitwise' f n a\nm' : ℕ\n⊢ ∀ (b : Bool) (n_1 : ℕ), bitwise' (fun y x => f x y) (bit n a) (bit b n_1) = bitwise' f (bit b n_1) (bit n a)\n[PROOFSTEP]\nintro b n'\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nn : Bool\na : ℕ\nih : ∀ (n : ℕ), bitwise' (fun y x => f x y) a n = bitwise' f n a\nm' : ℕ\nb : Bool\nn' : ℕ\n⊢ bitwise' (fun y x => f x y) (bit n a) (bit b n') = bitwise' f (bit b n') (bit n a)\n[PROOFSTEP]\nrw [bitwise'_bit, bitwise'_bit, ih]\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nn : Bool\na : ℕ\nih : ∀ (n : ℕ), bitwise' (fun y x => f x y) a n = bitwise' f n a\nm' : ℕ\nb : Bool\nn' : ℕ\n⊢ f false false = false\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h\nf : Bool → Bool → Bool\nh : f false false = false\nm : ℕ\nn : Bool\na : ℕ\nih : ∀ (n : ℕ), bitwise' (fun y x => f x y) a n = bitwise' f n a\nm' : ℕ\nb : Bool\nn' : ℕ\n⊢ f false false = false\n[PROOFSTEP]\nexact h\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nm n k : ℕ\n⊢ testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\n[PROOFSTEP]\nrevert m n\n[GOAL]\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\n⊢ ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\nf : Bool → Bool → Bool\nh : f false false = false\n⊢ ∀ (m n : ℕ), testBit (bitwise' f m n) zero = f (testBit m zero) (testBit n zero)\n[PROOFSTEP]\nintros m n\n[GOAL]\ncase succ\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\nIH : ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\n⊢ ∀ (m n : ℕ), testBit (bitwise' f m n) (succ k) = f (testBit m (succ k)) (testBit n (succ k))\n[PROOFSTEP]\nintros m n\n[GOAL]\ncase zero\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\n⊢ testBit (bitwise' f m n) zero = f (testBit m zero) (testBit n zero)\n[PROOFSTEP]\napply bitCasesOn m\n[GOAL]\ncase succ\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\nIH : ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\nm n : ℕ\n⊢ testBit (bitwise' f m n) (succ k) = f (testBit m (succ k)) (testBit n (succ k))\n[PROOFSTEP]\napply bitCasesOn m\n[GOAL]\ncase zero\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\n⊢ ∀ (b : Bool) (n_1 : ℕ), testBit (bitwise' f (bit b n_1) n) zero = f (testBit (bit b n_1) zero) (testBit n zero)\n[PROOFSTEP]\nintros a m'\n[GOAL]\ncase succ\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\nIH : ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\nm n : ℕ\n⊢ ∀ (b : Bool) (n_1 : ℕ),\n testBit (bitwise' f (bit b n_1) n) (succ k) = f (testBit (bit b n_1) (succ k)) (testBit n (succ k))\n[PROOFSTEP]\nintros a m'\n[GOAL]\ncase zero\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\na : Bool\nm' : ℕ\n⊢ testBit (bitwise' f (bit a m') n) zero = f (testBit (bit a m') zero) (testBit n zero)\n[PROOFSTEP]\napply bitCasesOn n\n[GOAL]\ncase succ\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\nIH : ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\nm n : ℕ\na : Bool\nm' : ℕ\n⊢ testBit (bitwise' f (bit a m') n) (succ k) = f (testBit (bit a m') (succ k)) (testBit n (succ k))\n[PROOFSTEP]\napply bitCasesOn n\n[GOAL]\ncase zero\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\na : Bool\nm' : ℕ\n⊢ ∀ (b : Bool) (n : ℕ),\n testBit (bitwise' f (bit a m') (bit b n)) zero = f (testBit (bit a m') zero) (testBit (bit b n) zero)\n[PROOFSTEP]\nintros b n'\n[GOAL]\ncase succ\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\nIH : ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\nm n : ℕ\na : Bool\nm' : ℕ\n⊢ ∀ (b : Bool) (n : ℕ),\n testBit (bitwise' f (bit a m') (bit b n)) (succ k) = f (testBit (bit a m') (succ k)) (testBit (bit b n) (succ k))\n[PROOFSTEP]\nintros b n'\n[GOAL]\ncase zero\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\na : Bool\nm' : ℕ\nb : Bool\nn' : ℕ\n⊢ testBit (bitwise' f (bit a m') (bit b n')) zero = f (testBit (bit a m') zero) (testBit (bit b n') zero)\n[PROOFSTEP]\nrw [bitwise'_bit h]\n[GOAL]\ncase succ\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\nIH : ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\nm n : ℕ\na : Bool\nm' : ℕ\nb : Bool\nn' : ℕ\n⊢ testBit (bitwise' f (bit a m') (bit b n')) (succ k) = f (testBit (bit a m') (succ k)) (testBit (bit b n') (succ k))\n[PROOFSTEP]\nrw [bitwise'_bit h]\n[GOAL]\ncase zero\nf : Bool → Bool → Bool\nh : f false false = false\nm n : ℕ\na : Bool\nm' : ℕ\nb : Bool\nn' : ℕ\n⊢ testBit (bit (f a b) (bitwise' f m' n')) zero = f (testBit (bit a m') zero) (testBit (bit b n') zero)\n[PROOFSTEP]\nsimp [testBit_zero]\n[GOAL]\ncase succ\nf : Bool → Bool → Bool\nh : f false false = false\nk : ℕ\nIH : ∀ (m n : ℕ), testBit (bitwise' f m n) k = f (testBit m k) (testBit n k)\nm n : ℕ\na : Bool\nm' : ℕ\nb : Bool\nn' : ℕ\n⊢ testBit (bit (f a b) (bitwise' f m' n')) (succ k) = f (testBit (bit a m') (succ k)) (testBit (bit b n') (succ k))\n[PROOFSTEP]\nsimp [testBit_succ, IH]\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Nat.Bitwise", "llama_tokens": 24222, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8615382236515259, "lm_q2_score": 0.7279754548076477, "lm_q1q2_score": 0.6271786801968925}} {"text": "[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet A := toMatrix b b f\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet b' := chooseBasis R M\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet ι' := ChooseBasisIndex R M\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet A' := toMatrix b' b' f\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet e := Basis.indexEquiv b b'\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet φ := reindexLinearEquiv R R e e\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet φ₁ := reindexLinearEquiv R R e (Equiv.refl ι')\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet φ₂ := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet φ₃ := reindexLinearEquiv R R (Equiv.refl ι') e\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet P := b.toMatrix b'\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nlet Q := b'.toMatrix b\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\nhave hPQ : C.mapMatrix (φ₁ P) * C.mapMatrix (φ₃ Q) = 1 := by\n rw [RingHom.mapMatrix_apply, RingHom.mapMatrix_apply, ← Matrix.map_mul, reindexLinearEquiv_mul R R,\n Basis.toMatrix_mul_toMatrix_flip, reindexLinearEquiv_one, ← RingHom.mapMatrix_apply, RingHom.map_one]\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\n⊢ ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n[PROOFSTEP]\nrw [RingHom.mapMatrix_apply, RingHom.mapMatrix_apply, ← Matrix.map_mul, reindexLinearEquiv_mul R R,\n Basis.toMatrix_mul_toMatrix_flip, reindexLinearEquiv_one, ← RingHom.mapMatrix_apply, RingHom.map_one]\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f\n[PROOFSTEP]\ncalc\n A.charpoly = (reindex e e A).charpoly := (charpoly_reindex _ _).symm\n _ = det (scalar ι' X - C.mapMatrix (φ A)) := rfl\n _ = det (scalar ι' X - C.mapMatrix (φ (P * A' * Q))) := by\n rw [basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix]\n _ = det (scalar ι' X - C.mapMatrix (φ₁ P * φ₂ A' * φ₃ Q)) := by rw [reindexLinearEquiv_mul, reindexLinearEquiv_mul]\n _ = det (scalar ι' X - C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) := by simp\n _ =\n det\n (scalar ι' X * C.mapMatrix (φ₁ P) * C.mapMatrix (φ₃ Q) -\n C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) :=\n by rw [Matrix.mul_assoc ((scalar ι') X), hPQ, Matrix.mul_one]\n _ =\n det\n (C.mapMatrix (φ₁ P) * scalar ι' X * C.mapMatrix (φ₃ Q) -\n C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) :=\n by simp\n _ = det (C.mapMatrix (φ₁ P) * (scalar ι' X - C.mapMatrix A') * C.mapMatrix (φ₃ Q)) := by\n rw [← Matrix.sub_mul, ← Matrix.mul_sub]\n _ = det (C.mapMatrix (φ₁ P)) * det (scalar ι' X - C.mapMatrix A') * det (C.mapMatrix (φ₃ Q)) := by\n rw [det_mul, det_mul]\n _ = det (C.mapMatrix (φ₁ P)) * det (C.mapMatrix (φ₃ Q)) * det (scalar ι' X - C.mapMatrix A') := by ring\n _ = det (scalar ι' X - C.mapMatrix A') := by rw [← det_mul, hPQ, det_one, one_mul]\n _ = f.charpoly := rfl\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ A)) = det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ (P * A' * Q)))\n[PROOFSTEP]\nrw [basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix]\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ (P * A' * Q))) =\n det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P * ↑φ₂ A' * ↑φ₃ Q))\n[PROOFSTEP]\nrw [reindexLinearEquiv_mul, reindexLinearEquiv_mul]\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P * ↑φ₂ A' * ↑φ₃ Q)) =\n det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =\n det\n (↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -\n ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q))\n[PROOFSTEP]\nrw [Matrix.mul_assoc ((scalar ι') X), hPQ, Matrix.mul_one]\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det\n (↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -\n ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =\n det\n (↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -\n ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det\n (↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -\n ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =\n det (↑(RingHom.mapMatrix C) (↑φ₁ P) * (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') * ↑(RingHom.mapMatrix C) (↑φ₃ Q))\n[PROOFSTEP]\nrw [← Matrix.sub_mul, ← Matrix.mul_sub]\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det (↑(RingHom.mapMatrix C) (↑φ₁ P) * (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =\n det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') *\n det (↑(RingHom.mapMatrix C) (↑φ₃ Q))\n[PROOFSTEP]\nrw [det_mul, det_mul]\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') *\n det (↑(RingHom.mapMatrix C) (↑φ₃ Q)) =\n det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(RingHom.mapMatrix C) (↑φ₃ Q)) *\n det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A')\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u\nM : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module.Free R M\ninst✝² : Module.Finite R M\nf : M →ₗ[R] M\nι : Type w\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nb : Basis ι R M\nA : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f\nb' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M\nι' : Type v := ChooseBasisIndex R M\nA' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f\ne : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'\nφ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e\nφ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')\nφ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')\nφ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e\nP : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'\nQ : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b\nhPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1\n⊢ det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(RingHom.mapMatrix C) (↑φ₃ Q)) *\n det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') =\n det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A')\n[PROOFSTEP]\nrw [← det_mul, hPQ, det_one, one_mul]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Charpoly.ToMatrix", "llama_tokens": 12322, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.863391599428538, "lm_q2_score": 0.724870282120402, "lm_q1q2_score": 0.6258469122581496}} {"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\ns t : Set E\nx✝ : E\ninst✝ : NormedSpace ℝ E\nx : E\nr : ℝ\nh : DiffContOnCl 𝕜 f (ball x r)\n⊢ ContinuousOn f (closedBall x r)\n[PROOFSTEP]\nrcases eq_or_ne r 0 with (rfl | hr)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\ns t : Set E\nx✝ : E\ninst✝ : NormedSpace ℝ E\nx : E\nh : DiffContOnCl 𝕜 f (ball x 0)\n⊢ ContinuousOn f (closedBall x 0)\n[PROOFSTEP]\nrw [closedBall_zero]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\ns t : Set E\nx✝ : E\ninst✝ : NormedSpace ℝ E\nx : E\nh : DiffContOnCl 𝕜 f (ball x 0)\n⊢ ContinuousOn f {x}\n[PROOFSTEP]\nexact continuousOn_singleton f x\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\ns t : Set E\nx✝ : E\ninst✝ : NormedSpace ℝ E\nx : E\nr : ℝ\nh : DiffContOnCl 𝕜 f (ball x r)\nhr : r ≠ 0\n⊢ ContinuousOn f (closedBall x r)\n[PROOFSTEP]\nrw [← closure_ball x hr]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\ns t : Set E\nx✝ : E\ninst✝ : NormedSpace ℝ E\nx : E\nr : ℝ\nh : DiffContOnCl 𝕜 f (ball x r)\nhr : r ≠ 0\n⊢ ContinuousOn f (closure (ball x r))\n[PROOFSTEP]\nexact h.continuousOn\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.DiffContOnCl", "llama_tokens": 1106, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289388083214156, "lm_q2_score": 0.7549149923816048, "lm_q1q2_score": 0.625778334168778}} {"text": "[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\n⊢ closedBall x ε =ᶠ[ae volume] ball x ε\n[PROOFSTEP]\ncases' le_or_lt ε 0 with hε hε\n[GOAL]\ncase inl\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : ε ≤ 0\n⊢ closedBall x ε =ᶠ[ae volume] ball x ε\n[PROOFSTEP]\nrw [ball_eq_empty.mpr hε, ae_eq_empty, volume_closedBall, min_eq_right (by linarith [hT.out] : 2 * ε ≤ T),\n ENNReal.ofReal_eq_zero]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : ε ≤ 0\n⊢ 2 * ε ≤ T\n[PROOFSTEP]\nlinarith [hT.out]\n[GOAL]\ncase inl\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : ε ≤ 0\n⊢ 2 * ε ≤ 0\n[PROOFSTEP]\nexact mul_nonpos_of_nonneg_of_nonpos zero_le_two hε\n[GOAL]\ncase inr\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\n⊢ closedBall x ε =ᶠ[ae volume] ball x ε\n[PROOFSTEP]\nsuffices volume (closedBall x ε) ≤ volume (ball x ε) by\n exact (ae_eq_of_subset_of_measure_ge ball_subset_closedBall this measurableSet_ball (measure_ne_top _ _)).symm\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\nthis : ↑↑volume (closedBall x ε) ≤ ↑↑volume (ball x ε)\n⊢ closedBall x ε =ᶠ[ae volume] ball x ε\n[PROOFSTEP]\nexact (ae_eq_of_subset_of_measure_ge ball_subset_closedBall this measurableSet_ball (measure_ne_top _ _)).symm\n[GOAL]\ncase inr\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\n⊢ ↑↑volume (closedBall x ε) ≤ ↑↑volume (ball x ε)\n[PROOFSTEP]\nhave : Tendsto (fun δ => volume (closedBall x δ)) (𝓝[<] ε) (𝓝 <| volume (closedBall x ε)) :=\n by\n simp_rw [volume_closedBall]\n refine' ENNReal.tendsto_ofReal (Tendsto.min tendsto_const_nhds <| Tendsto.const_mul _ _)\n convert (@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε\n simp\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\n⊢ Tendsto (fun δ => ↑↑volume (closedBall x δ)) (𝓝[Iio ε] ε) (𝓝 (↑↑volume (closedBall x ε)))\n[PROOFSTEP]\nsimp_rw [volume_closedBall]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\n⊢ Tendsto (fun δ => ENNReal.ofReal (min T (2 * δ))) (𝓝[Iio ε] ε) (𝓝 (ENNReal.ofReal (min T (2 * ε))))\n[PROOFSTEP]\nrefine' ENNReal.tendsto_ofReal (Tendsto.min tendsto_const_nhds <| Tendsto.const_mul _ _)\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\n⊢ Tendsto (fun k => k) (𝓝[Iio ε] ε) (𝓝 ε)\n[PROOFSTEP]\nconvert (@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε\n[GOAL]\ncase h.e'_5.h.e'_3\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\n⊢ ε = sSup (id '' Iio ε)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\nthis : Tendsto (fun δ => ↑↑volume (closedBall x δ)) (𝓝[Iio ε] ε) (𝓝 (↑↑volume (closedBall x ε)))\n⊢ ↑↑volume (closedBall x ε) ≤ ↑↑volume (ball x ε)\n[PROOFSTEP]\nrefine' le_of_tendsto this (mem_nhdsWithin_Iio_iff_exists_Ioo_subset.mpr ⟨0, hε, fun r hr => _⟩)\n[GOAL]\ncase inr\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhε : 0 < ε\nthis : Tendsto (fun δ => ↑↑volume (closedBall x δ)) (𝓝[Iio ε] ε) (𝓝 (↑↑volume (closedBall x ε)))\nr : ℝ\nhr : r ∈ Ioo 0 ε\n⊢ r ∈ {x_1 | (fun c => ↑↑volume (closedBall x c) ≤ ↑↑volume (ball x ε)) x_1}\n[PROOFSTEP]\nexact measure_mono (closedBall_subset_ball hr.2)\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\n⊢ IsAddFundamentalDomain { x // x ∈ AddSubgroup.zmultiples u } I\n[PROOFSTEP]\nset G := AddSubgroup.zmultiples u\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\n⊢ IsAddFundamentalDomain { x // x ∈ G } I\n[PROOFSTEP]\nset n := addOrderOf u\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑n))\n⊢ IsAddFundamentalDomain { x // x ∈ G } I\n[PROOFSTEP]\nset B := ball x (T / (2 * n))\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\n⊢ IsAddFundamentalDomain { x // x ∈ G } I\n[PROOFSTEP]\nhave hn : 1 ≤ (n : ℝ) := by norm_cast; linarith [addOrderOf_pos' hu]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\n⊢ 1 ≤ ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\n⊢ 1 ≤ n\n[PROOFSTEP]\nlinarith [addOrderOf_pos' hu]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\n⊢ IsAddFundamentalDomain { x // x ∈ G } I\n[PROOFSTEP]\nrefine' IsAddFundamentalDomain.mk_of_measure_univ_le _ _ _ _\n[GOAL]\ncase refine'_1\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\n⊢ NullMeasurableSet I\n[PROOFSTEP]\nexact measurableSet_ball.nullMeasurableSet.congr hI.symm\n[GOAL]\ncase refine'_2\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\n⊢ ∀ (g : { x // x ∈ G }), g ≠ 0 → AEDisjoint volume (g +ᵥ I) I\n[PROOFSTEP]\nrintro ⟨g, hg⟩ hg'\n[GOAL]\ncase refine'_2.mk\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : { val := g, property := hg } ≠ 0\n⊢ AEDisjoint volume ({ val := g, property := hg } +ᵥ I) I\n[PROOFSTEP]\nreplace hg' : g ≠ 0\n[GOAL]\ncase hg'\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : { val := g, property := hg } ≠ 0\n⊢ g ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'\n[GOAL]\ncase refine'_2.mk\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\n⊢ AEDisjoint volume ({ val := g, property := hg } +ᵥ I) I\n[PROOFSTEP]\nchange AEDisjoint volume (g +ᵥ I) I\n[GOAL]\ncase refine'_2.mk\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\n⊢ AEDisjoint volume (g +ᵥ I) I\n[PROOFSTEP]\nrefine'\n AEDisjoint.congr (Disjoint.aedisjoint _) ((quasiMeasurePreserving_add_left volume (-g)).vadd_ae_eq_of_ae_eq g hI) hI\n[GOAL]\ncase refine'_2.mk\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\n⊢ Disjoint (g +ᵥ B) B\n[PROOFSTEP]\nhave hBg : g +ᵥ B = ball (g + x) (T / (2 * n)) := by\n rw [add_comm g x, ← singleton_add_ball _ x g, add_ball, thickening_singleton]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\n⊢ g +ᵥ B = ball (g + x) (T / (2 * ↑n))\n[PROOFSTEP]\nrw [add_comm g x, ← singleton_add_ball _ x g, add_ball, thickening_singleton]\n[GOAL]\ncase refine'_2.mk\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\nhBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))\n⊢ Disjoint (g +ᵥ B) B\n[PROOFSTEP]\nrw [hBg]\n[GOAL]\ncase refine'_2.mk\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\nhBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))\n⊢ Disjoint (ball (g + x) (T / (2 * ↑n))) B\n[PROOFSTEP]\napply ball_disjoint_ball\n[GOAL]\ncase refine'_2.mk.h\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\nhBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))\n⊢ T / (2 * ↑n) + T / (2 * ↑n) ≤ dist (g + x) x\n[PROOFSTEP]\nrw [dist_eq_norm, add_sub_cancel, div_mul_eq_div_div, ← add_div, ← add_div, add_self_div_two,\n div_le_iff' (by positivity : 0 < (n : ℝ)), ← nsmul_eq_mul]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\nhBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))\n⊢ 0 < ↑n\n[PROOFSTEP]\npositivity\n[GOAL]\ncase refine'_2.mk.h\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\nhBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))\n⊢ T ≤ n • ‖g‖\n[PROOFSTEP]\nrefine'\n (le_add_order_smul_norm_of_isOfFinAddOrder (hu.of_mem_zmultiples hg) hg').trans (nsmul_le_nsmul (norm_nonneg g) _)\n[GOAL]\ncase refine'_2.mk.h\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\ng : AddCircle T\nhg : g ∈ G\nhg' : g ≠ 0\nhBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))\n⊢ addOrderOf g ≤ n\n[PROOFSTEP]\nexact Nat.le_of_dvd (addOrderOf_pos_iff.mpr hu) (addOrderOf_dvd_of_mem_zmultiples hg)\n[GOAL]\ncase refine'_3\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\n⊢ ∀ (g : { x // x ∈ G }), QuasiMeasurePreserving ((fun x x_1 => x +ᵥ x_1) g)\n[PROOFSTEP]\nexact fun g => quasiMeasurePreserving_add_left (G := AddCircle T) volume g\n[GOAL]\ncase refine'_4\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhI : I =ᶠ[ae volume] B\nhn : 1 ≤ ↑n\n⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)\n[PROOFSTEP]\nreplace hI := hI.trans closedBall_ae_eq_ball.symm\n[GOAL]\ncase refine'_4\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\n⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)\n[PROOFSTEP]\nhaveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples\n[GOAL]\ncase refine'_4\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\nthis : Fintype { x // x ∈ G }\n⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)\n[PROOFSTEP]\nhave hG_card : (Finset.univ : Finset G).card = n :=\n by\n show _ = addOrderOf u\n rw [add_order_eq_card_zmultiples', Nat.card_eq_fintype_card]; rfl\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\nthis : Fintype { x // x ∈ G }\n⊢ Finset.card Finset.univ = n\n[PROOFSTEP]\nshow _ = addOrderOf u\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\nthis : Fintype { x // x ∈ G }\n⊢ Finset.card Finset.univ = addOrderOf u\n[PROOFSTEP]\nrw [add_order_eq_card_zmultiples', Nat.card_eq_fintype_card]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\nthis : Fintype { x // x ∈ G }\n⊢ Finset.card Finset.univ = Fintype.card { x // x ∈ AddSubgroup.zmultiples u }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\nthis : Fintype { x // x ∈ G }\nhG_card : Finset.card Finset.univ = n\n⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)\n[PROOFSTEP]\nsimp_rw [measure_vadd]\n[GOAL]\ncase refine'_4\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\nthis : Fintype { x // x ∈ G }\nhG_card : Finset.card Finset.univ = n\n⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ AddSubgroup.zmultiples u }), ↑↑volume I\n[PROOFSTEP]\nrw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI, volume_closedBall, ← ENNReal.ofReal_nsmul,\n mul_div, mul_div_mul_comm, div_self, one_mul, min_eq_right (div_le_self hT.out.le hn), hG_card, nsmul_eq_mul,\n mul_div_cancel' T (lt_of_lt_of_le zero_lt_one hn).ne.symm]\n[GOAL]\ncase refine'_4\nT : ℝ\nhT : Fact (0 < T)\nI : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nn : ℕ := addOrderOf u\nB : Set (AddCircle T) := ball x (T / (2 * ↑n))\nhn : 1 ≤ ↑n\nhI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))\nthis : Fintype { x // x ∈ G }\nhG_card : Finset.card Finset.univ = n\n⊢ 2 ≠ 0\n[PROOFSTEP]\nexact two_ne_zero\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\ns I : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhs : u +ᵥ s =ᶠ[ae volume] s\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\n⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)\n[PROOFSTEP]\nlet G := AddSubgroup.zmultiples u\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\ns I : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhs : u +ᵥ s =ᶠ[ae volume] s\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\n⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)\n[PROOFSTEP]\nhaveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\ns I : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhs : u +ᵥ s =ᶠ[ae volume] s\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nthis : Fintype { x // x ∈ G }\n⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)\n[PROOFSTEP]\nhave hsG : ∀ g : G, (g +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s := by rintro ⟨y, hy⟩;\n exact (vadd_ae_eq_self_of_mem_zmultiples hs hy : _)\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\ns I : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhs : u +ᵥ s =ᶠ[ae volume] s\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nthis : Fintype { x // x ∈ G }\n⊢ ∀ (g : { x // x ∈ G }), g +ᵥ s =ᶠ[ae volume] s\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase mk\nT : ℝ\nhT : Fact (0 < T)\ns I : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhs : u +ᵥ s =ᶠ[ae volume] s\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nthis : Fintype { x // x ∈ G }\ny : AddCircle T\nhy : y ∈ G\n⊢ { val := y, property := hy } +ᵥ s =ᶠ[ae volume] s\n[PROOFSTEP]\nexact (vadd_ae_eq_self_of_mem_zmultiples hs hy : _)\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\ns I : Set (AddCircle T)\nu x : AddCircle T\nhu : IsOfFinAddOrder u\nhs : u +ᵥ s =ᶠ[ae volume] s\nhI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))\nG : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u\nthis : Fintype { x // x ∈ G }\nhsG : ∀ (g : { x // x ∈ G }), g +ᵥ s =ᶠ[ae volume] s\n⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)\n[PROOFSTEP]\nrw [(isAddFundamentalDomain_of_ae_ball I u x hu hI).measure_eq_card_smul_of_vadd_ae_eq_self s hsG,\n add_order_eq_card_zmultiples' u, Nat.card_eq_fintype_card]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Group.AddCircle", "llama_tokens": 9168, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357494949105, "lm_q2_score": 0.7217432182679956, "lm_q1q2_score": 0.6257771721938603}} {"text": "[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set X\nf g : C(X, R)\nhf : f ∈ {f | ∀ (x : X), x ∈ sᶜ → ↑f x = 0}\nhg : g ∈ {f | ∀ (x : X), x ∈ sᶜ → ↑f x = 0}\nx : X\nhx : x ∈ sᶜ\n⊢ ↑(f + g) x = 0\n[PROOFSTEP]\nsimp [hf x hx, hg x hx, coe_add, Pi.add_apply, add_zero]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝⁴ : TopologicalSpace X\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : T2Space R\ns : Set X\n⊢ IsClosed ↑(idealOfSet R s)\n[PROOFSTEP]\nsimp only [idealOfSet, Submodule.coe_set_mk, Set.setOf_forall]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝⁴ : TopologicalSpace X\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : T2Space R\ns : Set X\n⊢ IsClosed\n ↑{\n toAddSubsemigroup :=\n { carrier := ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0},\n add_mem' :=\n (_ :\n ∀ {a b : C(X, R)},\n a ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} →\n b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} → a + b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0}) },\n zero_mem' :=\n (_ :\n 0 ∈\n { carrier := ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0},\n add_mem' :=\n (_ :\n ∀ {a b : C(X, R)},\n a ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} →\n b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} →\n a + b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0}) }.carrier) }\n[PROOFSTEP]\nexact isClosed_iInter fun x => isClosed_iInter fun _ => isClosed_eq (continuous_eval_const x) continuous_const\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set X\nf : C(X, R)\n⊢ f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0\n[PROOFSTEP]\nconvert Iff.rfl\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set X\nf : C(X, R)\n⊢ ¬f ∈ idealOfSet R s ↔ ∃ x, x ∈ sᶜ ∧ ↑f x ≠ 0\n[PROOFSTEP]\nsimp_rw [mem_idealOfSet]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set X\nf : C(X, R)\n⊢ (¬∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ↔ ∃ x, x ∈ sᶜ ∧ ↑f x ≠ 0\n[PROOFSTEP]\npush_neg\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set X\nf : C(X, R)\n⊢ (Exists fun ⦃x⦄ => x ∈ sᶜ ∧ ↑f x ≠ 0) ↔ ∃ x, x ∈ sᶜ ∧ ↑f x ≠ 0\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\nx : X\n⊢ ¬x ∈ setOfIdeal I ↔ ∀ ⦃f : C(X, R)⦄, f ∈ I → ↑f x = 0\n[PROOFSTEP]\nrw [← Set.mem_compl_iff, setOfIdeal, compl_compl, Set.mem_setOf]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\nx : X\n⊢ x ∈ setOfIdeal I ↔ ∃ f, f ∈ I ∧ ↑f x ≠ 0\n[PROOFSTEP]\nsimp_rw [setOfIdeal, Set.mem_compl_iff, Set.mem_setOf]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\nx : X\n⊢ (¬∀ (f : C(X, R)), f ∈ I → ↑f x = 0) ↔ ∃ f, f ∈ I ∧ ↑f x ≠ 0\n[PROOFSTEP]\npush_neg\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\nx : X\n⊢ (∃ f, f ∈ I ∧ ↑f x ≠ 0) ↔ ∃ f, f ∈ I ∧ ↑f x ≠ 0\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝⁴ : TopologicalSpace X\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : T2Space R\nI : Ideal C(X, R)\n⊢ IsOpen (setOfIdeal I)\n[PROOFSTEP]\nsimp only [setOfIdeal, Set.setOf_forall, isOpen_compl_iff]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝⁴ : TopologicalSpace X\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : T2Space R\nI : Ideal C(X, R)\n⊢ IsClosed (⋂ (i : C(X, R)) (_ : i ∈ I), {x | ↑i x = 0})\n[PROOFSTEP]\nexact isClosed_iInter fun f => isClosed_iInter fun _ => isClosed_eq (map_continuous f) continuous_const\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nf : C(X, R)\n⊢ f ∈ idealOfSet R ∅ ↔ f ∈ ⊥\n[PROOFSTEP]\nsimp only [mem_idealOfSet, Set.compl_empty, Set.mem_univ, forall_true_left, Ideal.mem_bot, FunLike.ext_iff, zero_apply]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nx : X\nf : C(X, R)\n⊢ f ∈ idealOfSet R {x}ᶜ ↔ ↑f x = 0\n[PROOFSTEP]\nsimp only [mem_idealOfSet, compl_compl, Set.mem_singleton_iff, forall_eq]\n[GOAL]\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\n⊢ GaloisConnection setOfIdeal (idealOfSet R)\n[PROOFSTEP]\nrefine' fun I s => ⟨fun h f hf => _, fun h x hx => _⟩\n[GOAL]\ncase refine'_1\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\ns : Set X\nh : setOfIdeal I ≤ s\nf : C(X, R)\nhf : f ∈ I\n⊢ f ∈ idealOfSet R s\n[PROOFSTEP]\nby_contra h'\n[GOAL]\ncase refine'_1\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\ns : Set X\nh : setOfIdeal I ≤ s\nf : C(X, R)\nhf : f ∈ I\nh' : ¬f ∈ idealOfSet R s\n⊢ False\n[PROOFSTEP]\nrcases not_mem_idealOfSet.mp h' with ⟨x, hx, hfx⟩\n[GOAL]\ncase refine'_1.intro.intro\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\ns : Set X\nh : setOfIdeal I ≤ s\nf : C(X, R)\nhf : f ∈ I\nh' : ¬f ∈ idealOfSet R s\nx : X\nhx : x ∈ sᶜ\nhfx : ↑f x ≠ 0\n⊢ False\n[PROOFSTEP]\nexact hfx (not_mem_setOfIdeal.mp (mt (@h x) hx) hf)\n[GOAL]\ncase refine'_2\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\ns : Set X\nh : I ≤ idealOfSet R s\nx : X\nhx : x ∈ setOfIdeal I\n⊢ x ∈ s\n[PROOFSTEP]\nobtain ⟨f, hf, hfx⟩ := mem_setOfIdeal.mp hx\n[GOAL]\ncase refine'_2.intro.intro\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\ns : Set X\nh : I ≤ idealOfSet R s\nx : X\nhx : x ∈ setOfIdeal I\nf : C(X, R)\nhf : f ∈ I\nhfx : ↑f x ≠ 0\n⊢ x ∈ s\n[PROOFSTEP]\nby_contra hx'\n[GOAL]\ncase refine'_2.intro.intro\nX : Type u_1\nR : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nI : Ideal C(X, R)\ns : Set X\nh : I ≤ idealOfSet R s\nx : X\nhx : x ∈ setOfIdeal I\nf : C(X, R)\nhf : f ∈ I\nhfx : ↑f x ≠ 0\nhx' : ¬x ∈ s\n⊢ False\n[PROOFSTEP]\nexact not_mem_idealOfSet.mpr ⟨x, hx', hfx⟩ (h hf)\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nf : C(X, ℝ≥0)\nc : ℝ≥0\nhc : 0 < c\nx : X\nhx : x ∈ {x | c ≤ ↑f x}\n⊢ ↑(mk (↑f ⊔ ↑(const X c))⁻¹ * f) x = OfNat.ofNat 1 x\n[PROOFSTEP]\nsimpa only [coe_const, ge_iff_le, mul_apply, coe_mk, Pi.inv_apply, Pi.sup_apply, Function.const_apply,\n sup_eq_left.mpr (Set.mem_setOf.mp hx), ne_eq, Pi.one_apply] using inv_mul_cancel (hc.trans_le hx).ne'\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\n⊢ idealOfSet 𝕜 (setOfIdeal I) = Ideal.closure I\n[PROOFSTEP]\nrefine'\n le_antisymm _\n ((idealOfSet_closed 𝕜 <| setOfIdeal I).closure_subset_iff.mpr fun f hf x hx => not_mem_setOfIdeal.mp hx hf)\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\n⊢ idealOfSet 𝕜 (setOfIdeal I) ≤ Ideal.closure I\n[PROOFSTEP]\nrefine' (fun f hf => Metric.mem_closure_iff.mpr fun ε hε => _)\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ\nhε : ε > 0\n⊢ ∃ b, b ∈ ↑I ∧ dist f b < ε\n[PROOFSTEP]\nlift ε to ℝ≥0 using hε.lt.le\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : ↑ε > 0\n⊢ ∃ b, b ∈ ↑I ∧ dist f b < ↑ε\n[PROOFSTEP]\nreplace hε := show (0 : ℝ≥0) < ε from hε\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\n⊢ ∃ b, b ∈ ↑I ∧ dist f b < ↑ε\n[PROOFSTEP]\nsimp_rw [dist_nndist]\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\n⊢ ∃ b, b ∈ ↑I ∧ ↑(nndist f b) < ↑ε\n[PROOFSTEP]\nnorm_cast\n -- Let `t := {x : X | ε / 2 ≤ ‖f x‖₊}}` which is closed and disjoint from `set_of_ideal I`.\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\n⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε\n[PROOFSTEP]\nset t := {x : X | ε / 2 ≤ ‖f x‖₊}\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\n⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε\n[PROOFSTEP]\nhave ht : IsClosed t := isClosed_le continuous_const (map_continuous f).nnnorm\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\n⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε\n[PROOFSTEP]\nhave htI : Disjoint t (setOfIdeal I)ᶜ :=\n by\n refine' Set.subset_compl_iff_disjoint_left.mp fun x hx => _\n simpa only [Set.mem_setOf, Set.mem_compl_iff, not_le] using\n (nnnorm_eq_zero.mpr (mem_idealOfSet.mp hf hx)).trans_lt\n (half_pos hε)\n /- It suffices to produce `g : C(X, ℝ≥0)` which takes values in `[0,1]` and is constantly `1` on\n `t` such that when composed with the natural embedding of `ℝ≥0` into `𝕜` lies in the ideal `I`.\n Indeed, then `‖f - f * ↑g‖ ≤ ‖f * (1 - ↑g)‖ ≤ ⨆ ‖f * (1 - ↑g) x‖`. When `x ∉ t`, `‖f x‖ < ε / 2`\n and `‖(1 - ↑g) x‖ ≤ 1`, and when `x ∈ t`, `(1 - ↑g) x = 0`, and clearly `f * ↑g ∈ I`. -/\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\n⊢ Disjoint t (setOfIdeal I)ᶜ\n[PROOFSTEP]\nrefine' Set.subset_compl_iff_disjoint_left.mp fun x hx => _\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nx : X\nhx : x ∈ (setOfIdeal I)ᶜ\n⊢ x ∈ tᶜ\n[PROOFSTEP]\nsimpa only [Set.mem_setOf, Set.mem_compl_iff, not_le] using\n (nnnorm_eq_zero.mpr (mem_idealOfSet.mp hf hx)).trans_lt\n (half_pos hε)\n /- It suffices to produce `g : C(X, ℝ≥0)` which takes values in `[0,1]` and is constantly `1` on\n `t` such that when composed with the natural embedding of `ℝ≥0` into `𝕜` lies in the ideal `I`.\n Indeed, then `‖f - f * ↑g‖ ≤ ‖f * (1 - ↑g)‖ ≤ ⨆ ‖f * (1 - ↑g) x‖`. When `x ∉ t`, `‖f x‖ < ε / 2`\n and `‖(1 - ↑g) x‖ ≤ 1`, and when `x ∈ t`, `(1 - ↑g) x = 0`, and clearly `f * ↑g ∈ I`. -/\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε\n[PROOFSTEP]\nsuffices ∃ g : C(X, ℝ≥0), (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g ∈ I ∧ (∀ x, g x ≤ 1) ∧ t.EqOn g 1\n by\n obtain ⟨g, hgI, hg, hgt⟩ := this\n refine' ⟨f * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g, I.mul_mem_left f hgI, _⟩\n rw [nndist_eq_nnnorm]\n refine' (nnnorm_lt_iff _ hε).2 fun x => _\n simp only [coe_sub, coe_mul, Pi.sub_apply, Pi.mul_apply]\n by_cases hx : x ∈ t\n ·\n simpa only [hgt hx, comp_apply, Pi.one_apply, ContinuousMap.coe_coe, algebraMapClm_apply, map_one, mul_one,\n sub_self, nnnorm_zero] using hε\n · refine' lt_of_le_of_lt _ (half_lt_self hε)\n have :=\n calc\n ‖((1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x : 𝕜)‖₊ = ‖1 - algebraMap ℝ≥0 𝕜 (g x)‖₊ := by\n simp only [coe_sub, coe_one, coe_comp, ContinuousMap.coe_coe, Pi.sub_apply, Pi.one_apply, Function.comp_apply,\n algebraMapClm_apply]\n _ = ‖algebraMap ℝ≥0 𝕜 (1 - g x)‖₊ := by\n simp only [Algebra.algebraMap_eq_smul_one, NNReal.smul_def, ge_iff_le, NNReal.coe_sub (hg x), NNReal.coe_one,\n sub_smul, one_smul]\n _ ≤ 1 := (nnnorm_algebraMap_nNReal 𝕜 (1 - g x)).trans_le tsub_le_self\n calc\n ‖f x - f x * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g x‖₊ =\n ‖f x * (1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=\n by simp only [mul_sub, coe_sub, coe_one, Pi.sub_apply, Pi.one_apply, mul_one]\n _ ≤ ε / 2 * ‖(1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=\n ((nnnorm_mul_le _ _).trans (mul_le_mul_right' (not_le.mp <| show ¬ε / 2 ≤ ‖f x‖₊ from hx).le _))\n _ ≤ ε / 2 := by\n simpa only [mul_one] using\n mul_le_mul_left' this\n _\n /- There is some `g' : C(X, ℝ≥0)` which is strictly positive on `t` such that the composition\n `↑g` with the natural embedding of `ℝ≥0` into `𝕜` lies in `I`. This follows from compactness of\n `t` and that we can do it in any neighborhood of a point `x ∈ t`. Indeed, since `x ∈ t`, then\n `fₓ x ≠ 0` for some `fₓ ∈ I` and so `fun y ↦ ‖(star fₓ * fₓ) y‖₊` is strictly posiive in a\n neighborhood of `y`. Moreover, `(‖(star fₓ * fₓ) y‖₊ : 𝕜) = (star fₓ * fₓ) y`, so composition of\n this map with the natural embedding is just `star fₓ * fₓ ∈ I`. -/\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nthis : ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t\n⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε\n[PROOFSTEP]\nobtain ⟨g, hgI, hg, hgt⟩ := this\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\n⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε\n[PROOFSTEP]\nrefine' ⟨f * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g, I.mul_mem_left f hgI, _⟩\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\n⊢ nndist f (f * comp (↑(algebraMapClm ℝ≥0 𝕜)) g) < ε\n[PROOFSTEP]\nrw [nndist_eq_nnnorm]\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\n⊢ ‖f - f * comp (↑(algebraMapClm ℝ≥0 𝕜)) g‖₊ < ε\n[PROOFSTEP]\nrefine' (nnnorm_lt_iff _ hε).2 fun x => _\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\n⊢ ‖↑(f - f * comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε\n[PROOFSTEP]\nsimp only [coe_sub, coe_mul, Pi.sub_apply, Pi.mul_apply]\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\n⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε\n[PROOFSTEP]\nby_cases hx : x ∈ t\n[GOAL]\ncase pos\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : x ∈ t\n⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε\n[PROOFSTEP]\nsimpa only [hgt hx, comp_apply, Pi.one_apply, ContinuousMap.coe_coe, algebraMapClm_apply, map_one, mul_one, sub_self,\n nnnorm_zero] using hε\n[GOAL]\ncase neg\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : ¬x ∈ t\n⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ (half_lt_self hε)\n[GOAL]\ncase neg\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : ¬x ∈ t\n⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ ε / 2\n[PROOFSTEP]\nhave :=\n calc\n ‖((1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x : 𝕜)‖₊ = ‖1 - algebraMap ℝ≥0 𝕜 (g x)‖₊ := by\n simp only [coe_sub, coe_one, coe_comp, ContinuousMap.coe_coe, Pi.sub_apply, Pi.one_apply, Function.comp_apply,\n algebraMapClm_apply]\n _ = ‖algebraMap ℝ≥0 𝕜 (1 - g x)‖₊ := by\n simp only [Algebra.algebraMap_eq_smul_one, NNReal.smul_def, ge_iff_le, NNReal.coe_sub (hg x), NNReal.coe_one,\n sub_smul, one_smul]\n _ ≤ 1 := (nnnorm_algebraMap_nNReal 𝕜 (1 - g x)).trans_le tsub_le_self\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : ¬x ∈ t\n⊢ ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ = ‖1 - ↑(algebraMap ℝ≥0 𝕜) (↑g x)‖₊\n[PROOFSTEP]\nsimp only [coe_sub, coe_one, coe_comp, ContinuousMap.coe_coe, Pi.sub_apply, Pi.one_apply, Function.comp_apply,\n algebraMapClm_apply]\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : ¬x ∈ t\n⊢ ‖1 - ↑(algebraMap ℝ≥0 𝕜) (↑g x)‖₊ = ‖↑(algebraMap ℝ≥0 𝕜) (1 - ↑g x)‖₊\n[PROOFSTEP]\nsimp only [Algebra.algebraMap_eq_smul_one, NNReal.smul_def, ge_iff_le, NNReal.coe_sub (hg x), NNReal.coe_one, sub_smul,\n one_smul]\n[GOAL]\ncase neg\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : ¬x ∈ t\nthis : ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ 1\n⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ ε / 2\n[PROOFSTEP]\ncalc\n ‖f x - f x * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g x‖₊ =\n ‖f x * (1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=\n by simp only [mul_sub, coe_sub, coe_one, Pi.sub_apply, Pi.one_apply, mul_one]\n _ ≤ ε / 2 * ‖(1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=\n ((nnnorm_mul_le _ _).trans (mul_le_mul_right' (not_le.mp <| show ¬ε / 2 ≤ ‖f x‖₊ from hx).le _))\n _ ≤ ε / 2 := by\n simpa only [mul_one] using\n mul_le_mul_left' this\n _\n /- There is some `g' : C(X, ℝ≥0)` which is strictly positive on `t` such that the composition\n `↑g` with the natural embedding of `ℝ≥0` into `𝕜` lies in `I`. This follows from compactness of\n `t` and that we can do it in any neighborhood of a point `x ∈ t`. Indeed, since `x ∈ t`, then\n `fₓ x ≠ 0` for some `fₓ ∈ I` and so `fun y ↦ ‖(star fₓ * fₓ) y‖₊` is strictly posiive in a\n neighborhood of `y`. Moreover, `(‖(star fₓ * fₓ) y‖₊ : 𝕜) = (star fₓ * fₓ) y`, so composition of\n this map with the natural embedding is just `star fₓ * fₓ ∈ I`. -/\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : ¬x ∈ t\nthis : ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ 1\n⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ = ‖↑f x * ↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊\n[PROOFSTEP]\nsimp only [mul_sub, coe_sub, coe_one, Pi.sub_apply, Pi.one_apply, mul_one]\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng : C(X, ℝ≥0)\nhgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhg : ∀ (x : X), ↑g x ≤ 1\nhgt : Set.EqOn (↑g) 1 t\nx : X\nhx : ¬x ∈ t\nthis : ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ 1\n⊢ ε / 2 * ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ ε / 2\n[PROOFSTEP]\nsimpa only [mul_one] using\n mul_le_mul_left' this\n _\n /- There is some `g' : C(X, ℝ≥0)` which is strictly positive on `t` such that the composition\n `↑g` with the natural embedding of `ℝ≥0` into `𝕜` lies in `I`. This follows from compactness of\n `t` and that we can do it in any neighborhood of a point `x ∈ t`. Indeed, since `x ∈ t`, then\n `fₓ x ≠ 0` for some `fₓ ∈ I` and so `fun y ↦ ‖(star fₓ * fₓ) y‖₊` is strictly posiive in a\n neighborhood of `y`. Moreover, `(‖(star fₓ * fₓ) y‖₊ : 𝕜) = (star fₓ * fₓ) y`, so composition of\n this map with the natural embedding is just `star fₓ * fₓ ∈ I`. -/\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t\n[PROOFSTEP]\nhave : ∃ g' : C(X, ℝ≥0), (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g' ∈ I ∧ ∀ x ∈ t, 0 < g' x :=\n by\n refine' ht.isCompact.induction_on _ _ _ _\n · refine' ⟨0, _, fun x hx => False.elim hx⟩\n convert I.zero_mem\n ext\n simp only [comp_apply, zero_apply, ContinuousMap.coe_coe, map_zero]\n · rintro s₁ s₂ hs ⟨g, hI, hgt⟩; exact ⟨g, hI, fun x hx => hgt x (hs hx)⟩\n · rintro s₁ s₂ ⟨g₁, hI₁, hgt₁⟩ ⟨g₂, hI₂, hgt₂⟩\n refine' ⟨g₁ + g₂, _, fun x hx => _⟩\n · convert I.add_mem hI₁ hI₂\n ext y\n simp only [coe_add, Pi.add_apply, map_add, coe_comp, Function.comp_apply, ContinuousMap.coe_coe]\n · rcases hx with (hx | hx)\n simpa only [zero_add] using add_lt_add_of_lt_of_le (hgt₁ x hx) zero_le'\n simpa only [zero_add] using add_lt_add_of_le_of_lt zero_le' (hgt₂ x hx)\n · intro x hx\n replace hx := htI.subset_compl_right hx\n rw [compl_compl, mem_setOfIdeal] at hx \n obtain ⟨g, hI, hgx⟩ := hx\n have := (map_continuous g).continuousAt.eventually_ne hgx\n refine'\n ⟨{y : X | g y ≠ 0} ∩ t, mem_nhdsWithin_iff_exists_mem_nhds_inter.mpr ⟨_, this, Set.Subset.rfl⟩,\n ⟨⟨fun x => ‖g x‖₊ ^ 2, (map_continuous g).nnnorm.pow 2⟩, _, fun x hx => pow_pos (norm_pos_iff.mpr hx.1) 2⟩⟩\n convert I.mul_mem_left (star g) hI\n ext\n simp only [comp_apply, ContinuousMap.coe_coe, coe_mk, algebraMapClm_toFun, map_pow, mul_apply, star_apply, star_def]\n simp only [normSq_eq_def', IsROrC.conj_mul, ofReal_pow]\n rfl\n /- Get the function `g'` which is guaranteed to exist above. By the extreme value theorem and\n compactness of `t`, there is some `0 < c` such that `c ≤ g' x` for all `x ∈ t`. Then by\n `exists_mul_le_one_eqOn_ge` there is some `g` for which `g * g'` is the desired function. -/\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x\n[PROOFSTEP]\nrefine' ht.isCompact.induction_on _ _ _ _\n[GOAL]\ncase refine'_1\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ ∅ → 0 < ↑g' x\n[PROOFSTEP]\nrefine' ⟨0, _, fun x hx => False.elim hx⟩\n[GOAL]\ncase refine'_1\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) 0 ∈ I\n[PROOFSTEP]\nconvert I.zero_mem\n[GOAL]\ncase h.e'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_4.h\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\na✝ : X\n⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) 0) a✝ = ↑0 a✝\n[PROOFSTEP]\nsimp only [comp_apply, zero_apply, ContinuousMap.coe_coe, map_zero]\n[GOAL]\ncase refine'_2\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ ∀ ⦃s t : Set X⦄,\n s ⊆ t →\n (∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x) →\n ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s → 0 < ↑g' x\n[PROOFSTEP]\nrintro s₁ s₂ hs ⟨g, hI, hgt⟩\n[GOAL]\ncase refine'_2.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\nhs : s₁ ⊆ s₂\ng : C(X, ℝ≥0)\nhI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I\nhgt : ∀ (x : X), x ∈ s₂ → 0 < ↑g x\n⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s₁ → 0 < ↑g' x\n[PROOFSTEP]\nexact ⟨g, hI, fun x hx => hgt x (hs hx)⟩\n[GOAL]\ncase refine'_3\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ ∀ ⦃s t : Set X⦄,\n (∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s → 0 < ↑g' x) →\n (∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x) →\n ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s ∪ t → 0 < ↑g' x\n[PROOFSTEP]\nrintro s₁ s₂ ⟨g₁, hI₁, hgt₁⟩ ⟨g₂, hI₂, hgt₂⟩\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\n⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s₁ ∪ s₂ → 0 < ↑g' x\n[PROOFSTEP]\nrefine' ⟨g₁ + g₂, _, fun x hx => _⟩\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_1\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g₁ + g₂) ∈ I\n[PROOFSTEP]\nconvert I.add_mem hI₁ hI₂\n[GOAL]\ncase h.e'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g₁ + g₂) = comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ + comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e'_4.h\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\ny : X\n⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) (g₁ + g₂)) y =\n ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ + comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂) y\n[PROOFSTEP]\nsimp only [coe_add, Pi.add_apply, map_add, coe_comp, Function.comp_apply, ContinuousMap.coe_coe]\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\nx : X\nhx : x ∈ s₁ ∪ s₂\n⊢ 0 < ↑(g₁ + g₂) x\n[PROOFSTEP]\nrcases hx with (hx | hx)\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2.inl\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\nx : X\nhx : x ∈ s₁\n⊢ 0 < ↑(g₁ + g₂) x\ncase refine'_3.intro.intro.intro.intro.refine'_2.inr\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\nx : X\nhx : x ∈ s₂\n⊢ 0 < ↑(g₁ + g₂) x\n[PROOFSTEP]\nsimpa only [zero_add] using add_lt_add_of_lt_of_le (hgt₁ x hx) zero_le'\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2.inr\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ns₁ s₂ : Set X\ng₁ : C(X, ℝ≥0)\nhI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I\nhgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x\ng₂ : C(X, ℝ≥0)\nhI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I\nhgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x\nx : X\nhx : x ∈ s₂\n⊢ 0 < ↑(g₁ + g₂) x\n[PROOFSTEP]\nsimpa only [zero_add] using add_lt_add_of_le_of_lt zero_le' (hgt₂ x hx)\n[GOAL]\ncase refine'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\n⊢ ∀ (x : X),\n x ∈ t → ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\nhx : x ∈ t\n⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x\n[PROOFSTEP]\nreplace hx := htI.subset_compl_right hx\n[GOAL]\ncase refine'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\nhx : x ∈ (setOfIdeal I)ᶜᶜ\n⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x\n[PROOFSTEP]\nrw [compl_compl, mem_setOfIdeal] at hx \n[GOAL]\ncase refine'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\nhx : ∃ f, f ∈ I ∧ ↑f x ≠ 0\n⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x\n[PROOFSTEP]\nobtain ⟨g, hI, hgx⟩ := hx\n[GOAL]\ncase refine'_4.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\ng : C(X, 𝕜)\nhI : g ∈ I\nhgx : ↑g x ≠ 0\n⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x\n[PROOFSTEP]\nhave := (map_continuous g).continuousAt.eventually_ne hgx\n[GOAL]\ncase refine'_4.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\ng : C(X, 𝕜)\nhI : g ∈ I\nhgx : ↑g x ≠ 0\nthis : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0\n⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x\n[PROOFSTEP]\nrefine'\n ⟨{y : X | g y ≠ 0} ∩ t, mem_nhdsWithin_iff_exists_mem_nhds_inter.mpr ⟨_, this, Set.Subset.rfl⟩,\n ⟨⟨fun x => ‖g x‖₊ ^ 2, (map_continuous g).nnnorm.pow 2⟩, _, fun x hx => pow_pos (norm_pos_iff.mpr hx.1) 2⟩⟩\n[GOAL]\ncase refine'_4.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\ng : C(X, 𝕜)\nhI : g ∈ I\nhgx : ↑g x ≠ 0\nthis : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (mk fun x => ‖↑g x‖₊ ^ 2) ∈ I\n[PROOFSTEP]\nconvert I.mul_mem_left (star g) hI\n[GOAL]\ncase h.e'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\ng : C(X, 𝕜)\nhI : g ∈ I\nhgx : ↑g x ≠ 0\nthis : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (mk fun x => ‖↑g x‖₊ ^ 2) = star g * g\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_4.h\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\ng : C(X, 𝕜)\nhI : g ∈ I\nhgx : ↑g x ≠ 0\nthis : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0\na✝ : X\n⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) (mk fun x => ‖↑g x‖₊ ^ 2)) a✝ = ↑(star g * g) a✝\n[PROOFSTEP]\nsimp only [comp_apply, ContinuousMap.coe_coe, coe_mk, algebraMapClm_toFun, map_pow, mul_apply, star_apply, star_def]\n[GOAL]\ncase h.e'_4.h\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\ng : C(X, 𝕜)\nhI : g ∈ I\nhgx : ↑g x ≠ 0\nthis : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0\na✝ : X\n⊢ ↑(algebraMap ℝ≥0 𝕜) ‖↑g a✝‖₊ ^ 2 = ↑(starRingEnd 𝕜) (↑g a✝) * ↑g a✝\n[PROOFSTEP]\nsimp only [normSq_eq_def', IsROrC.conj_mul, ofReal_pow]\n[GOAL]\ncase h.e'_4.h\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nx : X\ng : C(X, 𝕜)\nhI : g ∈ I\nhgx : ↑g x ≠ 0\nthis : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0\na✝ : X\n⊢ ↑(algebraMap ℝ≥0 𝕜) ‖↑g a✝‖₊ ^ 2 = ↑‖↑g a✝‖ ^ 2\n[PROOFSTEP]\nrfl\n /- Get the function `g'` which is guaranteed to exist above. By the extreme value theorem and\n compactness of `t`, there is some `0 < c` such that `c ≤ g' x` for all `x ∈ t`. Then by\n `exists_mul_le_one_eqOn_ge` there is some `g` for which `g * g'` is the desired function. -/\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\nthis : ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x\n⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t\n[PROOFSTEP]\nobtain ⟨g', hI', hgt'⟩ := this\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng' : C(X, ℝ≥0)\nhI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I\nhgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x\n⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t\n[PROOFSTEP]\nobtain ⟨c, hc, hgc'⟩ : ∃ (c : _) (_ : 0 < c), ∀ y : X, y ∈ t → c ≤ g' y :=\n t.eq_empty_or_nonempty.elim (fun ht' => ⟨1, zero_lt_one, fun y hy => False.elim (by rwa [ht'] at hy )⟩) fun ht' =>\n let ⟨x, hx, hx'⟩ := ht.isCompact.exists_forall_le ht' (map_continuous g').continuousOn\n ⟨g' x, hgt' x hx, hx'⟩\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng' : C(X, ℝ≥0)\nhI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I\nhgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x\nht' : t = ∅\ny : X\nhy : y ∈ t\n⊢ False\n[PROOFSTEP]\nrwa [ht'] at hy \n[GOAL]\ncase intro.intro.intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng' : C(X, ℝ≥0)\nhI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I\nhgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x\nc : ℝ≥0\nhc : 0 < c\nhgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y\n⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t\n[PROOFSTEP]\nobtain ⟨g, hg, hgc⟩ := exists_mul_le_one_eqOn_ge g' hc\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng' : C(X, ℝ≥0)\nhI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I\nhgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x\nc : ℝ≥0\nhc : 0 < c\nhgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y\ng : C(X, ℝ≥0)\nhg : ∀ (x : X), ↑(g * g') x ≤ 1\nhgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}\n⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t\n[PROOFSTEP]\nrefine' ⟨g * g', _, hg, hgc.mono hgc'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng' : C(X, ℝ≥0)\nhI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I\nhgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x\nc : ℝ≥0\nhc : 0 < c\nhgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y\ng : C(X, ℝ≥0)\nhg : ∀ (x : X), ↑(g * g') x ≤ 1\nhgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g * g') ∈ I\n[PROOFSTEP]\nconvert I.mul_mem_left ((algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) hI'\n[GOAL]\ncase h.e'_4\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng' : C(X, ℝ≥0)\nhI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I\nhgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x\nc : ℝ≥0\nhc : 0 < c\nhgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y\ng : C(X, ℝ≥0)\nhg : ∀ (x : X), ↑(g * g') x ≤ 1\nhgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}\n⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g * g') = comp (↑(algebraMapClm ℝ≥0 𝕜)) g * comp (↑(algebraMapClm ℝ≥0 𝕜)) g'\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_4.h\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nf : C(X, 𝕜)\nhf : f ∈ idealOfSet 𝕜 (setOfIdeal I)\nε : ℝ≥0\nhε : 0 < ε\nt : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}\nht : IsClosed t\nhtI : Disjoint t (setOfIdeal I)ᶜ\ng' : C(X, ℝ≥0)\nhI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I\nhgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x\nc : ℝ≥0\nhc : 0 < c\nhgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y\ng : C(X, ℝ≥0)\nhg : ∀ (x : X), ↑(g * g') x ≤ 1\nhgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}\na✝ : X\n⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) (g * g')) a✝ =\n ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g * comp (↑(algebraMapClm ℝ≥0 𝕜)) g') a✝\n[PROOFSTEP]\nsimp only [algebraMapClm_coe, comp_apply, mul_apply, ContinuousMap.coe_coe, map_mul]\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\n⊢ setOfIdeal (idealOfSet 𝕜 s) = interior s\n[PROOFSTEP]\nrefine'\n Set.Subset.antisymm\n ((setOfIdeal_open (idealOfSet 𝕜 s)).subset_interior_iff.mpr fun x hx =>\n let ⟨f, hf, hfx⟩ := mem_setOfIdeal.mp hx\n Set.not_mem_compl_iff.mp (mt (@hf x) hfx))\n fun x hx =>\n _\n -- If `x ∉ closure sᶜ`, we must produce `f : C(X, 𝕜)` which is zero on `sᶜ` and `f x ≠ 0`.\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\nx : X\nhx : x ∈ interior s\n⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)\n[PROOFSTEP]\nrw [← compl_compl (interior s), ← closure_compl] at hx \n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\nx : X\nhx : x ∈ (closure sᶜ)ᶜ\n⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)\n[PROOFSTEP]\nsimp_rw [mem_setOfIdeal, mem_idealOfSet]\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\nx : X\nhx : x ∈ (closure sᶜ)ᶜ\n⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ∧ ↑f x ≠ 0\n[PROOFSTEP]\nhaveI : NormalSpace X := normalOfCompactT2\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\nx : X\nhx : x ∈ (closure sᶜ)ᶜ\nthis : NormalSpace X\n⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ∧ ↑f x ≠ 0\n[PROOFSTEP]\nobtain ⟨g, hgs, hgx : Set.EqOn g 1 { x }, -⟩ :=\n exists_continuous_zero_one_of_closed isClosed_closure isClosed_singleton (Set.disjoint_singleton_right.mpr hx)\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\nx : X\nhx : x ∈ (closure sᶜ)ᶜ\nthis : NormalSpace X\ng : C(X, ℝ)\nhgs : Set.EqOn (↑g) 0 (closure sᶜ)\nhgx : Set.EqOn (↑g) 1 {x}\n⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ∧ ↑f x ≠ 0\n[PROOFSTEP]\nexact\n ⟨⟨fun x => g x, continuous_ofReal.comp (map_continuous g)⟩, by\n simpa only [coe_mk, ofReal_eq_zero] using fun x hx => hgs (subset_closure hx), by\n simpa only [coe_mk, hgx (Set.mem_singleton x), Pi.one_apply, IsROrC.ofReal_one] using one_ne_zero⟩\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\nx : X\nhx : x ∈ (closure sᶜ)ᶜ\nthis : NormalSpace X\ng : C(X, ℝ)\nhgs : Set.EqOn (↑g) 0 (closure sᶜ)\nhgx : Set.EqOn (↑g) 1 {x}\n⊢ ∀ ⦃x : X⦄, x ∈ sᶜ → ↑(mk fun x => ↑(↑g x)) x = 0\n[PROOFSTEP]\nsimpa only [coe_mk, ofReal_eq_zero] using fun x hx => hgs (subset_closure hx)\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Set X\nx : X\nhx : x ∈ (closure sᶜ)ᶜ\nthis : NormalSpace X\ng : C(X, ℝ)\nhgs : Set.EqOn (↑g) 0 (closure sᶜ)\nhgx : Set.EqOn (↑g) 1 {x}\n⊢ ↑(mk fun x => ↑(↑g x)) x ≠ 0\n[PROOFSTEP]\nsimpa only [coe_mk, hgx (Set.mem_singleton x), Pi.one_apply, IsROrC.ofReal_one] using one_ne_zero\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Opens X\n⊢ Ideal.IsMaximal (idealOfSet 𝕜 ↑s) ↔ IsCoatom s\n[PROOFSTEP]\nrw [Ideal.isMaximal_def]\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Opens X\n⊢ IsCoatom (idealOfSet 𝕜 ↑s) ↔ IsCoatom s\n[PROOFSTEP]\nrefine' (idealOpensGI X 𝕜).isCoatom_iff (fun I hI => _) s\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Opens X\nI : Ideal C(X, 𝕜)\nhI : IsCoatom I\n⊢ idealOfSet 𝕜 ↑(opensOfIdeal I) = I\n[PROOFSTEP]\nrw [← Ideal.isMaximal_def] at hI \n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\ns : Opens X\nI : Ideal C(X, 𝕜)\nhI : Ideal.IsMaximal I\n⊢ idealOfSet 𝕜 ↑(opensOfIdeal I) = I\n[PROOFSTEP]\nexact idealOfSet_ofIdeal_isClosed inferInstance\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : Ideal.IsMaximal I\n⊢ ∃ x, setOfIdeal I = {x}ᶜ\n[PROOFSTEP]\nhave h : (idealOfSet 𝕜 (setOfIdeal I)).IsMaximal :=\n (idealOfSet_ofIdeal_isClosed (inferInstance : IsClosed (I : Set C(X, 𝕜)))).symm ▸ hI\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : Ideal.IsMaximal I\nh : Ideal.IsMaximal (idealOfSet 𝕜 (setOfIdeal I))\n⊢ ∃ x, setOfIdeal I = {x}ᶜ\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := Opens.isCoatom_iff.1 ((idealOfSet_isMaximal_iff 𝕜 (opensOfIdeal I)).1 h)\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : Ideal.IsMaximal I\nh : Ideal.IsMaximal (idealOfSet 𝕜 (setOfIdeal I))\nx : X\nhx : opensOfIdeal I = Closeds.compl (Closeds.singleton x)\n⊢ ∃ x, setOfIdeal I = {x}ᶜ\n[PROOFSTEP]\nrefine ⟨x, congr_arg (fun (s : Opens X) => (s : Set X)) hx⟩\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : IsClosed ↑I\n⊢ Ideal.IsMaximal I ↔ ∃ x, idealOfSet 𝕜 {x}ᶜ = I\n[PROOFSTEP]\nrefine'\n ⟨_, fun h =>\n let ⟨x, hx⟩ := h\n hx ▸ idealOf_compl_singleton_isMaximal 𝕜 x⟩\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : IsClosed ↑I\n⊢ Ideal.IsMaximal I → ∃ x, idealOfSet 𝕜 {x}ᶜ = I\n[PROOFSTEP]\nintro hI'\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : IsClosed ↑I\nhI' : Ideal.IsMaximal I\n⊢ ∃ x, idealOfSet 𝕜 {x}ᶜ = I\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := setOfIdeal_eq_compl_singleton I\n[GOAL]\ncase intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : IsClosed ↑I\nhI' : Ideal.IsMaximal I\nx : X\nhx : setOfIdeal I = {x}ᶜ\n⊢ ∃ x, idealOfSet 𝕜 {x}ᶜ = I\n[PROOFSTEP]\nexact\n ⟨x, by simpa only [idealOfSet_ofIdeal_eq_closure, I.closure_eq_of_isClosed hI] using congr_arg (idealOfSet 𝕜) hx.symm⟩\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nI : Ideal C(X, 𝕜)\nhI : IsClosed ↑I\nhI' : Ideal.IsMaximal I\nx : X\nhx : setOfIdeal I = {x}ᶜ\n⊢ idealOfSet 𝕜 {x}ᶜ = I\n[PROOFSTEP]\nsimpa only [idealOfSet_ofIdeal_eq_closure, I.closure_eq_of_isClosed hI] using congr_arg (idealOfSet 𝕜) hx.symm\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : LocallyCompactSpace X\ninst✝⁴ : CommRing 𝕜\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : TopologicalRing 𝕜\ninst✝¹ : Nontrivial 𝕜\ninst✝ : NoZeroDivisors 𝕜\nx : X\n⊢ ContinuousLinearMap.mk\n {\n toAddHom :=\n { toFun := fun f => ↑f x,\n map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) },\n map_smul' :=\n (_ :\n ∀ (z : 𝕜) (f : C(X, 𝕜)),\n AddHom.toFun\n { toFun := fun f => ↑f x,\n map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }\n (z • f) =\n AddHom.toFun\n { toFun := fun f => ↑f x,\n map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }\n (z • f)) } ∈\n characterSpace 𝕜 C(X, 𝕜)\n[PROOFSTEP]\nrw [CharacterSpace.eq_set_map_one_map_mul]\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : LocallyCompactSpace X\ninst✝⁴ : CommRing 𝕜\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : TopologicalRing 𝕜\ninst✝¹ : Nontrivial 𝕜\ninst✝ : NoZeroDivisors 𝕜\nx : X\n⊢ ContinuousLinearMap.mk\n {\n toAddHom :=\n { toFun := fun f => ↑f x,\n map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) },\n map_smul' :=\n (_ :\n ∀ (z : 𝕜) (f : C(X, 𝕜)),\n AddHom.toFun\n { toFun := fun f => ↑f x,\n map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }\n (z • f) =\n AddHom.toFun\n { toFun := fun f => ↑f x,\n map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }\n (z • f)) } ∈\n {φ | ↑φ 1 = 1 ∧ ∀ (x y : C(X, 𝕜)), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nexact ⟨rfl, fun f g => rfl⟩\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\n⊢ Bijective ↑(continuousMapEval X 𝕜)\n[PROOFSTEP]\nrefine' ⟨fun x y hxy => _, fun φ => _⟩\n[GOAL]\ncase refine'_1\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nx y : X\nhxy : ↑(continuousMapEval X 𝕜) x = ↑(continuousMapEval X 𝕜) y\n⊢ x = y\n[PROOFSTEP]\ncontrapose! hxy\n[GOAL]\ncase refine'_1\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nx y : X\nhxy : x ≠ y\n⊢ ↑(continuousMapEval X 𝕜) x ≠ ↑(continuousMapEval X 𝕜) y\n[PROOFSTEP]\nhaveI := @normalOfCompactT2 X _ _ _\n[GOAL]\ncase refine'_1\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nx y : X\nhxy : x ≠ y\nthis : NormalSpace X\n⊢ ↑(continuousMapEval X 𝕜) x ≠ ↑(continuousMapEval X 𝕜) y\n[PROOFSTEP]\nrcases exists_continuous_zero_one_of_closed (isClosed_singleton : _root_.IsClosed { x })\n (isClosed_singleton : _root_.IsClosed { y }) (Set.disjoint_singleton.mpr hxy) with\n ⟨f, fx, fy, -⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nx y : X\nhxy : x ≠ y\nthis : NormalSpace X\nf : C(X, ℝ)\nfx : Set.EqOn (↑f) 0 {x}\nfy : Set.EqOn (↑f) 1 {y}\n⊢ ↑(continuousMapEval X 𝕜) x ≠ ↑(continuousMapEval X 𝕜) y\n[PROOFSTEP]\nrw [FunLike.ne_iff]\n[GOAL]\ncase refine'_1.intro.intro.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nx y : X\nhxy : x ≠ y\nthis : NormalSpace X\nf : C(X, ℝ)\nfx : Set.EqOn (↑f) 0 {x}\nfy : Set.EqOn (↑f) 1 {y}\n⊢ ∃ a, ↑(↑(continuousMapEval X 𝕜) x) a ≠ ↑(↑(continuousMapEval X 𝕜) y) a\n[PROOFSTEP]\nuse(⟨fun (x : ℝ) => (x : 𝕜), IsROrC.continuous_ofReal⟩ : C(ℝ, 𝕜)).comp f\n[GOAL]\ncase h\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nx y : X\nhxy : x ≠ y\nthis : NormalSpace X\nf : C(X, ℝ)\nfx : Set.EqOn (↑f) 0 {x}\nfy : Set.EqOn (↑f) 1 {y}\n⊢ ↑(↑(continuousMapEval X 𝕜) x) (ContinuousMap.comp (mk fun x => ↑x) f) ≠\n ↑(↑(continuousMapEval X 𝕜) y) (ContinuousMap.comp (mk fun x => ↑x) f)\n[PROOFSTEP]\nsimpa only [continuousMapEval_apply_apply, ContinuousMap.comp_apply, coe_mk, Ne.def, IsROrC.ofReal_inj] using\n ((fx (Set.mem_singleton x)).symm ▸ (fy (Set.mem_singleton y)).symm ▸ zero_ne_one : f x ≠ f y)\n[GOAL]\ncase refine'_2\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nφ : ↑(characterSpace 𝕜 C(X, 𝕜))\n⊢ ∃ a, ↑(continuousMapEval X 𝕜) a = φ\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := (ideal_isMaximal_iff (RingHom.ker φ)).mp inferInstance\n[GOAL]\ncase refine'_2.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nφ : ↑(characterSpace 𝕜 C(X, 𝕜))\nx : X\nhx : idealOfSet 𝕜 {x}ᶜ = RingHom.ker φ\n⊢ ∃ a, ↑(continuousMapEval X 𝕜) a = φ\n[PROOFSTEP]\nrefine' ⟨x, CharacterSpace.ext_ker <| Ideal.ext fun f => _⟩\n[GOAL]\ncase refine'_2.intro\nX : Type u_1\n𝕜 : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : CompactSpace X\ninst✝¹ : T2Space X\ninst✝ : IsROrC 𝕜\nφ : ↑(characterSpace 𝕜 C(X, 𝕜))\nx : X\nhx : idealOfSet 𝕜 {x}ᶜ = RingHom.ker φ\nf : C(X, 𝕜)\n⊢ f ∈ RingHom.ker (↑(continuousMapEval X 𝕜) x) ↔ f ∈ RingHom.ker φ\n[PROOFSTEP]\nsimpa only [RingHom.mem_ker, continuousMapEval_apply_apply, mem_idealOfSet_compl_singleton, RingHom.mem_ker] using\n SetLike.ext_iff.mp hx f\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Ideals", "llama_tokens": 32827, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.867035763237924, "lm_q2_score": 0.7217432062975979, "lm_q1q2_score": 0.6257771717340243}} {"text": "[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\ninst✝ : T2Space α\nf : α → α\nx y : α\nhy : Tendsto (fun n => f^[n] x) atTop (𝓝 y)\nhf : ContinuousAt f y\n⊢ IsFixedPt f y\n[PROOFSTEP]\nrefine' tendsto_nhds_unique ((tendsto_add_atTop_iff_nat 1).1 _) hy\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\ninst✝ : T2Space α\nf : α → α\nx y : α\nhy : Tendsto (fun n => f^[n] x) atTop (𝓝 y)\nhf : ContinuousAt f y\n⊢ Tendsto (fun n => f^[n + 1] x) atTop (𝓝 (f y))\n[PROOFSTEP]\nsimp only [iterate_succ' f]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\ninst✝ : T2Space α\nf : α → α\nx y : α\nhy : Tendsto (fun n => f^[n] x) atTop (𝓝 y)\nhf : ContinuousAt f y\n⊢ Tendsto (fun n => (f ∘ f^[n]) x) atTop (𝓝 (f y))\n[PROOFSTEP]\nexact hf.tendsto.comp hy\n", "meta": {"mathlib_filename": "Mathlib.Dynamics.FixedPoints.Topology", "llama_tokens": 370, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519527906914788, "lm_q2_score": 0.7341195327172402, "lm_q1q2_score": 0.6254351845995771}} {"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : Countable ι\ninst✝ : ∀ (i : ι), Countable (α i)\n⊢ Countable (Π₀ (i : ι), α i)\n[PROOFSTEP]\nclassical\nlet _ := Encodable.ofCountable ι\nlet _ := fun i ↦ Encodable.ofCountable (α i)\ninfer_instance\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : Countable ι\ninst✝ : ∀ (i : ι), Countable (α i)\n⊢ Countable (Π₀ (i : ι), α i)\n[PROOFSTEP]\nlet _ := Encodable.ofCountable ι\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : Countable ι\ninst✝ : ∀ (i : ι), Countable (α i)\nx✝ : Encodable ι := Encodable.ofCountable ι\n⊢ Countable (Π₀ (i : ι), α i)\n[PROOFSTEP]\nlet _ := fun i ↦ Encodable.ofCountable (α i)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : Countable ι\ninst✝ : ∀ (i : ι), Countable (α i)\nx✝¹ : Encodable ι := Encodable.ofCountable ι\nx✝ : (i : ι) → Encodable (α i) := fun i => Encodable.ofCountable (α i)\n⊢ Countable (Π₀ (i : ι), α i)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Data.DFinsupp.Encodable", "llama_tokens": 539, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9073122238669026, "lm_q2_score": 0.6893056231680121, "lm_q1q2_score": 0.6254154178805302}} {"text": "[GOAL]\nn : ℕ+\n⊢ 1 + natPred n = ↑n\n[PROOFSTEP]\nrw [natPred, add_tsub_cancel_iff_le.mpr <| show 1 ≤ (n : ℕ) from n.2]\n[GOAL]\na b : ℕ+\n⊢ ↑(a - b) = if b < a then ↑a - ↑b else 1\n[PROOFSTEP]\nchange (toPNat' _ : ℕ) = ite _ _ _\n[GOAL]\na b : ℕ+\n⊢ ↑(toPNat' (↑a - ↑b)) = if b < a then ↑a - ↑b else 1\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\na b : ℕ+\nh : b < a\n⊢ ↑(toPNat' (↑a - ↑b)) = ↑a - ↑b\n[PROOFSTEP]\nexact toPNat'_coe (tsub_pos_of_lt h)\n[GOAL]\ncase neg\na b : ℕ+\nh : ¬b < a\n⊢ ↑(toPNat' (↑a - ↑b)) = 1\n[PROOFSTEP]\nrw [tsub_eq_zero_iff_le.mpr (le_of_not_gt h : (a : ℕ) ≤ b)]\n[GOAL]\ncase neg\na b : ℕ+\nh : ¬b < a\n⊢ ↑(toPNat' 0) = 1\n[PROOFSTEP]\nrfl\n[GOAL]\na b : ℕ+\nh : a < b\n⊢ ↑(a + (b - a)) = ↑b\n[PROOFSTEP]\nrw [add_coe, sub_coe, if_pos h]\n[GOAL]\na b : ℕ+\nh : a < b\n⊢ ↑a + (↑b - ↑a) = ↑b\n[PROOFSTEP]\nexact add_tsub_cancel_of_le h.le\n[GOAL]\nn : ℕ\nproperty✝ : 0 < n + 2\nx✝ : { val := n + 2, property := property✝ } ≠ 1\n⊢ 0 < n + 1\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ+ → Sort u_1\na : ℕ+\nhz : p 1\nhi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)\n⊢ p a\n[PROOFSTEP]\napply strongInductionOn a\n[GOAL]\np : ℕ+ → Sort u_1\na : ℕ+\nhz : p 1\nhi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)\n⊢ (k : ℕ+) → ((m : ℕ+) → m < k → p m) → p k\n[PROOFSTEP]\nrintro ⟨k, kprop⟩ hk\n[GOAL]\ncase mk\np : ℕ+ → Sort u_1\na : ℕ+\nhz : p 1\nhi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)\nk : ℕ\nkprop : 0 < k\nhk : (m : ℕ+) → m < { val := k, property := kprop } → p m\n⊢ p { val := k, property := kprop }\n[PROOFSTEP]\ncases' k with k\n[GOAL]\ncase mk.zero\np : ℕ+ → Sort u_1\na : ℕ+\nhz : p 1\nhi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)\nkprop : 0 < zero\nhk : (m : ℕ+) → m < { val := zero, property := kprop } → p m\n⊢ p { val := zero, property := kprop }\n[PROOFSTEP]\nexact (lt_irrefl 0 kprop).elim\n[GOAL]\ncase mk.succ\np : ℕ+ → Sort u_1\na : ℕ+\nhz : p 1\nhi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)\nk : ℕ\nkprop : 0 < succ k\nhk : (m : ℕ+) → m < { val := succ k, property := kprop } → p m\n⊢ p { val := succ k, property := kprop }\n[PROOFSTEP]\ncases' k with k\n[GOAL]\ncase mk.succ.zero\np : ℕ+ → Sort u_1\na : ℕ+\nhz : p 1\nhi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)\nkprop : 0 < succ zero\nhk : (m : ℕ+) → m < { val := succ zero, property := kprop } → p m\n⊢ p { val := succ zero, property := kprop }\n[PROOFSTEP]\nexact hz\n[GOAL]\ncase mk.succ.succ\np : ℕ+ → Sort u_1\na : ℕ+\nhz : p 1\nhi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)\nk : ℕ\nkprop : 0 < succ (succ k)\nhk : (m : ℕ+) → m < { val := succ (succ k), property := kprop } → p m\n⊢ p { val := succ (succ k), property := kprop }\n[PROOFSTEP]\nexact hi ⟨k.succ, Nat.succ_pos _⟩ fun m hm => hk _ (lt_succ_iff.2 hm)\n[GOAL]\nn : ℕ+\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\n⊢ p n\n[PROOFSTEP]\nrcases n with ⟨n, h⟩\n[GOAL]\ncase mk\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn : ℕ\nh : 0 < n\n⊢ p { val := n, property := h }\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase mk.zero\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn : ℕ\nh✝ : 0 < n\nh : 0 < zero\n⊢ p { val := zero, property := h }\n[PROOFSTEP]\nexact absurd h (by decide)\n[GOAL]\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn : ℕ\nh✝ : 0 < n\nh : 0 < zero\n⊢ ¬0 < zero\n[PROOFSTEP]\ndecide\n[GOAL]\ncase mk.succ\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn✝ : ℕ\nh✝ : 0 < n✝\nn : ℕ\nIH : (h : 0 < n) → p { val := n, property := h }\nh : 0 < succ n\n⊢ p { val := succ n, property := h }\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase mk.succ.zero\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn : ℕ\nh✝ : 0 < n\nIH : (h : 0 < zero) → p { val := zero, property := h }\nh : 0 < succ zero\n⊢ p { val := succ zero, property := h }\n[PROOFSTEP]\nexact p1\n[GOAL]\ncase mk.succ.succ\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn✝ : ℕ\nh✝ : 0 < n✝\nn : ℕ\nIH : (h : 0 < succ n) → p { val := succ n, property := h }\nh : 0 < succ (succ n)\n⊢ p { val := succ (succ n), property := h }\n[PROOFSTEP]\nexact hp _ (IH n.succ_pos)\n[GOAL]\nn : ℕ+\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\n⊢ recOn (n + 1) p1 hp = hp n (recOn n p1 hp)\n[PROOFSTEP]\ncases' n with n h\n[GOAL]\ncase mk\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn : ℕ\nh : 0 < n\n⊢ recOn ({ val := n, property := h } + 1) p1 hp =\n hp { val := n, property := h } (recOn { val := n, property := h } p1 hp)\n[PROOFSTEP]\ncases n <;> [exact absurd h (by decide); rfl]\n[GOAL]\ncase mk\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn : ℕ\nh : 0 < n\n⊢ recOn ({ val := n, property := h } + 1) p1 hp =\n hp { val := n, property := h } (recOn { val := n, property := h } p1 hp)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase mk.zero\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nh : 0 < zero\n⊢ recOn ({ val := zero, property := h } + 1) p1 hp =\n hp { val := zero, property := h } (recOn { val := zero, property := h } p1 hp)\n[PROOFSTEP]\nexact absurd h (by decide)\n[GOAL]\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nh : 0 < zero\n⊢ ¬0 < zero\n[PROOFSTEP]\ndecide\n[GOAL]\ncase mk.succ\np : ℕ+ → Sort u_1\np1 : p 1\nhp : (n : ℕ+) → p n → p (n + 1)\nn✝ : ℕ\nh : 0 < succ n✝\n⊢ recOn ({ val := succ n✝, property := h } + 1) p1 hp =\n hp { val := succ n✝, property := h } (recOn { val := succ n✝, property := h } p1 hp)\n[PROOFSTEP]\nrfl\n[GOAL]\nk : ℕ+\nq : ℕ\nx✝ : ¬(0 = 0 ∧ q + 1 = 0)\n⊢ ↑(modDivAux k 0 (q + 1)).fst + ↑k * (modDivAux k 0 (q + 1)).snd = 0 + ↑k * (q + 1)\n[PROOFSTEP]\nchange (k : ℕ) + (k : ℕ) * (q + 1).pred = 0 + (k : ℕ) * (q + 1)\n[GOAL]\nk : ℕ+\nq : ℕ\nx✝ : ¬(0 = 0 ∧ q + 1 = 0)\n⊢ ↑k + ↑k * pred (q + 1) = 0 + ↑k * (q + 1)\n[PROOFSTEP]\nrw [Nat.pred_succ, Nat.mul_succ, zero_add, add_comm]\n[GOAL]\nm k : ℕ+\n⊢ ↑(mod m k) + ↑k * div m k = ↑m\n[PROOFSTEP]\nlet h₀ := Nat.mod_add_div (m : ℕ) (k : ℕ)\n[GOAL]\nm k : ℕ+\nh₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k\n⊢ ↑(mod m k) + ↑k * div m k = ↑m\n[PROOFSTEP]\nhave : ¬((m : ℕ) % (k : ℕ) = 0 ∧ (m : ℕ) / (k : ℕ) = 0) :=\n by\n rintro ⟨hr, hq⟩\n rw [hr, hq, mul_zero, zero_add] at h₀ \n exact (m.ne_zero h₀.symm).elim\n[GOAL]\nm k : ℕ+\nh₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k\n⊢ ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)\n[PROOFSTEP]\nrintro ⟨hr, hq⟩\n[GOAL]\ncase intro\nm k : ℕ+\nh₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k\nhr : ↑m % ↑k = 0\nhq : ↑m / ↑k = 0\n⊢ False\n[PROOFSTEP]\nrw [hr, hq, mul_zero, zero_add] at h₀ \n[GOAL]\ncase intro\nm k : ℕ+\nh₀ : 0 = ↑m\nhr : ↑m % ↑k = 0\nhq : ↑m / ↑k = 0\n⊢ False\n[PROOFSTEP]\nexact (m.ne_zero h₀.symm).elim\n[GOAL]\nm k : ℕ+\nh₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k\nthis : ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)\n⊢ ↑(mod m k) + ↑k * div m k = ↑m\n[PROOFSTEP]\nhave := modDivAux_spec k ((m : ℕ) % (k : ℕ)) ((m : ℕ) / (k : ℕ)) this\n[GOAL]\nm k : ℕ+\nh₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k\nthis✝ : ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)\nthis : ↑(modDivAux k (↑m % ↑k) (↑m / ↑k)).fst + ↑k * (modDivAux k (↑m % ↑k) (↑m / ↑k)).snd = ↑m % ↑k + ↑k * (↑m / ↑k)\n⊢ ↑(mod m k) + ↑k * div m k = ↑m\n[PROOFSTEP]\nexact this.trans h₀\n[GOAL]\nm k : ℕ+\n⊢ ↑(mod m k) + div m k * ↑k = ↑m\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm k : ℕ+\n⊢ ↑(mod m k) + ↑k * div m k = ↑m\n[PROOFSTEP]\nexact mod_add_div _ _\n[GOAL]\nm k : ℕ+\n⊢ div m k * ↑k + ↑(mod m k) = ↑m\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm k : ℕ+\n⊢ ↑k * div m k + ↑(mod m k) = ↑m\n[PROOFSTEP]\nexact div_add_mod _ _\n[GOAL]\nm k : ℕ+\n⊢ mod m k ≤ m ∧ mod m k ≤ k\n[PROOFSTEP]\nchange (mod m k : ℕ) ≤ (m : ℕ) ∧ (mod m k : ℕ) ≤ (k : ℕ)\n[GOAL]\nm k : ℕ+\n⊢ ↑(mod m k) ≤ ↑m ∧ ↑(mod m k) ≤ ↑k\n[PROOFSTEP]\nrw [mod_coe]\n[GOAL]\nm k : ℕ+\n⊢ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑m ∧ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑k\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nm k : ℕ+\nh : ↑m % ↑k = 0\n⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nhave hm : (m : ℕ) > 0 := m.pos\n[GOAL]\ncase pos\nm k : ℕ+\nh : ↑m % ↑k = 0\nhm : ↑m > 0\n⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nrw [← Nat.mod_add_div (m : ℕ) (k : ℕ), h, zero_add] at hm ⊢\n[GOAL]\ncase pos\nm k : ℕ+\nh : ↑m % ↑k = 0\nhm : ↑k * (↑m / ↑k) > 0\n⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nby_cases h₁ : (m : ℕ) / (k : ℕ) = 0\n[GOAL]\ncase pos\nm k : ℕ+\nh : ↑m % ↑k = 0\nhm : ↑k * (↑m / ↑k) > 0\nh₁ : ↑m / ↑k = 0\n⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nrw [h₁, mul_zero] at hm \n[GOAL]\ncase pos\nm k : ℕ+\nh : ↑m % ↑k = 0\nhm : 0 > 0\nh₁ : ↑m / ↑k = 0\n⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nexact (lt_irrefl _ hm).elim\n[GOAL]\ncase neg\nm k : ℕ+\nh : ↑m % ↑k = 0\nhm : ↑k * (↑m / ↑k) > 0\nh₁ : ¬↑m / ↑k = 0\n⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nlet h₂ : (k : ℕ) * 1 ≤ k * (m / k) :=\n -- Porting note : Specified type of `h₂` explicitly because `rw` could not unify\n -- `succ 0` with `1`.Nat.mul_le_mul_left (k : ℕ) (Nat.succ_le_of_lt (Nat.pos_of_ne_zero h₁))\n[GOAL]\ncase neg\nm k : ℕ+\nh : ↑m % ↑k = 0\nhm : ↑k * (↑m / ↑k) > 0\nh₁ : ¬↑m / ↑k = 0\nh₂ : ↑k * 1 ≤ ↑k * (↑m / ↑k) := Nat.mul_le_mul_left (↑k) (succ_le_of_lt (Nat.pos_of_ne_zero h₁))\n⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nrw [mul_one] at h₂ \n[GOAL]\ncase neg\nm k : ℕ+\nh : ↑m % ↑k = 0\nhm : ↑k * (↑m / ↑k) > 0\nh₁ : ¬↑m / ↑k = 0\nh₂ : ↑k ≤ ↑k * (↑m / ↑k)\n⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k\n[PROOFSTEP]\nexact ⟨h₂, le_refl (k : ℕ)⟩\n[GOAL]\ncase neg\nm k : ℕ+\nh : ¬↑m % ↑k = 0\n⊢ ↑m % ↑k ≤ ↑m ∧ ↑m % ↑k ≤ ↑k\n[PROOFSTEP]\nexact ⟨Nat.mod_le (m : ℕ) (k : ℕ), (Nat.mod_lt (m : ℕ) k.pos).le⟩\n[GOAL]\nk m : ℕ+\n⊢ k ∣ m ↔ ↑k ∣ ↑m\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk m : ℕ+\n⊢ k ∣ m → ↑k ∣ ↑m\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nk m : ℕ+\n⊢ ↑k ∣ ↑m → k ∣ m\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nk m : ℕ+\nh : k ∣ m\n⊢ ↑k ∣ ↑m\n[PROOFSTEP]\nrcases h with ⟨_, rfl⟩\n[GOAL]\ncase mp.intro\nk w✝ : ℕ+\n⊢ ↑k ∣ ↑(k * w✝)\n[PROOFSTEP]\napply dvd_mul_right\n[GOAL]\ncase mpr\nk m : ℕ+\nh : ↑k ∣ ↑m\n⊢ k ∣ m\n[PROOFSTEP]\nrcases h with ⟨a, h⟩\n[GOAL]\ncase mpr.intro\nk m : ℕ+\na : ℕ\nh : ↑m = ↑k * a\n⊢ k ∣ m\n[PROOFSTEP]\ncases a with\n| zero =>\n contrapose h\n apply ne_zero\n| succ n =>\n use⟨n.succ, n.succ_pos⟩\n rw [← coe_inj, h, mul_coe, mk_coe]\n[GOAL]\ncase mpr.intro\nk m : ℕ+\na : ℕ\nh : ↑m = ↑k * a\n⊢ k ∣ m\n[PROOFSTEP]\ncases a with\n| zero =>\n contrapose h\n apply ne_zero\n| succ n =>\n use⟨n.succ, n.succ_pos⟩\n rw [← coe_inj, h, mul_coe, mk_coe]\n[GOAL]\ncase mpr.intro.zero\nk m : ℕ+\nh : ↑m = ↑k * zero\n⊢ k ∣ m\n[PROOFSTEP]\n\n| zero =>\n contrapose h\n apply ne_zero\n[GOAL]\ncase mpr.intro.zero\nk m : ℕ+\nh : ↑m = ↑k * zero\n⊢ k ∣ m\n[PROOFSTEP]\ncontrapose h\n[GOAL]\ncase mpr.intro.zero\nk m : ℕ+\nh : ¬k ∣ m\n⊢ ¬↑m = ↑k * zero\n[PROOFSTEP]\napply ne_zero\n[GOAL]\ncase mpr.intro.succ\nk m : ℕ+\nn : ℕ\nh : ↑m = ↑k * succ n\n⊢ k ∣ m\n[PROOFSTEP]\n\n| succ n =>\n use⟨n.succ, n.succ_pos⟩\n rw [← coe_inj, h, mul_coe, mk_coe]\n[GOAL]\ncase mpr.intro.succ\nk m : ℕ+\nn : ℕ\nh : ↑m = ↑k * succ n\n⊢ k ∣ m\n[PROOFSTEP]\nuse⟨n.succ, n.succ_pos⟩\n[GOAL]\ncase h\nk m : ℕ+\nn : ℕ\nh : ↑m = ↑k * succ n\n⊢ m = k * { val := succ n, property := (_ : 0 < succ n) }\n[PROOFSTEP]\nrw [← coe_inj, h, mul_coe, mk_coe]\n[GOAL]\nk m : ℕ+\n⊢ k ∣ m ↔ mod m k = k\n[PROOFSTEP]\nrw [dvd_iff]\n[GOAL]\nk m : ℕ+\n⊢ ↑k ∣ ↑m ↔ mod m k = k\n[PROOFSTEP]\nrw [Nat.dvd_iff_mod_eq_zero]\n[GOAL]\nk m : ℕ+\n⊢ ↑m % ↑k = 0 ↔ mod m k = k\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk m : ℕ+\n⊢ ↑m % ↑k = 0 → mod m k = k\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nk m : ℕ+\nh : ↑m % ↑k = 0\n⊢ mod m k = k\n[PROOFSTEP]\napply PNat.eq\n[GOAL]\ncase mp.a\nk m : ℕ+\nh : ↑m % ↑k = 0\n⊢ ↑(mod m k) = ↑k\n[PROOFSTEP]\nrw [mod_coe, if_pos h]\n[GOAL]\ncase mpr\nk m : ℕ+\n⊢ mod m k = k → ↑m % ↑k = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nk m : ℕ+\nh : mod m k = k\n⊢ ↑m % ↑k = 0\n[PROOFSTEP]\nby_cases h' : (m : ℕ) % (k : ℕ) = 0\n[GOAL]\ncase pos\nk m : ℕ+\nh : mod m k = k\nh' : ↑m % ↑k = 0\n⊢ ↑m % ↑k = 0\n[PROOFSTEP]\nexact h'\n[GOAL]\ncase neg\nk m : ℕ+\nh : mod m k = k\nh' : ¬↑m % ↑k = 0\n⊢ ↑m % ↑k = 0\n[PROOFSTEP]\nreplace h : (mod m k : ℕ) = (k : ℕ) := congr_arg _ h\n[GOAL]\ncase neg\nk m : ℕ+\nh' : ¬↑m % ↑k = 0\nh : ↑(mod m k) = ↑k\n⊢ ↑m % ↑k = 0\n[PROOFSTEP]\nrw [mod_coe, if_neg h'] at h \n[GOAL]\ncase neg\nk m : ℕ+\nh' : ¬↑m % ↑k = 0\nh : ↑m % ↑k = ↑k\n⊢ ↑m % ↑k = 0\n[PROOFSTEP]\nexact ((Nat.mod_lt (m : ℕ) k.pos).ne h).elim\n[GOAL]\nm n : ℕ+\n⊢ m ∣ n → m ≤ n\n[PROOFSTEP]\nrw [dvd_iff']\n[GOAL]\nm n : ℕ+\n⊢ mod n m = m → m ≤ n\n[PROOFSTEP]\nintro h\n[GOAL]\nm n : ℕ+\nh : mod n m = m\n⊢ m ≤ n\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nm n : ℕ+\nh : mod n m = m\n⊢ mod n m ≤ n\n[PROOFSTEP]\napply (mod_le n m).left\n[GOAL]\nm k : ℕ+\nh : k ∣ m\n⊢ k * divExact m k = m\n[PROOFSTEP]\napply PNat.eq\n[GOAL]\ncase a\nm k : ℕ+\nh : k ∣ m\n⊢ ↑(k * divExact m k) = ↑m\n[PROOFSTEP]\nrw [mul_coe]\n[GOAL]\ncase a\nm k : ℕ+\nh : k ∣ m\n⊢ ↑k * ↑(divExact m k) = ↑m\n[PROOFSTEP]\nchange (k : ℕ) * (div m k).succ = m\n[GOAL]\ncase a\nm k : ℕ+\nh : k ∣ m\n⊢ ↑k * succ (div m k) = ↑m\n[PROOFSTEP]\nrw [← div_add_mod m k, dvd_iff'.mp h, Nat.mul_succ]\n[GOAL]\nn : ℕ+\na : ℕ\nh : a ∣ ↑n\n⊢ 0 < a\n[PROOFSTEP]\napply pos_iff_ne_zero.2\n[GOAL]\nn : ℕ+\na : ℕ\nh : a ∣ ↑n\n⊢ a ≠ 0\n[PROOFSTEP]\nintro hzero\n[GOAL]\nn : ℕ+\na : ℕ\nh : a ∣ ↑n\nhzero : a = 0\n⊢ False\n[PROOFSTEP]\nrw [hzero] at h \n[GOAL]\nn : ℕ+\na : ℕ\nh : 0 ∣ ↑n\nhzero : a = 0\n⊢ False\n[PROOFSTEP]\nexact PNat.ne_zero n (eq_zero_of_zero_dvd h)\n", "meta": {"mathlib_filename": "Mathlib.Data.PNat.Basic", "llama_tokens": 7763, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.839733955639775, "lm_q2_score": 0.7431680029241321, "lm_q1q2_score": 0.6240634068003934}} {"text": "[GOAL]\na : ℤ\np : ℕ\npp : Fact (Nat.Prime p)\n⊢ ↑a = 0 ↔ Int.gcd a ↑p ≠ 1\n[PROOFSTEP]\nrw [Ne, Int.gcd_comm, Int.gcd_eq_one_iff_coprime, (Nat.prime_iff_prime_int.1 pp.1).coprime_iff_not_dvd,\n Classical.not_not, int_cast_zmod_eq_zero_iff_dvd]\n", "meta": {"mathlib_filename": "Mathlib.Data.ZMod.Coprime", "llama_tokens": 136, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8962513814471134, "lm_q2_score": 0.6959583250334526, "lm_q1q2_score": 0.623753610240851}} {"text": "[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx y : L\n⊢ ↑χ ⁅x, y⁆ = 0\n[PROOFSTEP]\nrw [LieHom.map_lie, LieRing.of_associative_ring_bracket, mul_comm, sub_self]\n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx y : L\n⊢ ⁅↑χ x, ↑χ y⁆ = 0\n[PROOFSTEP]\nrw [LieRing.of_associative_ring_bracket, mul_comm, sub_self]\n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ derivedSeries R L 1\n⊢ ↑χ x = 0\n[PROOFSTEP]\nrw [derivedSeries_def, derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_zero, ← LieSubmodule.mem_coeSubmodule,\n LieSubmodule.lieIdeal_oper_eq_linear_span] at h \n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\n⊢ ↑χ x = 0\n[PROOFSTEP]\nrefine' Submodule.span_induction h _ _ _ _\n[GOAL]\ncase refine'_1\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\n⊢ ∀ (x : L), x ∈ {m | ∃ x n, ⁅↑x, ↑n⁆ = m} → ↑χ x = 0\n[PROOFSTEP]\nrintro y ⟨⟨z, hz⟩, ⟨⟨w, hw⟩, rfl⟩⟩\n[GOAL]\ncase refine'_1.intro.mk.intro.mk\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\nz : L\nhz : z ∈ ⊤\nw : L\nhw : w ∈ ⊤\n⊢ ↑χ ⁅↑{ val := z, property := hz }, ↑{ val := w, property := hw }⁆ = 0\n[PROOFSTEP]\napply lieCharacter_apply_lie\n[GOAL]\ncase refine'_2\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\n⊢ ↑χ 0 = 0\n[PROOFSTEP]\nexact χ.map_zero\n[GOAL]\ncase refine'_3\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\n⊢ ∀ (x y : L), ↑χ x = 0 → ↑χ y = 0 → ↑χ (x + y) = 0\n[PROOFSTEP]\nintro y z hy hz\n[GOAL]\ncase refine'_3\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\ny z : L\nhy : ↑χ y = 0\nhz : ↑χ z = 0\n⊢ ↑χ (y + z) = 0\n[PROOFSTEP]\nrw [LieHom.map_add, hy, hz, add_zero]\n[GOAL]\ncase refine'_4\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\n⊢ ∀ (a : R) (x : L), ↑χ x = 0 → ↑χ (a • x) = 0\n[PROOFSTEP]\nintro t y hy\n[GOAL]\ncase refine'_4\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nχ : LieCharacter R L\nx : L\nh : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}\nt : R\ny : L\nhy : ↑χ y = 0\n⊢ ↑χ (t • y) = 0\n[PROOFSTEP]\nrw [LieHom.map_smul, hy, smul_zero]\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsLieAbelian L\nψ : Module.Dual R L\nx y : L\n⊢ AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n x,\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n y⁆\n[PROOFSTEP]\nrw [LieModule.IsTrivial.trivial, LieRing.of_associative_ring_bracket, mul_comm, sub_self, LinearMap.toFun_eq_coe,\n LinearMap.map_zero]\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsLieAbelian L\nχ : LieCharacter R L\n⊢ (fun ψ =>\n {\n toLinearMap :=\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L), AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },\n map_lie' :=\n (_ :\n ∀ {x y : L},\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n x,\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n y⁆) })\n ((fun χ => ↑χ) χ) =\n χ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsLieAbelian L\nχ : LieCharacter R L\nx✝ : L\n⊢ ↑((fun ψ =>\n {\n toLinearMap :=\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },\n map_lie' :=\n (_ :\n ∀ {x y : L},\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n x,\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n y⁆) })\n ((fun χ => ↑χ) χ))\n x✝ =\n ↑χ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsLieAbelian L\nψ : Module.Dual R L\n⊢ (fun χ => ↑χ)\n ((fun ψ =>\n {\n toLinearMap :=\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },\n map_lie' :=\n (_ :\n ∀ {x y : L},\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n x,\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n y⁆) })\n ψ) =\n ψ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsLieAbelian L\nψ : Module.Dual R L\nx✝ : L\n⊢ ↑((fun χ => ↑χ)\n ((fun ψ =>\n {\n toLinearMap :=\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },\n map_lie' :=\n (_ :\n ∀ {x y : L},\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n x,\n AddHom.toFun\n { toAddHom := ψ.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : L),\n AddHom.toFun ψ.toAddHom (r • x) =\n ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom\n y⁆) })\n ψ))\n x✝ =\n ↑ψ x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Character", "llama_tokens": 4374, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357666736772, "lm_q2_score": 0.7185944046238981, "lm_q1q2_score": 0.6230470505404961}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\n⊢ |a * b| = |a| * |b|\n[PROOFSTEP]\nrw [abs_eq (mul_nonneg (abs_nonneg a) (abs_nonneg b))]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\n⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)\n[PROOFSTEP]\ncases' le_total a 0 with ha ha\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\nha : a ≤ 0\n⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)\n[PROOFSTEP]\ncases' le_total b 0 with hb hb\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\nha : 0 ≤ a\n⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)\n[PROOFSTEP]\ncases' le_total b 0 with hb hb\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\nha : a ≤ 0\nhb : b ≤ 0\n⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)\n[PROOFSTEP]\nsimp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\nha : a ≤ 0\nhb : 0 ≤ b\n⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)\n[PROOFSTEP]\nsimp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\nha : 0 ≤ a\nhb : b ≤ 0\n⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)\n[PROOFSTEP]\nsimp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b✝ c a b : α\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)\n[PROOFSTEP]\nsimp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\n⊢ |a * a| = a * a\n[PROOFSTEP]\nrw [abs_mul, abs_mul_abs_self]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| = a ↔ 0 ≤ a\n[PROOFSTEP]\nsimp [abs_eq_max_neg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| = -a ↔ a ≤ 0\n[PROOFSTEP]\nsimp [abs_eq_max_neg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\n⊢ |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0\n[PROOFSTEP]\nby_cases h : 0 ≤ a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\nh : 0 ≤ a\n⊢ |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\nh : 0 ≤ a\n⊢ |a| = a ∧ 0 ≤ a\n[PROOFSTEP]\nexact ⟨abs_eq_self.mpr h, h⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\nh : ¬0 ≤ a\n⊢ |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\nh : ¬0 ≤ a\n⊢ |a| = -a ∧ a < 0\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\nh : a < 0\n⊢ |a| = -a ∧ a < 0\n[PROOFSTEP]\nexact ⟨abs_eq_neg_self.mpr (le_of_lt h), h⟩\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\n⊢ max a 0 + max (-a) 0 = |a|\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\n⊢ |a| = max a 0 + max (-a) 0\n[PROOFSTEP]\nrcases le_total 0 a with (ha | ha)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\nha : 0 ≤ a\n⊢ |a| = max a 0 + max (-a) 0\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : LinearOrderedRing α\na✝ b c a : α\nha : a ≤ 0\n⊢ |a| = max a 0 + max (-a) 0\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| = |b| ↔ a * a = b * b\n[PROOFSTEP]\nrw [← abs_mul_abs_self, ← abs_mul_abs_self b]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| = |b| ↔ |a| * |a| = |b| * |b|\n[PROOFSTEP]\nexact (mul_self_inj (abs_nonneg a) (abs_nonneg b)).symm\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| < |b| ↔ a * a < b * b\n[PROOFSTEP]\nrw [← abs_mul_abs_self, ← abs_mul_abs_self b]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| < |b| ↔ |a| * |a| < |b| * |b|\n[PROOFSTEP]\nexact mul_self_lt_mul_self_iff (abs_nonneg a) (abs_nonneg b)\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| ≤ |b| ↔ a * a ≤ b * b\n[PROOFSTEP]\nrw [← abs_mul_abs_self, ← abs_mul_abs_self b]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| ≤ |b| ↔ |a| * |a| ≤ |b| * |b|\n[PROOFSTEP]\nexact mul_self_le_mul_self_iff (abs_nonneg a) (abs_nonneg b)\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedRing α\na b c : α\n⊢ |a| ≤ 1 ↔ a * a ≤ 1\n[PROOFSTEP]\nsimpa only [abs_one, one_mul] using @abs_le_iff_mul_self_le α _ a 1\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedCommRing α\na✝ b✝ c d a b : α\n⊢ |a - b| * |a - b| = a * a + b * b - (1 + 1) * a * b\n[PROOFSTEP]\nrw [abs_mul_abs_self]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedCommRing α\na✝ b✝ c d a b : α\n⊢ (a - b) * (a - b) = a * a + b * b - (1 + 1) * a * b\n[PROOFSTEP]\nsimp only [mul_add, add_comm, add_left_comm, mul_comm, sub_eq_add_neg, mul_one, mul_neg, neg_add_rev, neg_neg,\n add_assoc]\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : LinearOrder α\na✝ b✝ a b : α\n⊢ |a| ∣ b ↔ a ∣ b\n[PROOFSTEP]\ncases' abs_choice a with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : LinearOrder α\na✝ b✝ a b : α\nh : |a| = a\n⊢ |a| ∣ b ↔ a ∣ b\n[PROOFSTEP]\nsimp only [h, neg_dvd]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : LinearOrder α\na✝ b✝ a b : α\nh : |a| = -a\n⊢ |a| ∣ b ↔ a ∣ b\n[PROOFSTEP]\nsimp only [h, neg_dvd]\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : LinearOrder α\na✝ b✝ a b : α\n⊢ a ∣ |b| ↔ a ∣ b\n[PROOFSTEP]\ncases' abs_choice b with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : LinearOrder α\na✝ b✝ a b : α\nh : |b| = b\n⊢ a ∣ |b| ↔ a ∣ b\n[PROOFSTEP]\nsimp only [h, dvd_neg]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : LinearOrder α\na✝ b✝ a b : α\nh : |b| = -b\n⊢ a ∣ |b| ↔ a ∣ b\n[PROOFSTEP]\nsimp only [h, dvd_neg]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Ring.Abs", "llama_tokens": 3267, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950868503681, "lm_q2_score": 0.7371581568543044, "lm_q1q2_score": 0.6220841468010204}} {"text": "[GOAL]\np a b k : ℕ\nhp : Prime p\nhap : a < p\nhbp : b < p\nh : p ≤ a + b\n⊢ p ∣ choose (a + b) a\n[PROOFSTEP]\nhave h₁ : p ∣ (a + b)! := hp.dvd_factorial.2 h\n[GOAL]\np a b k : ℕ\nhp : Prime p\nhap : a < p\nhbp : b < p\nh : p ≤ a + b\nh₁ : p ∣ (a + b)!\n⊢ p ∣ choose (a + b) a\n[PROOFSTEP]\nrw [← add_choose_mul_factorial_mul_factorial, ← choose_symm_add, hp.dvd_mul, hp.dvd_mul, hp.dvd_factorial,\n hp.dvd_factorial] at h₁ \n[GOAL]\np a b k : ℕ\nhp : Prime p\nhap : a < p\nhbp : b < p\nh : p ≤ a + b\nh₁ : (p ∣ choose (a + b) a ∨ p ≤ a) ∨ p ≤ b\n⊢ p ∣ choose (a + b) a\n[PROOFSTEP]\nexact (h₁.resolve_right hbp.not_le).resolve_right hap.not_le\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Choose.Dvd", "llama_tokens": 338, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8933094060543488, "lm_q2_score": 0.6959583313396339, "lm_q1q2_score": 0.621706123607584}} {"text": "[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\n⊢ Nat.Prime p\n[PROOFSTEP]\nhave h0 : p ≠ 0 := by\n rintro ⟨⟩\n exact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase refl\na : ZMod 0\nha : a ^ (0 - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ 0 - 1 → a ^ ((0 - 1) / q) ≠ 1\n⊢ False\n[PROOFSTEP]\nexact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\n⊢ Nat.Prime p\n[PROOFSTEP]\nhave h1 : p ≠ 1 := by\n rintro ⟨⟩\n exact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\n⊢ p ≠ 1\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase refl\na : ZMod 1\nha : a ^ (1 - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ 1 - 1 → a ^ ((1 - 1) / q) ≠ 1\nh0 : 1 ≠ 0\n⊢ False\n[PROOFSTEP]\nexact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\n⊢ Nat.Prime p\n[PROOFSTEP]\nhave hp1 : 1 < p := lt_of_le_of_ne h0.bot_lt h1.symm\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\n⊢ Nat.Prime p\n[PROOFSTEP]\nhave order_of_a : orderOf a = p - 1 :=\n by\n apply orderOf_eq_of_pow_and_pow_div_prime _ ha hd\n exact tsub_pos_of_lt hp1\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\n⊢ orderOf a = p - 1\n[PROOFSTEP]\napply orderOf_eq_of_pow_and_pow_div_prime _ ha hd\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\n⊢ 0 < p - 1\n[PROOFSTEP]\nexact tsub_pos_of_lt hp1\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\norder_of_a : orderOf a = p - 1\n⊢ Nat.Prime p\n[PROOFSTEP]\nhaveI : NeZero p := ⟨h0⟩\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\norder_of_a : orderOf a = p - 1\nthis : NeZero p\n⊢ Nat.Prime p\n[PROOFSTEP]\nrw [Nat.prime_iff_card_units]\n -- Prove cardinality of `Units` of `ZMod p` is both `≤ p-1` and `≥ p-1`\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\norder_of_a : orderOf a = p - 1\nthis : NeZero p\n⊢ Fintype.card (ZMod p)ˣ = p - 1\n[PROOFSTEP]\nrefine' le_antisymm (Nat.card_units_zmod_lt_sub_one hp1) _\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\norder_of_a : orderOf a = p - 1\nthis : NeZero p\n⊢ p - 1 ≤ Fintype.card (ZMod p)ˣ\n[PROOFSTEP]\nhave hp' : p - 2 + 1 = p - 1 := tsub_add_eq_add_tsub hp1\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\norder_of_a : orderOf a = p - 1\nthis : NeZero p\nhp' : p - 2 + 1 = p - 1\n⊢ p - 1 ≤ Fintype.card (ZMod p)ˣ\n[PROOFSTEP]\nlet a' : (ZMod p)ˣ := Units.mkOfMulEqOne a (a ^ (p - 2)) (by rw [← pow_succ, hp', ha])\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\norder_of_a : orderOf a = p - 1\nthis : NeZero p\nhp' : p - 2 + 1 = p - 1\n⊢ a * a ^ (p - 2) = 1\n[PROOFSTEP]\nrw [← pow_succ, hp', ha]\n[GOAL]\np : ℕ\na : ZMod p\nha : a ^ (p - 1) = 1\nhd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1\nh0 : p ≠ 0\nh1 : p ≠ 1\nhp1 : 1 < p\norder_of_a : orderOf a = p - 1\nthis : NeZero p\nhp' : p - 2 + 1 = p - 1\na' : (ZMod p)ˣ := Units.mkOfMulEqOne a (a ^ (p - 2)) (_ : a * a ^ (p - 2) = 1)\n⊢ p - 1 ≤ Fintype.card (ZMod p)ˣ\n[PROOFSTEP]\ncalc\n p - 1 = orderOf a := order_of_a.symm\n _ = orderOf a' := (orderOf_injective (Units.coeHom (ZMod p)) Units.ext a')\n _ ≤ Fintype.card (ZMod p)ˣ := orderOf_le_card_univ\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LucasPrimality", "llama_tokens": 2561, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8723473680407889, "lm_q2_score": 0.7122321842389469, "lm_q1q2_score": 0.6213138713547876}} {"text": "[GOAL]\nS : Set ℍ\n⊢ S ∈ atImInfty ↔ ∃ A, ∀ (z : ℍ), A ≤ im z → z ∈ S\n[PROOFSTEP]\nsimp only [atImInfty_basis.mem_iff, true_and]\n[GOAL]\nS : Set ℍ\n⊢ (∃ i, im ⁻¹' Set.Ici i ⊆ S) ↔ ∃ A, ∀ (z : ℍ), A ≤ im z → z ∈ S\n[PROOFSTEP]\nrfl\n[GOAL]\nf g : ℍ → ℂ\nhf : IsBoundedAtImInfty f\nhg : IsBoundedAtImInfty g\n⊢ IsBoundedAtImInfty (f * g)\n[PROOFSTEP]\nsimpa only [Pi.one_apply, mul_one, norm_eq_abs] using hf.mul hg\n[GOAL]\nf : ℍ → ℂ\n⊢ IsBoundedAtImInfty f ↔ ∃ M A, ∀ (z : ℍ), A ≤ im z → ↑Complex.abs (f z) ≤ M\n[PROOFSTEP]\nsimp [IsBoundedAtImInfty, BoundedAtFilter, Asymptotics.isBigO_iff, Filter.Eventually, atImInfty_mem]\n[GOAL]\nf : ℍ → ℂ\n⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, True ∧ ∀ (x : ℍ), x ∈ im ⁻¹' Set.Ici ia → f x ∈ Metric.closedBall 0 ib) ↔\n ∀ (ε : ℝ), 0 < ε → ∃ A, ∀ (z : ℍ), A ≤ im z → ↑Complex.abs (f z) ≤ ε\n[PROOFSTEP]\nsimp only [true_and, mem_closedBall_zero_iff]\n[GOAL]\nf : ℍ → ℂ\n⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, ∀ (x : ℍ), x ∈ im ⁻¹' Set.Ici ia → ‖f x‖ ≤ ib) ↔\n ∀ (ε : ℝ), 0 < ε → ∃ A, ∀ (z : ℍ), A ≤ im z → ↑Complex.abs (f z) ≤ ε\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty", "llama_tokens": 628, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8791467580102418, "lm_q2_score": 0.7057850340255386, "lm_q1q2_score": 0.6204886245157004}} {"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx✝¹ : E\ns t : Set E\nL L₁ L₂ : Filter E\nx✝ : E\nx : E × E\n⊢ 0 = ↑e x.fst - ↑e x.snd - ↑e (x.fst - x.snd)\n[PROOFSTEP]\nsimp only [e.map_sub, sub_self]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx✝ : E\ns t : Set E\nL L₁ L₂ : Filter E\nx : E\n⊢ 0 = ↑e x - ↑e x✝ - ↑e (x - x✝)\n[PROOFSTEP]\nsimp only [e.map_sub, sub_self]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ fderivWithin 𝕜 (↑e) s x = e\n[PROOFSTEP]\nrw [DifferentiableAt.fderivWithin e.differentiableAt hxs]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ fderiv 𝕜 (↑e) x = e\n[PROOFSTEP]\nexact e.fderiv\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nh : IsBoundedLinearMap 𝕜 f\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ _root_.fderivWithin 𝕜 f s x = toContinuousLinearMap h\n[PROOFSTEP]\nrw [DifferentiableAt.fderivWithin h.differentiableAt hxs]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nh : IsBoundedLinearMap 𝕜 f\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ _root_.fderiv 𝕜 f x = toContinuousLinearMap h\n[PROOFSTEP]\nexact h.fderiv\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.FDeriv.Linear", "llama_tokens": 1652, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677583778258, "lm_q2_score": 0.7310585669110203, "lm_q1q2_score": 0.6199140942264437}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns : Multiset α\nl l' : List α\nh : l ~ l'\n⊢ (fun l => List.toFinset (permutations l)) l = (fun l => List.toFinset (permutations l)) l'\n[PROOFSTEP]\next sl\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\ns : Multiset α\nl l' : List α\nh : l ~ l'\nsl : List α\n⊢ sl ∈ (fun l => List.toFinset (permutations l)) l ↔ sl ∈ (fun l => List.toFinset (permutations l)) l'\n[PROOFSTEP]\nsimp only [mem_permutations, List.mem_toFinset]\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\ns : Multiset α\nl l' : List α\nh : l ~ l'\nsl : List α\n⊢ sl ~ l ↔ sl ~ l'\n[PROOFSTEP]\nexact ⟨fun hs => hs.trans h, fun hs => hs.trans h.symm⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns : Multiset α\nl : List α\n⊢ l ∈ lists s ↔ s = Quotient.mk (isSetoid α) l\n[PROOFSTEP]\ninduction s using Quotient.inductionOn\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : DecidableEq α\nl a✝ : List α\n⊢ l ∈ lists (Quotient.mk (isSetoid α) a✝) ↔ Quotient.mk (isSetoid α) a✝ = Quotient.mk (isSetoid α) l\n[PROOFSTEP]\nsimpa using perm_comm\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\n⊢ (l ∈ Finset.biUnion (Finset.powerset Finset.univ) fun s => Multiset.lists s.val) ↔ Nodup l\n[PROOFSTEP]\nsuffices (∃ a : Finset α, a.val = ↑l) ↔ l.Nodup by simpa\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\nthis : (∃ a, a.val = ↑l) ↔ Nodup l\n⊢ (l ∈ Finset.biUnion (Finset.powerset Finset.univ) fun s => Multiset.lists s.val) ↔ Nodup l\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\n⊢ (∃ a, a.val = ↑l) ↔ Nodup l\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\n⊢ (∃ a, a.val = ↑l) → Nodup l\n[PROOFSTEP]\nrintro ⟨s, hs⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\ns : Finset α\nhs : s.val = ↑l\n⊢ Nodup l\n[PROOFSTEP]\nsimpa [← Multiset.coe_nodup, ← hs] using s.nodup\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\n⊢ Nodup l → ∃ a, a.val = ↑l\n[PROOFSTEP]\nintro hl\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\nhl : Nodup l\n⊢ ∃ a, a.val = ↑l\n[PROOFSTEP]\nrefine' ⟨⟨↑l, hl⟩, _⟩\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nl : List α\nhl : Nodup l\n⊢ { val := ↑l, nodup := hl }.val = ↑l\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.List", "llama_tokens": 1199, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744673038222, "lm_q2_score": 0.7577943712746406, "lm_q1q2_score": 0.6195533294206991}} {"text": "[GOAL]\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : Fin (n + 1) → α → β\nv : Fin (n + 1) → α\ni : Fin (n + 1)\n⊢ seq f v i = f i (v i)\n[PROOFSTEP]\nsimp_rw [seq, seq_eq]\n[GOAL]\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : Fin (n + 1) → α → β\nv : Fin (n + 1) → α\ni : Fin (n + 1)\n⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) i = f i (v i)\n[PROOFSTEP]\nrefine' i.cases _ fun i => _\n[GOAL]\ncase refine'_1\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : Fin (n + 1) → α → β\nv : Fin (n + 1) → α\ni : Fin (n + 1)\n⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) 0 = f 0 (v 0)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : Fin (n + 1) → α → β\nv : Fin (n + 1) → α\ni✝ : Fin (n + 1)\ni : Fin n\n⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) (Fin.succ i) =\n f (Fin.succ i) (v (Fin.succ i))\n[PROOFSTEP]\nrw [Matrix.cons_val_succ]\n[GOAL]\ncase refine'_2\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : Fin (n + 1) → α → β\nv : Fin (n + 1) → α\ni✝ : Fin (n + 1)\ni : Fin n\n⊢ Matrix.vecTail f i (Matrix.vecTail v i) = f (Fin.succ i) (v (Fin.succ i))\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (Fin 0 → α) → Prop\n⊢ Forall P ↔ ∀ (x : Fin 0 → α), P x\n[PROOFSTEP]\nsimp only [Forall, Fin.forall_fin_zero_pi]\n[GOAL]\nm n : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (Fin 0 → α) → Prop\n⊢ P ![] ↔ P finZeroElim\n[PROOFSTEP]\nrfl\n[GOAL]\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nP : (Fin (Nat.succ n) → α) → Prop\n⊢ Forall P ↔ ∀ (x : Fin (Nat.succ n) → α), P x\n[PROOFSTEP]\nsimp only [Forall, forall_iff, Fin.forall_fin_succ_pi, Matrix.vecCons]\n[GOAL]\nm n : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (Fin 0 → α) → Prop\n⊢ Exists P ↔ ∃ x, P x\n[PROOFSTEP]\nsimp only [Exists, Fin.exists_fin_zero_pi, Matrix.vecEmpty]\n[GOAL]\nm n : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (Fin 0 → α) → Prop\n⊢ P Fin.elim0' ↔ P finZeroElim\n[PROOFSTEP]\nrfl\n[GOAL]\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nP : (Fin (Nat.succ n) → α) → Prop\n⊢ Exists P ↔ ∃ x, P x\n[PROOFSTEP]\nsimp only [Exists, exists_iff, Fin.exists_fin_succ_pi, Matrix.vecCons]\n[GOAL]\nm n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommMonoid α\nn : ℕ\na : Fin (n + 2) → α\n⊢ sum a = ∑ i : Fin (n + 2), a i\n[PROOFSTEP]\nrw [Fin.sum_univ_castSucc, sum, sum_eq]\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.Tuple.Reflection", "llama_tokens": 1335, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950986284991, "lm_q2_score": 0.7341195327172401, "lm_q1q2_score": 0.619519875467523}} {"text": "[GOAL]\nα : Type u\nx : Tree α\n⊢ numLeaves x = numNodes x + 1\n[PROOFSTEP]\ninduction x\n[GOAL]\ncase nil\nα : Type u\n⊢ numLeaves nil = numNodes nil + 1\n[PROOFSTEP]\nsimp [*, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]\n[GOAL]\ncase node\nα : Type u\na✝² : α\na✝¹ a✝ : Tree α\na_ih✝¹ : numLeaves a✝¹ = numNodes a✝¹ + 1\na_ih✝ : numLeaves a✝ = numNodes a✝ + 1\n⊢ numLeaves (node a✝² a✝¹ a✝) = numNodes (node a✝² a✝¹ a✝) + 1\n[PROOFSTEP]\nsimp [*, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]\n[GOAL]\nα : Type u\nx : Tree α\n⊢ 0 < numLeaves x\n[PROOFSTEP]\nrw [numLeaves_eq_numNodes_succ]\n[GOAL]\nα : Type u\nx : Tree α\n⊢ 0 < numNodes x + 1\n[PROOFSTEP]\nexact x.numNodes.zero_lt_succ\n[GOAL]\nα : Type u\nh : nil ≠ nil\n⊢ node () (left nil) (right nil) = nil\n[PROOFSTEP]\ntrivial\n", "meta": {"mathlib_filename": "Mathlib.Data.Tree", "llama_tokens": 393, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246035907933, "lm_q2_score": 0.7431680029241321, "lm_q1q2_score": 0.6193001814381139}} {"text": "[GOAL]\nf : ℂ[X]\nhf : 0 < degree f\n⊢ ∃ z, IsRoot f z\n[PROOFSTEP]\ncontrapose! hf\n[GOAL]\nf : ℂ[X]\nhf : ∀ (z : ℂ), ¬IsRoot f z\n⊢ degree f ≤ 0\n[PROOFSTEP]\nhave : Metric.Bounded (Set.range (eval · f)⁻¹)\n[GOAL]\ncase this\nf : ℂ[X]\nhf : ∀ (z : ℂ), ¬IsRoot f z\n⊢ Metric.Bounded (Set.range (fun x => eval x f)⁻¹)\n[PROOFSTEP]\nobtain ⟨z₀, h₀⟩ := f.exists_forall_norm_le\n[GOAL]\ncase this.intro\nf : ℂ[X]\nhf : ∀ (z : ℂ), ¬IsRoot f z\nz₀ : ℂ\nh₀ : ∀ (y : ℂ), ‖eval z₀ f‖ ≤ ‖eval y f‖\n⊢ Metric.Bounded (Set.range (fun x => eval x f)⁻¹)\n[PROOFSTEP]\nsimp only [Pi.inv_apply, bounded_iff_forall_norm_le, Set.forall_range_iff, norm_inv]\n[GOAL]\ncase this.intro\nf : ℂ[X]\nhf : ∀ (z : ℂ), ¬IsRoot f z\nz₀ : ℂ\nh₀ : ∀ (y : ℂ), ‖eval z₀ f‖ ≤ ‖eval y f‖\n⊢ ∃ C, ∀ (i : ℂ), ‖eval i f‖⁻¹ ≤ C\n[PROOFSTEP]\nexact ⟨‖eval z₀ f‖⁻¹, fun z => inv_le_inv_of_le (norm_pos_iff.2 <| hf z₀) (h₀ z)⟩\n[GOAL]\nf : ℂ[X]\nhf : ∀ (z : ℂ), ¬IsRoot f z\nthis : Metric.Bounded (Set.range (fun x => eval x f)⁻¹)\n⊢ degree f ≤ 0\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := (f.differentiable.inv hf).exists_const_forall_eq_of_bounded this\n[GOAL]\ncase intro\nf : ℂ[X]\nhf : ∀ (z : ℂ), ¬IsRoot f z\nthis : Metric.Bounded (Set.range (fun x => eval x f)⁻¹)\nc : ℂ\nhc : ∀ (z : ℂ), (eval z f)⁻¹ = c\n⊢ degree f ≤ 0\n[PROOFSTEP]\nobtain rfl : f = C c⁻¹ := Polynomial.funext fun z => by rw [eval_C, ← hc z, inv_inv]\n[GOAL]\nf : ℂ[X]\nhf : ∀ (z : ℂ), ¬IsRoot f z\nthis : Metric.Bounded (Set.range (fun x => eval x f)⁻¹)\nc : ℂ\nhc : ∀ (z : ℂ), (eval z f)⁻¹ = c\nz : ℂ\n⊢ eval z f = eval z (↑C c⁻¹)\n[PROOFSTEP]\nrw [eval_C, ← hc z, inv_inv]\n[GOAL]\ncase intro\nc : ℂ\nhf : ∀ (z : ℂ), ¬IsRoot (↑C c⁻¹) z\nthis : Metric.Bounded (Set.range (fun x => eval x (↑C c⁻¹))⁻¹)\nhc : ∀ (z : ℂ), (eval z (↑C c⁻¹))⁻¹ = c\n⊢ degree (↑C c⁻¹) ≤ 0\n[PROOFSTEP]\nexact degree_C_le\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.Polynomial", "llama_tokens": 959, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.826711776992821, "lm_q2_score": 0.7490872243177518, "lm_q1q2_score": 0.6192792303383484}} {"text": "[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf g : M → R\nx y : M\n⊢ polar (f + g) x y = polar f x y + polar g x y\n[PROOFSTEP]\nsimp only [polar, Pi.add_apply]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf g : M → R\nx y : M\n⊢ f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)\n[PROOFSTEP]\nabel\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf g : M → R\nx y : M\n⊢ f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)\n[PROOFSTEP]\nabel\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf : M → R\nx y : M\n⊢ polar (-f) x y = -polar f x y\n[PROOFSTEP]\nsimp only [polar, Pi.neg_apply, sub_eq_add_neg, neg_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁴ : Ring R\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Monoid S\ninst✝ : DistribMulAction S R\nf : M → R\ns : S\nx y : M\n⊢ polar (s • f) x y = s • polar f x y\n[PROOFSTEP]\nsimp only [polar, Pi.smul_apply, smul_sub]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf : M → R\nx y : M\n⊢ polar f x y = polar f y x\n[PROOFSTEP]\nrw [polar, polar, add_comm, sub_sub, sub_sub, add_comm (f x) (f y)]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf : M → R\nx x' y : M\n⊢ polar f (x + x') y = polar f x y + polar f x' y ↔\n f (x + x' + y) + (f x + f x' + f y) = f (x + x') + f (x' + y) + f (y + x)\n[PROOFSTEP]\nsimp only [← add_assoc]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf : M → R\nx x' y : M\n⊢ polar f (x + x') y = polar f x y + polar f x' y ↔\n f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)\n[PROOFSTEP]\nsimp only [polar, sub_eq_iff_eq_add, eq_sub_iff_add_eq, sub_add_eq_add_sub, add_sub]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf : M → R\nx x' y : M\n⊢ f (x + x' + y) + f y + f x' + f y + f x = f (x + y) + f (x' + y) + f y + f (x + x') ↔\n f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)\n[PROOFSTEP]\nsimp only [add_right_comm _ (f y) _, add_right_comm _ (f x') (f x)]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : CommRing R₁\ninst✝ : AddCommGroup M\nf : M → R\nx x' y : M\n⊢ f (x + x' + y) + f x + f x' + f y + f y = f (x + y) + f (x' + y) + f (x + x') + f y ↔\n f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)\n[PROOFSTEP]\nrw [add_comm y x, add_right_comm _ _ (f (x + y)), add_comm _ (f (x + y)), add_right_comm (f (x + y)), add_left_inj]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁴ : Ring R\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\nF : Type u_6\ninst✝¹ : Ring S\ninst✝ : AddMonoidHomClass F R S\nf : M → R\ng : F\nx y : M\n⊢ polar (↑g ∘ f) x y = ↑g (polar f x y)\n[PROOFSTEP]\nsimp only [polar, Pi.smul_apply, Function.comp_apply, map_sub]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ Q' x y : QuadraticForm R M\nh : x.toFun = y.toFun\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ Q' y : QuadraticForm R M\ntoFun✝ : M → R\ntoFun_smul✝ : ∀ (a : R) (x : M), toFun✝ (a • x) = a * a * toFun✝ x\nexists_companion'✝ : ∃ B, ∀ (x y : M), toFun✝ (x + y) = toFun✝ x + toFun✝ y + BilinForm.bilin B x y\nh : { toFun := toFun✝, toFun_smul := toFun_smul✝, exists_companion' := exists_companion'✝ }.toFun = y.toFun\n⊢ { toFun := toFun✝, toFun_smul := toFun_smul✝, exists_companion' := exists_companion'✝ } = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\ntoFun✝¹ : M → R\ntoFun_smul✝¹ : ∀ (a : R) (x : M), toFun✝¹ (a • x) = a * a * toFun✝¹ x\nexists_companion'✝¹ : ∃ B, ∀ (x y : M), toFun✝¹ (x + y) = toFun✝¹ x + toFun✝¹ y + BilinForm.bilin B x y\ntoFun✝ : M → R\ntoFun_smul✝ : ∀ (a : R) (x : M), toFun✝ (a • x) = a * a * toFun✝ x\nexists_companion'✝ : ∃ B, ∀ (x y : M), toFun✝ (x + y) = toFun✝ x + toFun✝ y + BilinForm.bilin B x y\nh :\n { toFun := toFun✝¹, toFun_smul := toFun_smul✝¹, exists_companion' := exists_companion'✝¹ }.toFun =\n { toFun := toFun✝, toFun_smul := toFun_smul✝, exists_companion' := exists_companion'✝ }.toFun\n⊢ { toFun := toFun✝¹, toFun_smul := toFun_smul✝¹, exists_companion' := exists_companion'✝¹ } =\n { toFun := toFun✝, toFun_smul := toFun_smul✝, exists_companion' := exists_companion'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y z : M\n⊢ ↑Q (x + y + z) + (↑Q x + ↑Q y + ↑Q z) = ↑Q (x + y) + ↑Q (y + z) + ↑Q (z + x)\n[PROOFSTEP]\nobtain ⟨B, h⟩ := Q.exists_companion\n[GOAL]\ncase intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y z : M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\n⊢ ↑Q (x + y + z) + (↑Q x + ↑Q y + ↑Q z) = ↑Q (x + y) + ↑Q (y + z) + ↑Q (z + x)\n[PROOFSTEP]\nrw [add_comm z x]\n[GOAL]\ncase intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y z : M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\n⊢ ↑Q (x + y + z) + (↑Q x + ↑Q y + ↑Q z) = ↑Q (x + y) + ↑Q (y + z) + ↑Q (x + z)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y z : M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\n⊢ ↑Q x + ↑Q y + BilinForm.bilin B x y + ↑Q z + (BilinForm.bilin B x z + BilinForm.bilin B y z) + (↑Q x + ↑Q y + ↑Q z) =\n ↑Q x + ↑Q y + BilinForm.bilin B x y + (↑Q y + ↑Q z + BilinForm.bilin B y z) + (↑Q x + ↑Q z + BilinForm.bilin B x z)\n[PROOFSTEP]\nabel\n[GOAL]\ncase intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y z : M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\n⊢ ↑Q x + ↑Q y + BilinForm.bilin B x y + ↑Q z + (BilinForm.bilin B x z + BilinForm.bilin B y z) + (↑Q x + ↑Q y + ↑Q z) =\n ↑Q x + ↑Q y + BilinForm.bilin B x y + (↑Q y + ↑Q z + BilinForm.bilin B y z) + (↑Q x + ↑Q z + BilinForm.bilin B x z)\n[PROOFSTEP]\nabel\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx : M\n⊢ ↑Q (x + x) = 4 * ↑Q x\n[PROOFSTEP]\nrw [← one_smul R x, ← add_smul, map_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx : M\n⊢ (1 + 1) * (1 + 1) * ↑Q x = 4 * ↑Q (1 • x)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\n⊢ ↑Q 0 = 0\n[PROOFSTEP]\nrw [← @zero_smul R _ _ _ _ (0 : M), map_smul, zero_mul, zero_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nQ : QuadraticForm R M\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\na : S\nx : M\n⊢ ↑Q (a • x) = (a * a) • ↑Q x\n[PROOFSTEP]\nrw [← IsScalarTower.algebraMap_smul R a x, map_smul, ← RingHom.map_mul, Algebra.smul_def]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx : M\n⊢ ↑Q (-x) = ↑Q x\n[PROOFSTEP]\nrw [← @neg_one_smul R _ _ _ _ x, map_smul, neg_one_mul, neg_neg, one_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : M\n⊢ ↑Q (x - y) = ↑Q (y - x)\n[PROOFSTEP]\nrw [← neg_sub, map_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\ny : M\n⊢ polar (↑Q) 0 y = 0\n[PROOFSTEP]\nsimp only [polar, zero_add, QuadraticForm.map_zero, sub_zero, sub_self]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na : R\nx y : M\n⊢ polar (↑Q) (a • x) y = a * polar (↑Q) x y\n[PROOFSTEP]\nobtain ⟨B, h⟩ := Q.exists_companion\n[GOAL]\ncase intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na : R\nx y : M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\n⊢ polar (↑Q) (a • x) y = a * polar (↑Q) x y\n[PROOFSTEP]\nsimp_rw [polar, h, Q.map_smul, BilinForm.smul_left, sub_sub, add_sub_cancel']\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : M\n⊢ polar (↑Q) (-x) y = -polar (↑Q) x y\n[PROOFSTEP]\nrw [← neg_one_smul R x, polar_smul_left, neg_one_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx x' y : M\n⊢ polar (↑Q) (x - x') y = polar (↑Q) x y - polar (↑Q) x' y\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, polar_add_left, polar_neg_left]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\ny : M\n⊢ polar (↑Q) y 0 = 0\n[PROOFSTEP]\nsimp only [add_zero, polar, QuadraticForm.map_zero, sub_self]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y y' : M\n⊢ polar (↑Q) x (y + y') = polar (↑Q) x y + polar (↑Q) x y'\n[PROOFSTEP]\nrw [polar_comm Q x, polar_comm Q x, polar_comm Q x, polar_add_left]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na : R\nx y : M\n⊢ polar (↑Q) x (a • y) = a * polar (↑Q) x y\n[PROOFSTEP]\nrw [polar_comm Q x, polar_comm Q x, polar_smul_left]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : M\n⊢ polar (↑Q) x (-y) = -polar (↑Q) x y\n[PROOFSTEP]\nrw [← neg_one_smul R y, polar_smul_right, neg_one_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y y' : M\n⊢ polar (↑Q) x (y - y') = polar (↑Q) x y - polar (↑Q) x y'\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, polar_add_right, polar_neg_right]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx : M\n⊢ polar (↑Q) x x = 2 * ↑Q x\n[PROOFSTEP]\nrw [polar, map_add_self, sub_sub, sub_eq_iff_eq_add, ← two_mul, ← two_mul, ← mul_assoc]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx : M\n⊢ 4 * ↑Q x = 2 * 2 * ↑Q x\n[PROOFSTEP]\nnorm_num\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y z : M\n⊢ polar (↑Q) x (y + z) = polar (↑Q) x y + polar (↑Q) x z\n[PROOFSTEP]\nsimp_rw [polar_comm _ x, polar_add_left Q]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : CommRing R₁\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nr : R\nx y : M\n⊢ polar (↑Q) x (r • y) = r * polar (↑Q) x y\n[PROOFSTEP]\nsimp_rw [polar_comm _ x, polar_smul_left Q]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nQ : QuadraticForm R M\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\na : S\nx y : M\n⊢ polar (↑Q) (a • x) y = a • polar (↑Q) x y\n[PROOFSTEP]\nrw [← IsScalarTower.algebraMap_smul R a x, polar_smul_left, Algebra.smul_def]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nQ : QuadraticForm R M\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\na : S\nx y : M\n⊢ polar (↑Q) x (a • y) = a • polar (↑Q) x y\n[PROOFSTEP]\nrw [← IsScalarTower.algebraMap_smul R a y, polar_smul_right, Algebra.smul_def]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nQ : QuadraticForm R M\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\ntoFun : M → R\ntoFun_smul : ∀ (a : R) (x : M), toFun (a • x) = a * a * toFun x\npolar_add_left : ∀ (x x' y : M), polar toFun (x + x') y = polar toFun x y + polar toFun x' y\npolar_smul_left : ∀ (a : R) (x y : M), polar toFun (a • x) y = a • polar toFun x y\nx y z : M\n⊢ polar toFun x (y + z) = polar toFun x y + polar toFun x z\n[PROOFSTEP]\nsimp_rw [polar_comm _ x, polar_add_left]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nQ : QuadraticForm R M\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\ntoFun : M → R\ntoFun_smul : ∀ (a : R) (x : M), toFun (a • x) = a * a * toFun x\npolar_add_left : ∀ (x x' y : M), polar toFun (x + x') y = polar toFun x y + polar toFun x' y\npolar_smul_left : ∀ (a : R) (x y : M), polar toFun (a • x) y = a • polar toFun x y\nr : R\nx y : M\n⊢ polar toFun x (r • y) = r * polar toFun x y\n[PROOFSTEP]\nsimp_rw [polar_comm _ x, polar_smul_left, smul_eq_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nQ : QuadraticForm R M\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\ntoFun : M → R\ntoFun_smul : ∀ (a : R) (x : M), toFun (a • x) = a * a * toFun x\npolar_add_left : ∀ (x x' y : M), polar toFun (x + x') y = polar toFun x y + polar toFun x' y\npolar_smul_left : ∀ (a : R) (x y : M), polar toFun (a • x) y = a • polar toFun x y\nx y : M\n⊢ toFun (x + y) =\n toFun x + toFun y +\n BilinForm.bilin\n { bilin := polar toFun, bilin_add_left := polar_add_left, bilin_smul_left := polar_smul_left,\n bilin_add_right := (_ : ∀ (x y z : M), polar toFun x (y + z) = polar toFun x y + polar toFun x z),\n bilin_smul_right := (_ : ∀ (r : R) (x y : M), polar toFun x (r • y) = r * polar toFun x y) }\n x y\n[PROOFSTEP]\nrw [BilinForm.coeFn_mk, polar, sub_sub, add_sub_cancel'_right]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nQ : QuadraticForm R M\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\nx y : M\n⊢ BilinForm.bilin (Exists.choose (_ : ∃ B, ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y)) x y =\n BilinForm.bilin (polarBilin Q) x y\n[PROOFSTEP]\nrw [polarBilin_apply, polar, Q.exists_companion.choose_spec, sub_sub, add_sub_cancel']\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Monoid S\ninst✝⁴ : Monoid T\ninst✝³ : DistribMulAction S R\ninst✝² : DistribMulAction T R\ninst✝¹ : SMulCommClass S R R\ninst✝ : SMulCommClass T R R\na : S\nQ : QuadraticForm R M\nb : R\nx : M\n⊢ (a • ↑Q) (b • x) = b * b * (a • ↑Q) x\n[PROOFSTEP]\nrw [Pi.smul_apply, map_smul, Pi.smul_apply, mul_smul_comm]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Monoid S\ninst✝⁴ : Monoid T\ninst✝³ : DistribMulAction S R\ninst✝² : DistribMulAction T R\ninst✝¹ : SMulCommClass S R R\ninst✝ : SMulCommClass T R R\na : S\nQ : QuadraticForm R M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\n⊢ ∀ (x y : M), (a • ↑Q) (x + y) = (a • ↑Q) x + (a • ↑Q) y + BilinForm.bilin (a • B) x y\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : R\nx✝ : M\n⊢ (fun x => 0) (a • x✝) = a * a * (fun x => 0) x✝\n[PROOFSTEP]\nsimp only [mul_zero]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx✝¹ x✝ : M\n⊢ (fun x => 0) (x✝¹ + x✝) = (fun x => 0) x✝¹ + (fun x => 0) x✝ + BilinForm.bilin 0 x✝¹ x✝\n[PROOFSTEP]\nsimp only [add_zero, BilinForm.zero_apply]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\na : R\nx : M\n⊢ (↑Q + ↑Q') (a • x) = a * a * (↑Q + ↑Q') x\n[PROOFSTEP]\nsimp only [Pi.add_apply, map_smul, mul_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\nB' : BilinForm R M\nh' : ∀ (x y : M), ↑Q' (x + y) = ↑Q' x + ↑Q' y + BilinForm.bilin B' x y\nx y : M\n⊢ (↑Q + ↑Q') (x + y) = (↑Q + ↑Q') x + (↑Q + ↑Q') y + BilinForm.bilin (B + B') x y\n[PROOFSTEP]\nsimp_rw [Pi.add_apply, h, h', BilinForm.add_apply, add_add_add_comm]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : SMulCommClass S R R\nQ : QuadraticForm R M\nx : M\n⊢ ↑(1 • Q) x = ↑Q x\n[PROOFSTEP]\nsimp only [QuadraticForm.smul_apply, one_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : SMulCommClass S R R\na b : S\nQ : QuadraticForm R M\nx : M\n⊢ ↑((a * b) • Q) x = ↑(a • b • Q) x\n[PROOFSTEP]\nsimp only [smul_apply, mul_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : SMulCommClass S R R\na : S\n⊢ a • 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : SMulCommClass S R R\na : S\nx✝ : M\n⊢ ↑(a • 0) x✝ = ↑0 x✝\n[PROOFSTEP]\nsimp only [zero_apply, smul_apply, smul_zero]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : SMulCommClass S R R\na : S\nQ Q' : QuadraticForm R M\n⊢ a • (Q + Q') = a • Q + a • Q'\n[PROOFSTEP]\next\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : SMulCommClass S R R\na : S\nQ Q' : QuadraticForm R M\nx✝ : M\n⊢ ↑(a • (Q + Q')) x✝ = ↑(a • Q + a • Q') x✝\n[PROOFSTEP]\nsimp only [add_apply, smul_apply, smul_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Semiring S\ninst✝¹ : Module S R\ninst✝ : SMulCommClass S R R\na b : S\nQ : QuadraticForm R M\n⊢ (a + b) • Q = a • Q + b • Q\n[PROOFSTEP]\next\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Semiring S\ninst✝¹ : Module S R\ninst✝ : SMulCommClass S R R\na b : S\nQ : QuadraticForm R M\nx✝ : M\n⊢ ↑((a + b) • Q) x✝ = ↑(a • Q + b • Q) x✝\n[PROOFSTEP]\nsimp only [add_apply, smul_apply, add_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Semiring S\ninst✝¹ : Module S R\ninst✝ : SMulCommClass S R R\nQ : QuadraticForm R M\n⊢ 0 • Q = 0\n[PROOFSTEP]\next\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : Semiring S\ninst✝¹ : Module S R\ninst✝ : SMulCommClass S R R\nQ : QuadraticForm R M\nx✝ : M\n⊢ ↑(0 • Q) x✝ = ↑0 x✝\n[PROOFSTEP]\nsimp only [zero_apply, smul_apply, zero_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na : R\nx : M\n⊢ (-↑Q) (a • x) = a * a * (-↑Q) x\n[PROOFSTEP]\nsimp only [Pi.neg_apply, map_smul, mul_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\nx y : M\n⊢ (-↑Q) (x + y) = (-↑Q) x + (-↑Q) y + BilinForm.bilin (-B) x y\n[PROOFSTEP]\nsimp_rw [Pi.neg_apply, h, BilinForm.neg_apply, neg_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nN : Type v\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nQ : QuadraticForm R N\nf : M →ₗ[R] N\na : R\nx : M\n⊢ (fun x => ↑Q (↑f x)) (a • x) = a * a * (fun x => ↑Q (↑f x)) x\n[PROOFSTEP]\nsimp only [map_smul, f.map_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nN : Type v\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nQ : QuadraticForm R N\nf : M →ₗ[R] N\nB : BilinForm R N\nh : ∀ (x y : N), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\nx y : M\n⊢ (fun x => ↑Q (↑f x)) (x + y) =\n (fun x => ↑Q (↑f x)) x + (fun x => ↑Q (↑f x)) y + BilinForm.bilin (BilinForm.comp B f f) x y\n[PROOFSTEP]\nsimp_rw [f.map_add, h, BilinForm.comp_apply]\n[GOAL]\nS✝ : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\nN : Type v\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\nS : Type u_6\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\nf : R →ₗ[S] S\nQ : QuadraticForm R M\nb : S\nx : M\n⊢ (fun x => ↑f (↑Q x)) (b • x) = b * b * (fun x => ↑f (↑Q x)) x\n[PROOFSTEP]\nsimp only [Q.map_smul_of_tower b x, f.map_smul, smul_eq_mul]\n[GOAL]\nS✝ : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\nN : Type v\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\nS : Type u_6\ninst✝³ : CommSemiring S\ninst✝² : Algebra S R\ninst✝¹ : Module S M\ninst✝ : IsScalarTower S R M\nf : R →ₗ[S] S\nQ : QuadraticForm R M\nB : BilinForm R M\nh : ∀ (x y : M), ↑Q (x + y) = ↑Q x + ↑Q y + BilinForm.bilin B x y\nx y : M\n⊢ (fun x => ↑f (↑Q x)) (x + y) =\n (fun x => ↑f (↑Q x)) x + (fun x => ↑f (↑Q x)) y + BilinForm.bilin (LinearMap.compBilinForm f B) x y\n[PROOFSTEP]\nsimp_rw [h, f.map_add, LinearMap.compBilinForm_apply]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf g : M →ₗ[R] R\na : R\nx : M\n⊢ (↑f * ↑g) (a • x) = a * a * (↑f * ↑g) x\n[PROOFSTEP]\nsimp only [smul_eq_mul, RingHom.id_apply, Pi.mul_apply, LinearMap.map_smulₛₗ]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf g : M →ₗ[R] R\na : R\nx : M\n⊢ a * ↑f x * (a * ↑g x) = a * a * (↑f x * ↑g x)\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf g : M →ₗ[R] R\nx y : M\n⊢ (↑f * ↑g) (x + y) =\n (↑f * ↑g) x + (↑f * ↑g) y + BilinForm.bilin (BilinForm.linMulLin f g + BilinForm.linMulLin g f) x y\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf g : M →ₗ[R] R\nx y : M\n⊢ (↑f x + ↑f y) * (↑g x + ↑g y) = ↑f x * ↑g x + ↑f y * ↑g y + (↑f x * ↑g y + ↑g x * ↑f y)\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nB✝ B : BilinForm R M\na : R\nx : M\n⊢ (fun x => bilin B x x) (a • x) = a * a * (fun x => bilin B x x) x\n[PROOFSTEP]\nsimp only [mul_assoc, smul_right, smul_left]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nB✝ B : BilinForm R M\nx y : M\n⊢ (fun x => bilin B x x) (x + y) = (fun x => bilin B x x) x + (fun x => bilin B x x) y + bilin (B + ↑(flipHom ℕ) B) x y\n[PROOFSTEP]\nsimp [add_add_add_comm, add_comm]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nB : BilinForm R M\nx y : M\n⊢ polar (fun x => bilin B x x) x y = bilin B x y + bilin B y x\n[PROOFSTEP]\nsimp only [add_assoc, add_sub_cancel', add_right, polar, add_left_inj, add_neg_cancel_left, add_left,\n sub_eq_add_neg _ (B y y), add_comm (B y x) _]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ Q' : QuadraticForm R M\n⊢ (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) } (polarBilin Q))\n (Q + Q') =\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) } (polarBilin Q))\n Q +\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) } (polarBilin Q))\n Q'\n[PROOFSTEP]\next\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ Q' : QuadraticForm R M\nx✝ y✝ : M\n⊢ bilin\n ((fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) } (polarBilin Q))\n (Q + Q'))\n x✝ y✝ =\n bilin\n ((fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q +\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q')\n x✝ y✝\n[PROOFSTEP]\nsimp only [BilinForm.add_apply, BilinForm.smul_apply, coeFn_mk, polarBilin_apply, polar_add, coeFn_add, smul_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\ns : S\nQ : QuadraticForm R M\n⊢ AddHom.toFun\n {\n toFun := fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) } (polarBilin Q),\n map_add' :=\n (_ :\n ∀ (Q Q' : QuadraticForm R M),\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n (Q + Q') =\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q +\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q') }\n (s • Q) =\n ↑(RingHom.id S) s •\n AddHom.toFun\n {\n toFun := fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q),\n map_add' :=\n (_ :\n ∀ (Q Q' : QuadraticForm R M),\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n (Q + Q') =\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q +\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q') }\n Q\n[PROOFSTEP]\next\n -- porting note: added type annotations\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\ns : S\nQ : QuadraticForm R M\nx✝ y✝ : M\n⊢ bilin\n (AddHom.toFun\n {\n toFun := fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q),\n map_add' :=\n (_ :\n ∀ (Q Q' : QuadraticForm R M),\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n (Q + Q') =\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q +\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q') }\n (s • Q))\n x✝ y✝ =\n bilin\n (↑(RingHom.id S) s •\n AddHom.toFun\n {\n toFun := fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q),\n map_add' :=\n (_ :\n ∀ (Q Q' : QuadraticForm R M),\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n (Q + Q') =\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q +\n (fun Q =>\n (fun x x_1 => x • x_1) { val := ⅟2, property := (_ : ∀ (x : R), Commute x ⅟(OfNat.ofNat 2)) }\n (polarBilin Q))\n Q') }\n Q)\n x✝ y✝\n[PROOFSTEP]\nsimp only [RingHom.id_apply, polar_smul, smul_comm s (_ : Submonoid.center R) (_ : R), polarBilin_apply, coeFn_mk,\n coeFn_smul, BilinForm.smul_apply]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ : QuadraticForm R M\nx y : M\n⊢ bilin (↑(associatedHom S) Q) x y = bilin (↑(associatedHom S) Q) y x\n[PROOFSTEP]\nsimp only [associated_apply, add_comm, add_left_comm, sub_eq_add_neg, add_assoc]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₁\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : Module R₁ M\ninst✝⁴ : CommSemiring S\ninst✝³ : Algebra S R\ninst✝² : Invertible 2\nB₁ : BilinForm R M\nQ : QuadraticForm R M\nN : Type v\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : N →ₗ[R] M\n⊢ ↑(associatedHom S) (comp Q f) = BilinForm.comp (↑(associatedHom S) Q) f f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₁\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : Module R₁ M\ninst✝⁴ : CommSemiring S\ninst✝³ : Algebra S R\ninst✝² : Invertible 2\nB₁ : BilinForm R M\nQ : QuadraticForm R M\nN : Type v\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : N →ₗ[R] M\nx✝ y✝ : N\n⊢ bilin (↑(associatedHom S) (comp Q f)) x✝ y✝ = bilin (BilinForm.comp (↑(associatedHom S) Q) f f) x✝ y✝\n[PROOFSTEP]\nsimp only [QuadraticForm.comp_apply, BilinForm.comp_apply, associated_apply, LinearMap.map_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ : QuadraticForm R M\nB : BilinForm R M\nx y : M\n⊢ bilin (↑(associatedHom S) (toQuadraticForm B)) x y = ⅟2 * (bilin B x y + bilin B y x)\n[PROOFSTEP]\nsimp only [associated_apply, ← polar_to_quadratic_form, polar, toQuadraticForm_apply]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ : QuadraticForm R M\nh : BilinForm.IsSymm B₁\nx y : M\n⊢ bilin (↑(associatedHom S) (toQuadraticForm B₁)) x y = bilin B₁ x y\n[PROOFSTEP]\nrw [associated_toQuadraticForm, h.eq x y, ← two_mul, ← mul_assoc, invOf_mul_self, one_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ : QuadraticForm R M\nx : M\n⊢ bilin (↑(associatedHom S) Q) x x = ↑Q x\n[PROOFSTEP]\nrw [associated_apply, map_add_self, ← three_add_one_eq_four, ← two_add_one_eq_three, add_mul, add_mul, one_mul,\n add_sub_cancel, add_sub_cancel, invOf_mul_self_assoc]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ✝ Q : QuadraticForm R M\nhB₁ : ↑associated' Q ≠ 0\n⊢ ∃ x, ↑Q x ≠ 0\n[PROOFSTEP]\nrw [← not_forall]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ✝ Q : QuadraticForm R M\nhB₁ : ↑associated' Q ≠ 0\n⊢ ¬∀ (x : M), ↑Q x = 0\n[PROOFSTEP]\nintro h\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ✝ Q : QuadraticForm R M\nhB₁ : ↑associated' Q ≠ 0\nh : ∀ (x : M), ↑Q x = 0\n⊢ False\n[PROOFSTEP]\napply hB₁\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : CommRing R₁\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module R₁ M\ninst✝² : CommSemiring S\ninst✝¹ : Algebra S R\ninst✝ : Invertible 2\nB₁ : BilinForm R M\nQ✝ Q : QuadraticForm R M\nhB₁ : ↑associated' Q ≠ 0\nh : ∀ (x : M), ↑Q x = 0\n⊢ ↑associated' Q = 0\n[PROOFSTEP]\nrw [(QuadraticForm.ext h : Q = 0), LinearMap.map_zero]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nf g : M →ₗ[R₁] R₁\n⊢ ↑associated (linMulLin f g) = ⅟2 • (BilinForm.linMulLin f g + BilinForm.linMulLin g f)\n[PROOFSTEP]\next\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nf g : M →ₗ[R₁] R₁\nx✝ y✝ : M\n⊢ bilin (↑associated (linMulLin f g)) x✝ y✝ = bilin (⅟2 • (BilinForm.linMulLin f g + BilinForm.linMulLin g f)) x✝ y✝\n[PROOFSTEP]\nsimp only [smul_add, Algebra.id.smul_eq_mul, BilinForm.linMulLin_apply, QuadraticForm.linMulLin_apply,\n BilinForm.smul_apply, associated_apply, BilinForm.add_apply, LinearMap.map_add]\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nf g : M →ₗ[R₁] R₁\nx✝ y✝ : M\n⊢ ⅟2 * ((↑f x✝ + ↑f y✝) * (↑g x✝ + ↑g y✝) - ↑f x✝ * ↑g x✝ - ↑f y✝ * ↑g y✝) = ⅟2 * (↑f x✝ * ↑g y✝) + ⅟2 * (↑g x✝ * ↑f y✝)\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nQ : QuadraticForm R M\n⊢ ¬Anisotropic Q ↔ ∃ x, x ≠ 0 ∧ ↑Q x = 0\n[PROOFSTEP]\nsimp only [Anisotropic, not_forall, exists_prop, and_comm]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : Invertible 2\nQ : QuadraticForm R M\nhB : Anisotropic Q\nx : M\nhx : ∀ (n : M), bilin (↑associated' Q) x n = 0\n⊢ ↑Q x = 0\n[PROOFSTEP]\nrw [← hx x]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝³ : Ring R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : Invertible 2\nQ : QuadraticForm R M\nhB : Anisotropic Q\nx : M\nhx : ∀ (n : M), bilin (↑associated' Q) x n = 0\n⊢ ↑Q x = bilin (↑associated' Q) x x\n[PROOFSTEP]\nexact (associated_eq_self_apply _ _ x).symm\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nR₂ : Type u\ninst✝² : OrderedRing R₂\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R₂ M\nQ₂ : QuadraticForm R₂ M\nn : Type u_6\nQ : QuadraticForm R₂ M\nhQ : PosDef Q\nx : M\nhQx : ↑Q x = 0\nhx : ¬x = 0\n⊢ 0 < 0\n[PROOFSTEP]\nhave := hQ _ hx\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nR₂ : Type u\ninst✝² : OrderedRing R₂\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R₂ M\nQ₂ : QuadraticForm R₂ M\nn : Type u_6\nQ : QuadraticForm R₂ M\nhQ : PosDef Q\nx : M\nhQx : ↑Q x = 0\nhx : ¬x = 0\nthis : 0 < ↑Q x\n⊢ 0 < 0\n[PROOFSTEP]\nrw [hQx] at this \n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nR₂ : Type u\ninst✝² : OrderedRing R₂\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R₂ M\nQ₂ : QuadraticForm R₂ M\nn : Type u_6\nQ : QuadraticForm R₂ M\nhQ : PosDef Q\nx : M\nhQx : ↑Q x = 0\nhx : ¬x = 0\nthis : 0 < 0\n⊢ 0 < 0\n[PROOFSTEP]\nexact this\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nn : Type w\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing R₁\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\na : R₁\nQ : QuadraticForm R₁ (n → R₁)\n⊢ toMatrix' (a • Q) = a • toMatrix' Q\n[PROOFSTEP]\nsimp only [toMatrix', LinearEquiv.map_smul, LinearMap.map_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nn : Type w\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing R₁\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ (n → R₁)\n⊢ Matrix.IsSymm (toMatrix' Q)\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nn : Type w\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing R₁\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ (n → R₁)\ni j : n\n⊢ Matrix.transpose (toMatrix' Q) i j = toMatrix' Q i j\n[PROOFSTEP]\nrw [toMatrix', Matrix.transpose_apply, BilinForm.toMatrix'_apply, BilinForm.toMatrix'_apply, associated_isSymm]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nn : Type w\ninst✝⁵ : Fintype n\ninst✝⁴ : CommRing R₁\ninst✝³ : DecidableEq n\ninst✝² : Invertible 2\nm : Type w\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nQ : QuadraticForm R₁ (m → R₁)\nf : (n → R₁) →ₗ[R₁] m → R₁\n⊢ toMatrix' (comp Q f) = (↑LinearMap.toMatrix' f)ᵀ * toMatrix' Q * ↑LinearMap.toMatrix' f\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nn : Type w\ninst✝⁵ : Fintype n\ninst✝⁴ : CommRing R₁\ninst✝³ : DecidableEq n\ninst✝² : Invertible 2\nm : Type w\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nQ : QuadraticForm R₁ (m → R₁)\nf : (n → R₁) →ₗ[R₁] m → R₁\ni✝ x✝ : n\n⊢ toMatrix' (comp Q f) i✝ x✝ = ((↑LinearMap.toMatrix' f)ᵀ * toMatrix' Q * ↑LinearMap.toMatrix' f) i✝ x✝\n[PROOFSTEP]\nsimp only [QuadraticForm.associated_comp, BilinForm.toMatrix'_comp, toMatrix']\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nn : Type w\ninst✝⁵ : Fintype n\ninst✝⁴ : CommRing R₁\ninst✝³ : DecidableEq n\ninst✝² : Invertible 2\nm : Type w\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nQ : QuadraticForm R₁ (n → R₁)\na : R₁\n⊢ discr (a • Q) = a ^ Fintype.card n * discr Q\n[PROOFSTEP]\nsimp only [discr, toMatrix'_smul, Matrix.det_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nn : Type w\ninst✝⁵ : Fintype n\ninst✝⁴ : CommRing R₁\ninst✝³ : DecidableEq n\ninst✝² : Invertible 2\nm : Type w\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nQ : QuadraticForm R₁ (n → R₁)\nf : (n → R₁) →ₗ[R₁] n → R₁\n⊢ discr (comp Q f) = det (↑LinearMap.toMatrix' f) * det (↑LinearMap.toMatrix' f) * discr Q\n[PROOFSTEP]\nsimp only [Matrix.det_transpose, mul_left_comm, QuadraticForm.toMatrix'_comp, mul_comm, Matrix.det_mul, discr]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nhtwo : Invertible 2\nB : BilinForm R M\nhB₁ : B ≠ 0\nhB₂ : IsSymm B\n⊢ ∃ x, ¬IsOrtho B x x\n[PROOFSTEP]\nlift B to QuadraticForm R M using hB₂ with Q\n[GOAL]\ncase intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nhtwo : Invertible 2\nB : BilinForm R M\nQ : QuadraticForm R M\nhB₁✝ hB₁ : ↑(QuadraticForm.associatedHom ℕ) Q ≠ 0\n⊢ ∃ x, ¬IsOrtho (↑(QuadraticForm.associatedHom ℕ) Q) x x\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := QuadraticForm.exists_quadraticForm_ne_zero hB₁\n[GOAL]\ncase intro.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nhtwo : Invertible 2\nB : BilinForm R M\nQ : QuadraticForm R M\nhB₁✝ hB₁ : ↑(QuadraticForm.associatedHom ℕ) Q ≠ 0\nx : M\nhx : ↑Q x ≠ 0\n⊢ ∃ x, ¬IsOrtho (↑(QuadraticForm.associatedHom ℕ) Q) x x\n[PROOFSTEP]\nexact ⟨x, fun h => hx (Q.associated_eq_self_apply ℕ x ▸ h)⟩\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nV : Type u\nK : Type v\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nhK : Invertible 2\nB : BilinForm K V\nhB₂ : IsSymm B\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\ninduction' hd : finrank K V with d ih generalizing V\n[GOAL]\ncase zero\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nhd : finrank K V = Nat.zero\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nsimp_rw [Nat.zero_eq]\n[GOAL]\ncase zero\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nhd : finrank K V = Nat.zero\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nexact ⟨basisOfFinrankZero hd, fun _ _ _ => zero_left _⟩\n[GOAL]\ncase succ\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nhd : finrank K V = Nat.succ d\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nhaveI :=\n finrank_pos_iff.1\n (hd.symm ▸ Nat.succ_pos d : 0 < finrank K V)\n -- either the bilinear form is trivial or we can pick a non-null `x`\n[GOAL]\ncase succ\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nhd : finrank K V = Nat.succ d\nthis : Nontrivial V\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nobtain rfl | hB₁ := eq_or_ne B 0\n[GOAL]\ncase succ.inl\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB : BilinForm K V✝\nhB₂✝ : IsSymm B\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nhd : finrank K V = Nat.succ d\nthis : Nontrivial V\nhB₂ : IsSymm 0\n⊢ ∃ v, iIsOrtho 0 ↑v\n[PROOFSTEP]\nlet b := FiniteDimensional.finBasis K V\n[GOAL]\ncase succ.inl\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB : BilinForm K V✝\nhB₂✝ : IsSymm B\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nhd : finrank K V = Nat.succ d\nthis : Nontrivial V\nhB₂ : IsSymm 0\nb : Basis (Fin (finrank K V)) K V := finBasis K V\n⊢ ∃ v, iIsOrtho 0 ↑v\n[PROOFSTEP]\nrw [hd] at b \n[GOAL]\ncase succ.inl\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB : BilinForm K V✝\nhB₂✝ : IsSymm B\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nhd : finrank K V = Nat.succ d\nthis : Nontrivial V\nhB₂ : IsSymm 0\nb : Basis (Fin (Nat.succ d)) K V\n⊢ ∃ v, iIsOrtho 0 ↑v\n[PROOFSTEP]\nrefine' ⟨b, fun i j _ => rfl⟩\n[GOAL]\ncase succ.inr\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nhd : finrank K V = Nat.succ d\nthis : Nontrivial V\nhB₁ : B ≠ 0\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := exists_bilinForm_self_ne_zero hB₁ hB₂\n[GOAL]\ncase succ.inr.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nhd : finrank K V = Nat.succ d\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhx : ¬IsOrtho B x x\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nrw [← Submodule.finrank_add_eq_of_isCompl (isCompl_span_singleton_orthogonal hx).symm,\n finrank_span_singleton (ne_zero_of_not_isOrtho_self x hx)] at hd \n[GOAL]\ncase succ.inr.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nlet B' := B.restrict (B.orthogonal <| K ∙ x)\n[GOAL]\ncase succ.inr.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nobtain ⟨v', hv₁⟩ :=\n ih (B.restrictSymm hB₂ _ : B'.IsSymm)\n (Nat.succ.inj hd)\n -- concatenate `x` with the basis obtained by induction\n[GOAL]\ncase succ.inr.intro.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nlet b :=\n Basis.mkFinCons x v'\n (by\n rintro c y hy hc\n rw [add_eq_zero_iff_neg_eq] at hc \n rw [← hc, Submodule.neg_mem_iff] at hy \n have := (isCompl_span_singleton_orthogonal hx).disjoint\n rw [Submodule.disjoint_def] at this \n have := this (c • x) (Submodule.smul_mem _ _ <| Submodule.mem_span_singleton_self _) hy\n exact (smul_eq_zero.1 this).resolve_right fun h => hx <| h.symm ▸ zero_left _)\n (by\n intro y\n refine' ⟨-B x y / B x x, fun z hz => _⟩\n obtain ⟨c, rfl⟩ := Submodule.mem_span_singleton.1 hz\n rw [IsOrtho, smul_left, add_right, smul_right, div_mul_cancel _ hx, add_neg_self, mul_zero])\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\n⊢ ∀ (c : K) (x_1 : V), x_1 ∈ orthogonal B (Submodule.span K {x}) → c • x + x_1 = 0 → c = 0\n[PROOFSTEP]\nrintro c y hy hc\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nc : K\ny : V\nhy : y ∈ orthogonal B (Submodule.span K {x})\nhc : c • x + y = 0\n⊢ c = 0\n[PROOFSTEP]\nrw [add_eq_zero_iff_neg_eq] at hc \n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nc : K\ny : V\nhy : y ∈ orthogonal B (Submodule.span K {x})\nhc : -(c • x) = y\n⊢ c = 0\n[PROOFSTEP]\nrw [← hc, Submodule.neg_mem_iff] at hy \n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nc : K\ny : V\nhy : c • x ∈ orthogonal B (Submodule.span K {x})\nhc : -(c • x) = y\n⊢ c = 0\n[PROOFSTEP]\nhave := (isCompl_span_singleton_orthogonal hx).disjoint\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis✝ : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nc : K\ny : V\nhy : c • x ∈ orthogonal B (Submodule.span K {x})\nhc : -(c • x) = y\nthis : Disjoint (Submodule.span K {x}) (orthogonal B (Submodule.span K {x}))\n⊢ c = 0\n[PROOFSTEP]\nrw [Submodule.disjoint_def] at this \n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis✝ : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nc : K\ny : V\nhy : c • x ∈ orthogonal B (Submodule.span K {x})\nhc : -(c • x) = y\nthis : ∀ (x_1 : V), x_1 ∈ Submodule.span K {x} → x_1 ∈ orthogonal B (Submodule.span K {x}) → x_1 = 0\n⊢ c = 0\n[PROOFSTEP]\nhave := this (c • x) (Submodule.smul_mem _ _ <| Submodule.mem_span_singleton_self _) hy\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis✝¹ : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nc : K\ny : V\nhy : c • x ∈ orthogonal B (Submodule.span K {x})\nhc : -(c • x) = y\nthis✝ : ∀ (x_1 : V), x_1 ∈ Submodule.span K {x} → x_1 ∈ orthogonal B (Submodule.span K {x}) → x_1 = 0\nthis : c • x = 0\n⊢ c = 0\n[PROOFSTEP]\nexact (smul_eq_zero.1 this).resolve_right fun h => hx <| h.symm ▸ zero_left _\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\n⊢ ∀ (z : V), ∃ c, z + c • x ∈ orthogonal B (Submodule.span K {x})\n[PROOFSTEP]\nintro y\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\ny : V\n⊢ ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x})\n[PROOFSTEP]\nrefine' ⟨-B x y / B x x, fun z hz => _⟩\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\ny z : V\nhz : z ∈ Submodule.span K {x}\n⊢ IsOrtho B z (y + (-bilin B x y / bilin B x x) • x)\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := Submodule.mem_span_singleton.1 hz\n[GOAL]\ncase intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\ny : V\nc : K\nhz : c • x ∈ Submodule.span K {x}\n⊢ IsOrtho B (c • x) (y + (-bilin B x y / bilin B x x) • x)\n[PROOFSTEP]\nrw [IsOrtho, smul_left, add_right, smul_right, div_mul_cancel _ hx, add_neg_self, mul_zero]\n[GOAL]\ncase succ.inr.intro.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\n⊢ ∃ v, iIsOrtho B ↑v\n[PROOFSTEP]\nrefine' ⟨b, _⟩\n[GOAL]\ncase succ.inr.intro.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\n⊢ iIsOrtho B ↑b\n[PROOFSTEP]\nrw [Basis.coe_mkFinCons]\n[GOAL]\ncase succ.inr.intro.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\n⊢ iIsOrtho B (Fin.cons x (Subtype.val ∘ ↑v'))\n[PROOFSTEP]\nintro j i\n[GOAL]\ncase succ.inr.intro.intro\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i : Fin (Nat.succ d)\n⊢ j ≠ i → (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) j i\n[PROOFSTEP]\nrefine' Fin.cases _ (fun i => _) i\n[GOAL]\ncase succ.inr.intro.intro.refine'_1\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i : Fin (Nat.succ d)\n⊢ j ≠ 0 → (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) j 0\n[PROOFSTEP]\nrefine' Fin.cases _ (fun j => _) j\n[GOAL]\ncase succ.inr.intro.intro.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i✝ : Fin (Nat.succ d)\ni : Fin d\n⊢ j ≠ Fin.succ i → (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) j (Fin.succ i)\n[PROOFSTEP]\nrefine' Fin.cases _ (fun j => _) j\n[GOAL]\ncase succ.inr.intro.intro.refine'_1.refine'_1\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i : Fin (Nat.succ d)\n⊢ 0 ≠ 0 → (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) 0 0\n[PROOFSTEP]\nintro hij\n[GOAL]\ncase succ.inr.intro.intro.refine'_1.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj✝ i : Fin (Nat.succ d)\nj : Fin d\n⊢ Fin.succ j ≠ 0 → (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) (Fin.succ j) 0\n[PROOFSTEP]\nintro hij\n[GOAL]\ncase succ.inr.intro.intro.refine'_2.refine'_1\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i✝ : Fin (Nat.succ d)\ni : Fin d\n⊢ 0 ≠ Fin.succ i → (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) 0 (Fin.succ i)\n[PROOFSTEP]\nintro hij\n[GOAL]\ncase succ.inr.intro.intro.refine'_2.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj✝ i✝ : Fin (Nat.succ d)\ni j : Fin d\n⊢ Fin.succ j ≠ Fin.succ i → (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) (Fin.succ j) (Fin.succ i)\n[PROOFSTEP]\nintro hij\n[GOAL]\ncase succ.inr.intro.intro.refine'_1.refine'_1\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i : Fin (Nat.succ d)\nhij : 0 ≠ 0\n⊢ (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) 0 0\n[PROOFSTEP]\nsimp only [Function.onFun, Fin.cons_zero, Fin.cons_succ, Function.comp_apply]\n[GOAL]\ncase succ.inr.intro.intro.refine'_1.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj✝ i : Fin (Nat.succ d)\nj : Fin d\nhij : Fin.succ j ≠ 0\n⊢ (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) (Fin.succ j) 0\n[PROOFSTEP]\nsimp only [Function.onFun, Fin.cons_zero, Fin.cons_succ, Function.comp_apply]\n[GOAL]\ncase succ.inr.intro.intro.refine'_2.refine'_1\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i✝ : Fin (Nat.succ d)\ni : Fin d\nhij : 0 ≠ Fin.succ i\n⊢ (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) 0 (Fin.succ i)\n[PROOFSTEP]\nsimp only [Function.onFun, Fin.cons_zero, Fin.cons_succ, Function.comp_apply]\n[GOAL]\ncase succ.inr.intro.intro.refine'_2.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj✝ i✝ : Fin (Nat.succ d)\ni j : Fin d\nhij : Fin.succ j ≠ Fin.succ i\n⊢ (IsOrtho B on Fin.cons x (Subtype.val ∘ ↑v')) (Fin.succ j) (Fin.succ i)\n[PROOFSTEP]\nsimp only [Function.onFun, Fin.cons_zero, Fin.cons_succ, Function.comp_apply]\n[GOAL]\ncase succ.inr.intro.intro.refine'_1.refine'_1\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i : Fin (Nat.succ d)\nhij : 0 ≠ 0\n⊢ IsOrtho B x x\n[PROOFSTEP]\nexact (hij rfl).elim\n[GOAL]\ncase succ.inr.intro.intro.refine'_1.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj✝ i : Fin (Nat.succ d)\nj : Fin d\nhij : Fin.succ j ≠ 0\n⊢ IsOrtho B (↑(↑v' j)) x\n[PROOFSTEP]\nrw [IsOrtho, hB₂]\n[GOAL]\ncase succ.inr.intro.intro.refine'_1.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj✝ i : Fin (Nat.succ d)\nj : Fin d\nhij : Fin.succ j ≠ 0\n⊢ bilin B x ↑(↑v' j) = 0\n[PROOFSTEP]\nexact (v' j).prop _ (Submodule.mem_span_singleton_self x)\n[GOAL]\ncase succ.inr.intro.intro.refine'_2.refine'_1\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj i✝ : Fin (Nat.succ d)\ni : Fin d\nhij : 0 ≠ Fin.succ i\n⊢ IsOrtho B x ↑(↑v' i)\n[PROOFSTEP]\nexact (v' i).prop _ (Submodule.mem_span_singleton_self x)\n[GOAL]\ncase succ.inr.intro.intro.refine'_2.refine'_2\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : Module R M\nV✝ : Type u\nK : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V✝\ninst✝⁴ : Module K V✝\ninst✝³ : FiniteDimensional K V✝\nhK : Invertible 2\nB✝ : BilinForm K V✝\nhB₂✝ : IsSymm B✝\nx✝ : ℕ\nhd✝ : finrank K V✝ = x✝\nd : ℕ\nih :\n ∀ {V : Type u} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] {B : BilinForm K V},\n IsSymm B → finrank K V = d → ∃ v, iIsOrtho B ↑v\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nhB₂ : IsSymm B\nthis : Nontrivial V\nhB₁ : B ≠ 0\nx : V\nhd : finrank K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } + 1 = Nat.succ d\nhx : ¬IsOrtho B x x\nB' : BilinForm K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) } :=\n restrict B (orthogonal B (Submodule.span K {x}))\nv' : Basis (Fin d) K { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhv₁ : iIsOrtho (restrict B (orthogonal B (Submodule.span K {x}))) ↑v'\nb : Basis (Fin (d + 1)) K V :=\n Basis.mkFinCons x v' (_ : ∀ (c : K) (y : V), y ∈ orthogonal B (Submodule.span K {x}) → c • x + y = 0 → c = 0)\n (_ : ∀ (y : V), ∃ c, y + c • x ∈ orthogonal B (Submodule.span K {x}))\nj✝ i✝ : Fin (Nat.succ d)\ni j : Fin d\nhij : Fin.succ j ≠ Fin.succ i\n⊢ IsOrtho B ↑(↑v' j) ↑(↑v' i)\n[PROOFSTEP]\nexact hv₁ (ne_of_apply_ne _ hij)\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nM₁ : Type u_6\ninst✝⁶ : Semiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : AddCommMonoid M\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M\ninst✝¹ : Module R M₁\nι : Type u_7\ninst✝ : Fintype ι\nv : Basis ι R M\nQ : QuadraticForm R M\nw : ι → R\n⊢ ↑(basisRepr Q v) w = ↑Q (∑ i : ι, w i • ↑v i)\n[PROOFSTEP]\nrw [← v.equivFun_symm_apply]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\nM₁ : Type u_6\ninst✝⁶ : Semiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : AddCommMonoid M\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M\ninst✝¹ : Module R M₁\nι : Type u_7\ninst✝ : Fintype ι\nv : Basis ι R M\nQ : QuadraticForm R M\nw : ι → R\n⊢ ↑(basisRepr Q v) w = ↑Q (↑(LinearEquiv.symm (Basis.equivFun v)) fun i => w i)\n[PROOFSTEP]\nrfl\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\n⊢ basisRepr Q v = weightedSumSquares R₁ fun i => ↑Q (↑v i)\n[PROOFSTEP]\next w\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\nw : ι → R₁\n⊢ ↑(basisRepr Q v) w = ↑(weightedSumSquares R₁ fun i => ↑Q (↑v i)) w\n[PROOFSTEP]\nrw [basisRepr_apply, ← @associated_eq_self_apply R₁, sum_left, weightedSumSquares_apply]\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\nw : ι → R₁\n⊢ ∑ i : ι, bilin (↑(associatedHom R₁) Q) (w i • ↑v i) (∑ i : ι, w i • ↑v i) = ∑ i : ι, ↑Q (↑v i) • (w i * w i)\n[PROOFSTEP]\nrefine' sum_congr rfl fun j hj => _\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\nw : ι → R₁\nj : ι\nhj : j ∈ univ\n⊢ bilin (↑(associatedHom R₁) Q) (w j • ↑v j) (∑ i : ι, w i • ↑v i) = ↑Q (↑v j) • (w j * w j)\n[PROOFSTEP]\nrw [← @associated_eq_self_apply R₁, sum_right, sum_eq_single_of_mem j hj]\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\nw : ι → R₁\nj : ι\nhj : j ∈ univ\n⊢ bilin (↑(associatedHom R₁) Q) (w j • ↑v j) (w j • ↑v j) = bilin (↑(associatedHom R₁) Q) (↑v j) (↑v j) • (w j * w j)\n[PROOFSTEP]\nrw [smul_left, smul_right, smul_eq_mul]\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\nw : ι → R₁\nj : ι\nhj : j ∈ univ\n⊢ w j * (w j * bilin (↑(associatedHom R₁) Q) (↑v j) (↑v j)) = bilin (↑(associatedHom R₁) Q) (↑v j) (↑v j) * (w j * w j)\n[PROOFSTEP]\nring\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\nw : ι → R₁\nj : ι\nhj : j ∈ univ\n⊢ ∀ (b : ι), b ∈ univ → b ≠ j → bilin (↑(associatedHom R₁) Q) (w j • ↑v j) (w b • ↑v b) = 0\n[PROOFSTEP]\nintro i _ hij\n[GOAL]\ncase H\nS : Type u_1\nT : Type u_2\nR : Type u_3\nR₁✝ : Type u_4\nM✝ : Type u_5\nM₁ : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : CommSemiring R₁✝\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M✝\ninst✝⁵ : Module R M₁\nι : Type u_7\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M✝\nR₁ : Type u_8\nM : Type u_9\ninst✝³ : CommRing R₁\ninst✝² : AddCommGroup M\ninst✝¹ : Module R₁ M\ninst✝ : Invertible 2\nQ : QuadraticForm R₁ M\nv : Basis ι R₁ M\nhv₂ : iIsOrtho (↑associated Q) ↑v\nw : ι → R₁\nj : ι\nhj : j ∈ univ\ni : ι\na✝ : i ∈ univ\nhij : i ≠ j\n⊢ bilin (↑(associatedHom R₁) Q) (w j • ↑v j) (w i • ↑v i) = 0\n[PROOFSTEP]\nrw [smul_left, smul_right, show associatedHom R₁ Q (v j) (v i) = 0 from hv₂ hij.symm, mul_zero, mul_zero]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.QuadraticForm.Basic", "llama_tokens": 51901, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711642563823, "lm_q2_score": 0.7279754489059774, "lm_q1q2_score": 0.6187581398566762}} {"text": "[GOAL]\n⊢ Tendsto (fun n => ↑(numDerangements n) / ↑(Nat.factorial n)) atTop (𝓝 (Real.exp (-1)))\n[PROOFSTEP]\nlet s : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1 : ℝ) ^ k / k.factorial\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\n⊢ Tendsto (fun n => ↑(numDerangements n) / ↑(Nat.factorial n)) atTop (𝓝 (Real.exp (-1)))\n[PROOFSTEP]\nsuffices ∀ n : ℕ, (numDerangements n : ℝ) / n.factorial = s (n + 1)\n by\n simp_rw [this]\n -- shift the function by 1, and then use the fact that the partial sums\n -- converge to the infinite sum\n rw [tendsto_add_atTop_iff_nat (f := fun n => ∑ k in Finset.range n, (-1 : ℝ) ^ k / k.factorial) 1]\n apply HasSum.tendsto_sum_nat\n rw [Real.exp_eq_exp_ℝ]\n exact expSeries_div_hasSum_exp ℝ (-1 : ℝ)\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nthis : ∀ (n : ℕ), ↑(numDerangements n) / ↑(Nat.factorial n) = s (n + 1)\n⊢ Tendsto (fun n => ↑(numDerangements n) / ↑(Nat.factorial n)) atTop (𝓝 (Real.exp (-1)))\n[PROOFSTEP]\nsimp_rw [this]\n -- shift the function by 1, and then use the fact that the partial sums\n -- converge to the infinite sum\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nthis : ∀ (n : ℕ), ↑(numDerangements n) / ↑(Nat.factorial n) = s (n + 1)\n⊢ Tendsto (fun n => ∑ k in Finset.range (n + 1), (-1) ^ k / ↑(Nat.factorial k)) atTop (𝓝 (Real.exp (-1)))\n[PROOFSTEP]\nrw [tendsto_add_atTop_iff_nat (f := fun n => ∑ k in Finset.range n, (-1 : ℝ) ^ k / k.factorial) 1]\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nthis : ∀ (n : ℕ), ↑(numDerangements n) / ↑(Nat.factorial n) = s (n + 1)\n⊢ Tendsto (fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)) atTop (𝓝 (Real.exp (-1)))\n[PROOFSTEP]\napply HasSum.tendsto_sum_nat\n[GOAL]\ncase h\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nthis : ∀ (n : ℕ), ↑(numDerangements n) / ↑(Nat.factorial n) = s (n + 1)\n⊢ HasSum (fun i => (-1) ^ i / ↑(Nat.factorial i)) (Real.exp (-1))\n[PROOFSTEP]\nrw [Real.exp_eq_exp_ℝ]\n[GOAL]\ncase h\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nthis : ∀ (n : ℕ), ↑(numDerangements n) / ↑(Nat.factorial n) = s (n + 1)\n⊢ HasSum (fun i => (-1) ^ i / ↑(Nat.factorial i)) (exp ℝ (-1))\n[PROOFSTEP]\nexact expSeries_div_hasSum_exp ℝ (-1 : ℝ)\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\n⊢ ∀ (n : ℕ), ↑(numDerangements n) / ↑(Nat.factorial n) = s (n + 1)\n[PROOFSTEP]\nintro n\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn : ℕ\n⊢ ↑(numDerangements n) / ↑(Nat.factorial n) = s (n + 1)\n[PROOFSTEP]\nrw [← Int.cast_ofNat, numDerangements_sum]\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn : ℕ\n⊢ ↑(∑ k in Finset.range (n + 1), (-1) ^ k * ↑(Nat.ascFactorial k (n - k))) / ↑(Nat.factorial n) = s (n + 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn : ℕ\n⊢ (∑ x in Finset.range (n + 1), (-1) ^ x * ↑(Nat.ascFactorial x (n - x))) / ↑(Nat.factorial n) =\n ∑ k in Finset.range (n + 1), (-1) ^ k / ↑(Nat.factorial k)\n[PROOFSTEP]\nrw [Finset.sum_div]\n -- get down to individual terms\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn : ℕ\n⊢ ∑ x in Finset.range (n + 1), (-1) ^ x * ↑(Nat.ascFactorial x (n - x)) / ↑(Nat.factorial n) =\n ∑ k in Finset.range (n + 1), (-1) ^ k / ↑(Nat.factorial k)\n[PROOFSTEP]\nrefine' Finset.sum_congr (refl _) _\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn : ℕ\n⊢ ∀ (x : ℕ),\n x ∈ Finset.range (n + 1) →\n (-1) ^ x * ↑(Nat.ascFactorial x (n - x)) / ↑(Nat.factorial n) = (-1) ^ x / ↑(Nat.factorial x)\n[PROOFSTEP]\nintro k hk\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn k : ℕ\nhk : k ∈ Finset.range (n + 1)\n⊢ (-1) ^ k * ↑(Nat.ascFactorial k (n - k)) / ↑(Nat.factorial n) = (-1) ^ k / ↑(Nat.factorial k)\n[PROOFSTEP]\nhave h_le : k ≤ n := Finset.mem_range_succ_iff.mp hk\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn k : ℕ\nhk : k ∈ Finset.range (n + 1)\nh_le : k ≤ n\n⊢ (-1) ^ k * ↑(Nat.ascFactorial k (n - k)) / ↑(Nat.factorial n) = (-1) ^ k / ↑(Nat.factorial k)\n[PROOFSTEP]\nrw [Nat.ascFactorial_eq_div, add_tsub_cancel_of_le h_le]\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn k : ℕ\nhk : k ∈ Finset.range (n + 1)\nh_le : k ≤ n\n⊢ (-1) ^ k * ↑(Nat.factorial n / Nat.factorial k) / ↑(Nat.factorial n) = (-1) ^ k / ↑(Nat.factorial k)\n[PROOFSTEP]\npush_cast [Nat.factorial_dvd_factorial h_le]\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn k : ℕ\nhk : k ∈ Finset.range (n + 1)\nh_le : k ≤ n\n⊢ (-1) ^ k * (↑(Nat.factorial n) / ↑(Nat.factorial k)) / ↑(Nat.factorial n) = (-1) ^ k / ↑(Nat.factorial k)\n[PROOFSTEP]\nfield_simp [Nat.factorial_ne_zero]\n[GOAL]\ns : ℕ → ℝ := fun n => ∑ k in Finset.range n, (-1) ^ k / ↑(Nat.factorial k)\nn k : ℕ\nhk : k ∈ Finset.range (n + 1)\nh_le : k ≤ n\n⊢ (-1) ^ k * ↑(Nat.factorial n) * ↑(Nat.factorial k) = (-1) ^ k * (↑(Nat.factorial k) * ↑(Nat.factorial n))\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Derangements.Exponential", "llama_tokens": 2646, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519528019683106, "lm_q2_score": 0.7248702761768248, "lm_q1q2_score": 0.6175552628523889}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf : α → β\ns : Set α\nx : α\nh : IsLUB s x\n⊢ IsLUB (id '' s) (id x)\n[PROOFSTEP]\nsimpa only [image_id] using h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf : α → β\nhf : LeftOrdContinuous f\na₁ a₂ : α\nh : a₁ ≤ a₂\n⊢ a₂ ∈ upperBounds {a₁, a₂}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf : α → β\nhg : LeftOrdContinuous g\nhf : LeftOrdContinuous f\ns : Set α\nx : α\nh : IsLUB s x\n⊢ IsLUB (g ∘ f '' s) ((g ∘ f) x)\n[PROOFSTEP]\nsimpa only [image_image] using hg (hf h)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf✝ : α → β\nf : α → α\nhf : LeftOrdContinuous f\nn : ℕ\n⊢ LeftOrdContinuous f^[n]\n[PROOFSTEP]\ninduction n with\n| zero => exact LeftOrdContinuous.id α\n| succ n ihn => exact ihn.comp hf\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf✝ : α → β\nf : α → α\nhf : LeftOrdContinuous f\nn : ℕ\n⊢ LeftOrdContinuous f^[n]\n[PROOFSTEP]\ninduction n with\n| zero => exact LeftOrdContinuous.id α\n| succ n ihn => exact ihn.comp hf\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf✝ : α → β\nf : α → α\nhf : LeftOrdContinuous f\n⊢ LeftOrdContinuous f^[Nat.zero]\n[PROOFSTEP]\n\n| zero => exact LeftOrdContinuous.id α\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf✝ : α → β\nf : α → α\nhf : LeftOrdContinuous f\n⊢ LeftOrdContinuous f^[Nat.zero]\n[PROOFSTEP]\nexact LeftOrdContinuous.id α\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf✝ : α → β\nf : α → α\nhf : LeftOrdContinuous f\nn : ℕ\nihn : LeftOrdContinuous f^[n]\n⊢ LeftOrdContinuous f^[Nat.succ n]\n[PROOFSTEP]\n\n| succ n ihn => exact ihn.comp hf\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf✝ : α → β\nf : α → α\nhf : LeftOrdContinuous f\nn : ℕ\nihn : LeftOrdContinuous f^[n]\n⊢ LeftOrdContinuous f^[Nat.succ n]\n[PROOFSTEP]\nexact ihn.comp hf\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝¹ : SemilatticeSup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf : LeftOrdContinuous f\nx y : α\n⊢ IsLUB (f '' {x, y}) (f x ⊔ f y)\n[PROOFSTEP]\nsimp only [image_pair, isLUB_pair]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝¹ : SemilatticeSup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf : LeftOrdContinuous f\nh : Injective f\nx y : α\n⊢ f x ≤ f y ↔ x ≤ y\n[PROOFSTEP]\nsimp only [← sup_eq_right, ← hf.map_sup, h.eq_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝¹ : SemilatticeSup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf : LeftOrdContinuous f\nh : Injective f\nx y : α\n⊢ f x < f y ↔ x < y\n[PROOFSTEP]\nsimp only [lt_iff_le_not_le, hf.le_iff h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : α → β\nhf : LeftOrdContinuous f\ns : Set α\n⊢ f (sSup s) = ⨆ (x : α) (_ : x ∈ s), f x\n[PROOFSTEP]\nrw [hf.map_sSup', sSup_image]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : α → β\nhf : LeftOrdContinuous f\ng : ι → α\n⊢ f (⨆ (i : ι), g i) = ⨆ (i : ι), f (g i)\n[PROOFSTEP]\nsimp only [iSup, hf.map_sSup', ← range_comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nf : α → β\nhf : LeftOrdContinuous f\ng : ι → α\n⊢ sSup (range (f ∘ fun i => g i)) = sSup (range fun i => f (g i))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : ConditionallyCompleteLattice α\ninst✝¹ : ConditionallyCompleteLattice β\ninst✝ : Nonempty ι\nf : α → β\nhf : LeftOrdContinuous f\ng : ι → α\nhg : BddAbove (range g)\n⊢ f (⨆ (i : ι), g i) = ⨆ (i : ι), f (g i)\n[PROOFSTEP]\nsimp only [iSup, hf.map_csSup (range_nonempty _) hg, ← range_comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : ConditionallyCompleteLattice α\ninst✝¹ : ConditionallyCompleteLattice β\ninst✝ : Nonempty ι\nf : α → β\nhf : LeftOrdContinuous f\ng : ι → α\nhg : BddAbove (range g)\n⊢ sSup (range (f ∘ g)) = sSup (range fun i => f (g i))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\ng : β → γ\nf : α → β\ns : Set α\nx : α\nh : IsGLB s x\n⊢ IsGLB (id '' s) (id x)\n[PROOFSTEP]\nsimpa only [image_id] using h\n", "meta": {"mathlib_filename": "Mathlib.Order.OrdContinuous", "llama_tokens": 2386, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8376199552262967, "lm_q2_score": 0.7371581626286834, "lm_q1q2_score": 0.617458387175737}} {"text": "[GOAL]\nI : Type u_1\nA : Type u_2\nX : I → Type u_3\ninst✝¹ : (i : I) → TopologicalSpace (X i)\ninst✝ : TopologicalSpace A\nf g : (i : I) → C(A, X i)\nS : Set A\nhomotopies : (i : I) → HomotopyRel (f i) (g i) S\nsrc✝ : Homotopy (ContinuousMap.pi fun i => f i) (ContinuousMap.pi fun i => g i) :=\n Homotopy.pi fun i => (homotopies i).toHomotopy\n⊢ ∀ (t : ↑unitInterval) (x : A),\n x ∈ S →\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(ContinuousMap.pi fun i => f i) x),\n map_one_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (1, x) =\n ↑(ContinuousMap.pi fun i => g i) x) }.toContinuousMap\n (t, x))\n x =\n ↑(ContinuousMap.pi f) x ∧\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(ContinuousMap.pi fun i => f i) x),\n map_one_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (1, x) =\n ↑(ContinuousMap.pi fun i => g i) x) }.toContinuousMap\n (t, x))\n x =\n ↑(ContinuousMap.pi g) x\n[PROOFSTEP]\nintro t x hx\n[GOAL]\nI : Type u_1\nA : Type u_2\nX : I → Type u_3\ninst✝¹ : (i : I) → TopologicalSpace (X i)\ninst✝ : TopologicalSpace A\nf g : (i : I) → C(A, X i)\nS : Set A\nhomotopies : (i : I) → HomotopyRel (f i) (g i) S\nsrc✝ : Homotopy (ContinuousMap.pi fun i => f i) (ContinuousMap.pi fun i => g i) :=\n Homotopy.pi fun i => (homotopies i).toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\n⊢ ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(ContinuousMap.pi fun i => f i) x),\n map_one_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (1, x) =\n ↑(ContinuousMap.pi fun i => g i) x) }.toContinuousMap\n (t, x))\n x =\n ↑(ContinuousMap.pi f) x ∧\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(ContinuousMap.pi fun i => f i) x),\n map_one_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (1, x) =\n ↑(ContinuousMap.pi fun i => g i) x) }.toContinuousMap\n (t, x))\n x =\n ↑(ContinuousMap.pi g) x\n[PROOFSTEP]\ndsimp only [coe_mk, pi_eval, toFun_eq_coe, HomotopyWith.coe_toContinuousMap]\n[GOAL]\nI : Type u_1\nA : Type u_2\nX : I → Type u_3\ninst✝¹ : (i : I) → TopologicalSpace (X i)\ninst✝ : TopologicalSpace A\nf g : (i : I) → C(A, X i)\nS : Set A\nhomotopies : (i : I) → HomotopyRel (f i) (g i) S\nsrc✝ : Homotopy (ContinuousMap.pi fun i => f i) (ContinuousMap.pi fun i => g i) :=\n Homotopy.pi fun i => (homotopies i).toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\n⊢ (↑(Homotopy.pi fun i => (homotopies i).toHomotopy).toContinuousMap (t, x) = fun i => ↑(f i) x) ∧\n ↑(Homotopy.pi fun i => (homotopies i).toHomotopy).toContinuousMap (t, x) = fun i => ↑(g i) x\n[PROOFSTEP]\nsimp only [Function.funext_iff, ← forall_and]\n[GOAL]\nI : Type u_1\nA : Type u_2\nX : I → Type u_3\ninst✝¹ : (i : I) → TopologicalSpace (X i)\ninst✝ : TopologicalSpace A\nf g : (i : I) → C(A, X i)\nS : Set A\nhomotopies : (i : I) → HomotopyRel (f i) (g i) S\nsrc✝ : Homotopy (ContinuousMap.pi fun i => f i) (ContinuousMap.pi fun i => g i) :=\n Homotopy.pi fun i => (homotopies i).toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\n⊢ ∀ (x_1 : I),\n ↑(Homotopy.pi fun i => (homotopies i).toHomotopy).toContinuousMap (t, x) x_1 = ↑(f x_1) x ∧\n ↑(Homotopy.pi fun i => (homotopies i).toHomotopy).toContinuousMap (t, x) x_1 = ↑(g x_1) x\n[PROOFSTEP]\nintro i\n[GOAL]\nI : Type u_1\nA : Type u_2\nX : I → Type u_3\ninst✝¹ : (i : I) → TopologicalSpace (X i)\ninst✝ : TopologicalSpace A\nf g : (i : I) → C(A, X i)\nS : Set A\nhomotopies : (i : I) → HomotopyRel (f i) (g i) S\nsrc✝ : Homotopy (ContinuousMap.pi fun i => f i) (ContinuousMap.pi fun i => g i) :=\n Homotopy.pi fun i => (homotopies i).toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\ni : I\n⊢ ↑(Homotopy.pi fun i => (homotopies i).toHomotopy).toContinuousMap (t, x) i = ↑(f i) x ∧\n ↑(Homotopy.pi fun i => (homotopies i).toHomotopy).toContinuousMap (t, x) i = ↑(g i) x\n[PROOFSTEP]\nexact (homotopies i).prop' t x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nA : Type u_3\ninst✝ : TopologicalSpace A\nf₀ f₁ : C(A, α)\ng₀ g₁ : C(A, β)\nS : Set A\nF : Homotopy f₀ f₁\nG : Homotopy g₀ g₁\nx : A\n⊢ ContinuousMap.toFun (ContinuousMap.mk fun t => (↑F t, ↑G t)) (0, x) = ↑(ContinuousMap.prodMk f₀ g₀) x\n[PROOFSTEP]\nsimp only [prod_eval, Homotopy.apply_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nA : Type u_3\ninst✝ : TopologicalSpace A\nf₀ f₁ : C(A, α)\ng₀ g₁ : C(A, β)\nS : Set A\nF : Homotopy f₀ f₁\nG : Homotopy g₀ g₁\nx : A\n⊢ ContinuousMap.toFun (ContinuousMap.mk fun t => (↑F t, ↑G t)) (1, x) = ↑(ContinuousMap.prodMk f₁ g₁) x\n[PROOFSTEP]\nsimp only [prod_eval, Homotopy.apply_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nA : Type u_3\ninst✝ : TopologicalSpace A\nf₀ f₁ : C(A, α)\ng₀ g₁ : C(A, β)\nS : Set A\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel g₀ g₁ S\nsrc✝ : Homotopy (prodMk f₀ g₀) (prodMk f₁ g₁) := Homotopy.prod F.toHomotopy G.toHomotopy\n⊢ ∀ (t : ↑unitInterval) (x : A),\n x ∈ S →\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left :=\n (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₀ g₀) x ∧\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left :=\n (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A),\n ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₁ g₁) x\n[PROOFSTEP]\nintro t x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nA : Type u_3\ninst✝ : TopologicalSpace A\nf₀ f₁ : C(A, α)\ng₀ g₁ : C(A, β)\nS : Set A\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel g₀ g₁ S\nsrc✝ : Homotopy (prodMk f₀ g₀) (prodMk f₁ g₁) := Homotopy.prod F.toHomotopy G.toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\n⊢ ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₀ g₀) x ∧\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₁ g₁) x\n[PROOFSTEP]\nhave hF := F.prop' t x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nA : Type u_3\ninst✝ : TopologicalSpace A\nf₀ f₁ : C(A, α)\ng₀ g₁ : C(A, β)\nS : Set A\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel g₀ g₁ S\nsrc✝ : Homotopy (prodMk f₀ g₀) (prodMk f₁ g₁) := Homotopy.prod F.toHomotopy G.toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\nhF :\n ↑(mk fun x => ContinuousMap.toFun F.toContinuousMap (t, x)) x = ↑f₀ x ∧\n ↑(mk fun x => ContinuousMap.toFun F.toContinuousMap (t, x)) x = ↑f₁ x\n⊢ ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₀ g₀) x ∧\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₁ g₁) x\n[PROOFSTEP]\nhave hG := G.prop' t x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nA : Type u_3\ninst✝ : TopologicalSpace A\nf₀ f₁ : C(A, α)\ng₀ g₁ : C(A, β)\nS : Set A\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel g₀ g₁ S\nsrc✝ : Homotopy (prodMk f₀ g₀) (prodMk f₁ g₁) := Homotopy.prod F.toHomotopy G.toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\nhF :\n ↑(mk fun x => ContinuousMap.toFun F.toContinuousMap (t, x)) x = ↑f₀ x ∧\n ↑(mk fun x => ContinuousMap.toFun F.toContinuousMap (t, x)) x = ↑f₁ x\nhG :\n ↑(mk fun x => ContinuousMap.toFun G.toContinuousMap (t, x)) x = ↑g₀ x ∧\n ↑(mk fun x => ContinuousMap.toFun G.toContinuousMap (t, x)) x = ↑g₁ x\n⊢ ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₀ g₀) x ∧\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑(prodMk f₀ g₀) x),\n map_one_left :=\n (_ :\n ∀ (x : A), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑(prodMk f₁ g₁) x) }.toContinuousMap\n (t, x))\n x =\n ↑(prodMk f₁ g₁) x\n[PROOFSTEP]\nsimp only [coe_mk, prod_eval, Prod.mk.inj_iff, Homotopy.prod] at hF hG ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nA : Type u_3\ninst✝ : TopologicalSpace A\nf₀ f₁ : C(A, α)\ng₀ g₁ : C(A, β)\nS : Set A\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel g₀ g₁ S\nsrc✝ : Homotopy (prodMk f₀ g₀) (prodMk f₁ g₁) := Homotopy.prod F.toHomotopy G.toHomotopy\nt : ↑unitInterval\nx : A\nhx : x ∈ S\nhF : ContinuousMap.toFun F.toContinuousMap (t, x) = ↑f₀ x ∧ ContinuousMap.toFun F.toContinuousMap (t, x) = ↑f₁ x\nhG : ContinuousMap.toFun G.toContinuousMap (t, x) = ↑g₀ x ∧ ContinuousMap.toFun G.toContinuousMap (t, x) = ↑g₁ x\n⊢ (↑F.toHomotopy (t, x) = ↑f₀ x ∧ ↑G.toHomotopy (t, x) = ↑g₀ x) ∧\n ↑F.toHomotopy (t, x) = ↑f₁ x ∧ ↑G.toHomotopy (t, x) = ↑g₁ x\n[PROOFSTEP]\nexact ⟨⟨hF.1, hG.1⟩, ⟨hF.2, hG.2⟩⟩\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ : (i : ι) → Path (as i) (bs i)\n⊢ (pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (γ i)) =\n Quotient.mk (Homotopic.setoid (fun i => as i) fun i => bs i) (Path.pi γ)\n[PROOFSTEP]\nunfold pi\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ : (i : ι) → Path (as i) (bs i)\n⊢ Quotient.map Path.pi (_ : ∀ (x y : (i : ι) → Path (as i) (bs i)), x ≈ y → Nonempty (Homotopy (Path.pi x) (Path.pi y)))\n (Quotient.choice fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (γ i)) =\n Quotient.mk (Homotopic.setoid (fun i => as i) fun i => bs i) (Path.pi γ)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ₀ : (i : ι) → Homotopic.Quotient (as i) (bs i)\nγ₁ : (i : ι) → Homotopic.Quotient (bs i) (cs i)\n⊢ pi γ₀ ⬝ pi γ₁ = pi fun i => γ₀ i ⬝ γ₁ i\n[PROOFSTEP]\napply Quotient.induction_on_pi (p := _) γ₁\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ₀ : (i : ι) → Homotopic.Quotient (as i) (bs i)\nγ₁ : (i : ι) → Homotopic.Quotient (bs i) (cs i)\n⊢ ∀ (a : (i : ι) → Path (bs i) (cs i)),\n (pi γ₀ ⬝ pi fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) =\n pi fun i => γ₀ i ⬝ (fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) i\n[PROOFSTEP]\nintro a\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ₀ : (i : ι) → Homotopic.Quotient (as i) (bs i)\nγ₁ : (i : ι) → Homotopic.Quotient (bs i) (cs i)\na : (i : ι) → Path (bs i) (cs i)\n⊢ (pi γ₀ ⬝ pi fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) =\n pi fun i => γ₀ i ⬝ (fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) i\n[PROOFSTEP]\napply Quotient.induction_on_pi (p := _) γ₀\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ₀ : (i : ι) → Homotopic.Quotient (as i) (bs i)\nγ₁ : (i : ι) → Homotopic.Quotient (bs i) (cs i)\na : (i : ι) → Path (bs i) (cs i)\n⊢ ∀ (a_1 : (i : ι) → Path (as i) (bs i)),\n ((pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a_1 i)) ⬝\n pi fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) =\n pi fun i =>\n (fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a_1 i)) i ⬝\n (fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) i\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ₀ : (i : ι) → Homotopic.Quotient (as i) (bs i)\nγ₁ : (i : ι) → Homotopic.Quotient (bs i) (cs i)\na : (i : ι) → Path (bs i) (cs i)\na✝ : (i : ι) → Path (as i) (bs i)\n⊢ ((pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i)) ⬝\n pi fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) =\n pi fun i =>\n (fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i)) i ⬝\n (fun i => Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)) i\n[PROOFSTEP]\nsimp only [pi_lift]\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ₀ : (i : ι) → Homotopic.Quotient (as i) (bs i)\nγ₁ : (i : ι) → Homotopic.Quotient (bs i) (cs i)\na : (i : ι) → Path (bs i) (cs i)\na✝ : (i : ι) → Path (as i) (bs i)\n⊢ Quotient.mk (Homotopic.setoid (fun i => as i) fun i => bs i) (Path.pi fun i => a✝ i) ⬝\n Quotient.mk (Homotopic.setoid (fun i => bs i) fun i => cs i) (Path.pi fun i => a i) =\n pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i) ⬝ Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)\n[PROOFSTEP]\nrw [← Path.Homotopic.comp_lift, Path.trans_pi_eq_pi_trans, ← pi_lift]\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\nγ₀ : (i : ι) → Homotopic.Quotient (as i) (bs i)\nγ₁ : (i : ι) → Homotopic.Quotient (bs i) (cs i)\na : (i : ι) → Path (bs i) (cs i)\na✝ : (i : ι) → Path (as i) (bs i)\n⊢ (pi fun i => Quotient.mk (Homotopic.setoid (as i) (cs i)) (Path.trans (a✝ i) (a i))) =\n pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i) ⬝ Quotient.mk (Homotopic.setoid (bs i) (cs i)) (a i)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\ni : ι\npaths : (i : ι) → Homotopic.Quotient (as i) (bs i)\n⊢ proj i (pi paths) = paths i\n[PROOFSTEP]\napply Quotient.induction_on_pi (p := _) paths\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\ni : ι\npaths : (i : ι) → Homotopic.Quotient (as i) (bs i)\n⊢ ∀ (a : (i : ι) → Path (as i) (bs i)),\n proj i (pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a i)) =\n (fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a i)) i\n[PROOFSTEP]\nintro\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\ni : ι\npaths : (i : ι) → Homotopic.Quotient (as i) (bs i)\na✝ : (i : ι) → Path (as i) (bs i)\n⊢ proj i (pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i)) =\n (fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i)) i\n[PROOFSTEP]\nunfold proj\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\ni : ι\npaths : (i : ι) → Homotopic.Quotient (as i) (bs i)\na✝ : (i : ι) → Path (as i) (bs i)\n⊢ Quotient.mapFn (pi fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i)) (ContinuousMap.mk fun p => p i) =\n (fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i)) i\n[PROOFSTEP]\nrw [pi_lift, ← Path.Homotopic.map_lift]\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\ni : ι\npaths : (i : ι) → Homotopic.Quotient (as i) (bs i)\na✝ : (i : ι) → Path (as i) (bs i)\n⊢ Quotient.mk\n (Homotopic.setoid (↑(ContinuousMap.mk fun p => p i) fun i => as i)\n (↑(ContinuousMap.mk fun p => p i) fun i => bs i))\n (Path.map (Path.pi fun i => a✝ i) (_ : Continuous ↑(ContinuousMap.mk fun p => p i))) =\n (fun i => Quotient.mk (Homotopic.setoid (as i) (bs i)) (a✝ i)) i\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\np : Homotopic.Quotient as bs\n⊢ (pi fun i => proj i p) = p\n[PROOFSTEP]\napply Quotient.inductionOn (motive := _) p\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\np : Homotopic.Quotient as bs\n⊢ ∀ (a : Path as bs),\n (pi fun i => proj i (Quotient.mk (Homotopic.setoid as bs) a)) = Quotient.mk (Homotopic.setoid as bs) a\n[PROOFSTEP]\nintro\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\np : Homotopic.Quotient as bs\na✝ : Path as bs\n⊢ (pi fun i => proj i (Quotient.mk (Homotopic.setoid as bs) a✝)) = Quotient.mk (Homotopic.setoid as bs) a✝\n[PROOFSTEP]\nunfold proj\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\np : Homotopic.Quotient as bs\na✝ : Path as bs\n⊢ (pi fun i => Quotient.mapFn (Quotient.mk (Homotopic.setoid as bs) a✝) (ContinuousMap.mk fun p => p i)) =\n Quotient.mk (Homotopic.setoid as bs) a✝\n[PROOFSTEP]\nsimp_rw [← Path.Homotopic.map_lift]\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\np : Homotopic.Quotient as bs\na✝ : Path as bs\n⊢ (pi fun i =>\n Quotient.mk (Homotopic.setoid (↑(ContinuousMap.mk fun p => p i) as) (↑(ContinuousMap.mk fun p => p i) bs))\n (Path.map a✝ (_ : Continuous ↑(ContinuousMap.mk fun p => p i)))) =\n Quotient.mk (Homotopic.setoid as bs) a✝\n[PROOFSTEP]\nerw [pi_lift]\n[GOAL]\nι : Type u_1\nX : ι → Type u_2\ninst✝ : (i : ι) → TopologicalSpace (X i)\nas bs cs : (i : ι) → X i\np : Homotopic.Quotient as bs\na✝ : Path as bs\n⊢ Quotient.mk (Homotopic.setoid (fun i => as i) fun i => bs i)\n (Path.pi fun i => Path.map a✝ (_ : Continuous ↑(ContinuousMap.mk fun p => p i))) =\n Quotient.mk (Homotopic.setoid as bs) a✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\n⊢ prod q₁ q₂ ⬝ prod r₁ r₂ = prod (q₁ ⬝ r₁) (q₂ ⬝ r₂)\n[PROOFSTEP]\napply Quotient.inductionOn₂ (motive := _) q₁ q₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\n⊢ ∀ (a : Path a₁ a₂) (b : Path b₁ b₂),\n prod (Quotient.mk (Homotopic.setoid a₁ a₂) a) (Quotient.mk (Homotopic.setoid b₁ b₂) b) ⬝ prod r₁ r₂ =\n prod (Quotient.mk (Homotopic.setoid a₁ a₂) a ⬝ r₁) (Quotient.mk (Homotopic.setoid b₁ b₂) b ⬝ r₂)\n[PROOFSTEP]\nintro a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\na : Path a₁ a₂\nb : Path b₁ b₂\n⊢ prod (Quotient.mk (Homotopic.setoid a₁ a₂) a) (Quotient.mk (Homotopic.setoid b₁ b₂) b) ⬝ prod r₁ r₂ =\n prod (Quotient.mk (Homotopic.setoid a₁ a₂) a ⬝ r₁) (Quotient.mk (Homotopic.setoid b₁ b₂) b ⬝ r₂)\n[PROOFSTEP]\napply Quotient.inductionOn₂ (motive := _) r₁ r₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\na : Path a₁ a₂\nb : Path b₁ b₂\n⊢ ∀ (a_1 : Path a₂ a₃) (b_1 : Path b₂ b₃),\n prod (Quotient.mk (Homotopic.setoid a₁ a₂) a) (Quotient.mk (Homotopic.setoid b₁ b₂) b) ⬝\n prod (Quotient.mk (Homotopic.setoid a₂ a₃) a_1) (Quotient.mk (Homotopic.setoid b₂ b₃) b_1) =\n prod (Quotient.mk (Homotopic.setoid a₁ a₂) a ⬝ Quotient.mk (Homotopic.setoid a₂ a₃) a_1)\n (Quotient.mk (Homotopic.setoid b₁ b₂) b ⬝ Quotient.mk (Homotopic.setoid b₂ b₃) b_1)\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\na : Path a₁ a₂\nb : Path b₁ b₂\na✝ : Path a₂ a₃\nb✝ : Path b₂ b₃\n⊢ prod (Quotient.mk (Homotopic.setoid a₁ a₂) a) (Quotient.mk (Homotopic.setoid b₁ b₂) b) ⬝\n prod (Quotient.mk (Homotopic.setoid a₂ a₃) a✝) (Quotient.mk (Homotopic.setoid b₂ b₃) b✝) =\n prod (Quotient.mk (Homotopic.setoid a₁ a₂) a ⬝ Quotient.mk (Homotopic.setoid a₂ a₃) a✝)\n (Quotient.mk (Homotopic.setoid b₁ b₂) b ⬝ Quotient.mk (Homotopic.setoid b₂ b₃) b✝)\n[PROOFSTEP]\nsimp only [prod_lift, ← Path.Homotopic.comp_lift, Path.trans_prod_eq_prod_trans]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\n⊢ projLeft (prod q₁ q₂) = q₁\n[PROOFSTEP]\napply Quotient.inductionOn₂ (motive := _) q₁ q₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\n⊢ ∀ (a : Path a₁ a₂) (b : Path b₁ b₂),\n projLeft (prod (Quotient.mk (Homotopic.setoid a₁ a₂) a) (Quotient.mk (Homotopic.setoid b₁ b₂) b)) =\n Quotient.mk (Homotopic.setoid a₁ a₂) a\n[PROOFSTEP]\nintro p₁ p₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁✝ p₁' : Path a₁ a₂\np₂✝ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np₁ : Path a₁ a₂\np₂ : Path b₁ b₂\n⊢ projLeft (prod (Quotient.mk (Homotopic.setoid a₁ a₂) p₁) (Quotient.mk (Homotopic.setoid b₁ b₂) p₂)) =\n Quotient.mk (Homotopic.setoid a₁ a₂) p₁\n[PROOFSTEP]\nunfold projLeft\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁✝ p₁' : Path a₁ a₂\np₂✝ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np₁ : Path a₁ a₂\np₂ : Path b₁ b₂\n⊢ Quotient.mapFn (prod (Quotient.mk (Homotopic.setoid a₁ a₂) p₁) (Quotient.mk (Homotopic.setoid b₁ b₂) p₂))\n (ContinuousMap.mk Prod.fst) =\n Quotient.mk (Homotopic.setoid a₁ a₂) p₁\n[PROOFSTEP]\nrw [prod_lift, ← Path.Homotopic.map_lift]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁✝ p₁' : Path a₁ a₂\np₂✝ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np₁ : Path a₁ a₂\np₂ : Path b₁ b₂\n⊢ Quotient.mk (Homotopic.setoid (↑(ContinuousMap.mk Prod.fst) (a₁, b₁)) (↑(ContinuousMap.mk Prod.fst) (a₂, b₂)))\n (Path.map (Path.prod p₁ p₂) (_ : Continuous ↑(ContinuousMap.mk Prod.fst))) =\n Quotient.mk (Homotopic.setoid a₁ a₂) p₁\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\n⊢ projRight (prod q₁ q₂) = q₂\n[PROOFSTEP]\napply Quotient.inductionOn₂ (motive := _) q₁ q₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\n⊢ ∀ (a : Path a₁ a₂) (b : Path b₁ b₂),\n projRight (prod (Quotient.mk (Homotopic.setoid a₁ a₂) a) (Quotient.mk (Homotopic.setoid b₁ b₂) b)) =\n Quotient.mk (Homotopic.setoid b₁ b₂) b\n[PROOFSTEP]\nintro p₁ p₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁✝ p₁' : Path a₁ a₂\np₂✝ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np₁ : Path a₁ a₂\np₂ : Path b₁ b₂\n⊢ projRight (prod (Quotient.mk (Homotopic.setoid a₁ a₂) p₁) (Quotient.mk (Homotopic.setoid b₁ b₂) p₂)) =\n Quotient.mk (Homotopic.setoid b₁ b₂) p₂\n[PROOFSTEP]\nunfold projRight\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁✝ p₁' : Path a₁ a₂\np₂✝ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np₁ : Path a₁ a₂\np₂ : Path b₁ b₂\n⊢ Quotient.mapFn (prod (Quotient.mk (Homotopic.setoid a₁ a₂) p₁) (Quotient.mk (Homotopic.setoid b₁ b₂) p₂))\n (ContinuousMap.mk Prod.snd) =\n Quotient.mk (Homotopic.setoid b₁ b₂) p₂\n[PROOFSTEP]\nrw [prod_lift, ← Path.Homotopic.map_lift]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁✝ p₁' : Path a₁ a₂\np₂✝ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np₁ : Path a₁ a₂\np₂ : Path b₁ b₂\n⊢ Quotient.mk (Homotopic.setoid (↑(ContinuousMap.mk Prod.snd) (a₁, b₁)) (↑(ContinuousMap.mk Prod.snd) (a₂, b₂)))\n (Path.map (Path.prod p₁ p₂) (_ : Continuous ↑(ContinuousMap.mk Prod.snd))) =\n Quotient.mk (Homotopic.setoid b₁ b₂) p₂\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np : Homotopic.Quotient (a₁, b₁) (a₂, b₂)\n⊢ prod (projLeft p) (projRight p) = p\n[PROOFSTEP]\napply Quotient.inductionOn (motive := _) p\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np : Homotopic.Quotient (a₁, b₁) (a₂, b₂)\n⊢ ∀ (a : Path (a₁, b₁) (a₂, b₂)),\n prod (projLeft (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) a))\n (projRight (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) a)) =\n Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) a\n[PROOFSTEP]\nintro p'\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np : Homotopic.Quotient (a₁, b₁) (a₂, b₂)\np' : Path (a₁, b₁) (a₂, b₂)\n⊢ prod (projLeft (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p'))\n (projRight (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p')) =\n Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p'\n[PROOFSTEP]\nunfold projLeft\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np : Homotopic.Quotient (a₁, b₁) (a₂, b₂)\np' : Path (a₁, b₁) (a₂, b₂)\n⊢ prod (Quotient.mapFn (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p') (ContinuousMap.mk Prod.fst))\n (projRight (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p')) =\n Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p'\n[PROOFSTEP]\nunfold projRight\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np : Homotopic.Quotient (a₁, b₁) (a₂, b₂)\np' : Path (a₁, b₁) (a₂, b₂)\n⊢ prod (Quotient.mapFn (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p') (ContinuousMap.mk Prod.fst))\n (Quotient.mapFn (Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p') (ContinuousMap.mk Prod.snd)) =\n Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p'\n[PROOFSTEP]\nsimp only [← Path.Homotopic.map_lift, prod_lift]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\na₁ a₂ a₃ : α\nb₁ b₂ b₃ : β\np₁ p₁' : Path a₁ a₂\np₂ p₂' : Path b₁ b₂\nq₁ : Homotopic.Quotient a₁ a₂\nq₂ : Homotopic.Quotient b₁ b₂\nr₁ : Homotopic.Quotient a₂ a₃\nr₂ : Homotopic.Quotient b₂ b₃\nc₁ c₂ : α × β\np : Homotopic.Quotient (a₁, b₁) (a₂, b₂)\np' : Path (a₁, b₁) (a₂, b₂)\n⊢ prod\n (Quotient.mk (Homotopic.setoid (↑(ContinuousMap.mk Prod.fst) (a₁, b₁)) (↑(ContinuousMap.mk Prod.fst) (a₂, b₂)))\n (Path.map p' (_ : Continuous ↑(ContinuousMap.mk Prod.fst))))\n (Quotient.mk (Homotopic.setoid (↑(ContinuousMap.mk Prod.snd) (a₁, b₁)) (↑(ContinuousMap.mk Prod.snd) (a₂, b₂)))\n (Path.map p' (_ : Continuous ↑(ContinuousMap.mk Prod.snd)))) =\n Quotient.mk (Homotopic.setoid (a₁, b₁) (a₂, b₂)) p'\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.Topology.Homotopy.Product", "llama_tokens": 15882, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8740772417253256, "lm_q2_score": 0.7057850340255386, "lm_q1q2_score": 0.6169106357920578}} {"text": "[GOAL]\nC : Type u_1\ninst✝ : Bicategory C\nX : C\n⊢ ∀ {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : EndMonoidal X} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁) (g₂ : Y₂ ⟶ Z₂),\n (fun {X₁ Y₁ X₂ Y₂} f g => f ▷ X₂ ≫ Y₁ ◁ g) (f₁ ≫ g₁) (f₂ ≫ g₂) =\n (fun {X₁ Y₁ X₂ Y₂} f g => f ▷ X₂ ≫ Y₁ ◁ g) f₁ f₂ ≫ (fun {X₁ Y₁ X₂ Y₂} f g => f ▷ X₂ ≫ Y₁ ◁ g) g₁ g₂\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\ninst✝ : Bicategory C\nX : C\nX₁✝ Y₁✝ Z₁✝ X₂✝ Y₂✝ Z₂✝ : EndMonoidal X\nf₁✝ : X₁✝ ⟶ Y₁✝\nf₂✝ : X₂✝ ⟶ Y₂✝\ng₁✝ : Y₁✝ ⟶ Z₁✝\ng₂✝ : Y₂✝ ⟶ Z₂✝\n⊢ (fun {X₁ Y₁ X₂ Y₂} f g => f ▷ X₂ ≫ Y₁ ◁ g) (f₁✝ ≫ g₁✝) (f₂✝ ≫ g₂✝) =\n (fun {X₁ Y₁ X₂ Y₂} f g => f ▷ X₂ ≫ Y₁ ◁ g) f₁✝ f₂✝ ≫ (fun {X₁ Y₁ X₂ Y₂} f g => f ▷ X₂ ≫ Y₁ ◁ g) g₁✝ g₂✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Bicategory C\nX : C\nX₁✝ Y₁✝ Z₁✝ X₂✝ Y₂✝ Z₂✝ : EndMonoidal X\nf₁✝ : X₁✝ ⟶ Y₁✝\nf₂✝ : X₂✝ ⟶ Y₂✝\ng₁✝ : Y₁✝ ⟶ Z₁✝\ng₂✝ : Y₂✝ ⟶ Z₂✝\n⊢ (f₁✝ ≫ g₁✝) ▷ X₂✝ ≫ Z₁✝ ◁ (f₂✝ ≫ g₂✝) = (f₁✝ ▷ X₂✝ ≫ Y₁✝ ◁ f₂✝) ≫ g₁✝ ▷ Y₂✝ ≫ Z₁✝ ◁ g₂✝\n[PROOFSTEP]\nrw [Bicategory.whiskerLeft_comp, Bicategory.comp_whiskerRight, Category.assoc, Category.assoc,\n Bicategory.whisker_exchange_assoc]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.End", "llama_tokens": 839, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246118695629, "lm_q2_score": 0.740174367770488, "lm_q1q2_score": 0.616805517738141}} {"text": "[GOAL]\nθ : ℂ\n⊢ cos θ = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2\n[PROOFSTEP]\nhave h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 :=\n by\n rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg,\n neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub]\n congr 3; ring_nf\n[GOAL]\nθ : ℂ\n⊢ (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1\n[PROOFSTEP]\nrw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul,\n ← div_eq_iff (exp_ne_zero _), ← exp_sub]\n[GOAL]\nθ : ℂ\n⊢ exp (θ * I - -θ * I) = -1 ↔ exp (2 * θ * I) = -1\n[PROOFSTEP]\ncongr 3\n[GOAL]\nθ : ℂ\n⊢ exp (θ * I - -θ * I) = -1 ↔ exp (2 * θ * I) = -1\n[PROOFSTEP]\nring_nf\n[GOAL]\nθ : ℂ\nh : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1\n⊢ cos θ = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2\n[PROOFSTEP]\nrw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm]\n[GOAL]\nθ : ℂ\nh : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1\n⊢ (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2\n[PROOFSTEP]\nrefine' exists_congr fun x => _\n[GOAL]\nθ : ℂ\nh : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1\nx : ℤ\n⊢ 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x + 1) * ↑π / 2\n[PROOFSTEP]\nrefine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero)\n[GOAL]\nθ : ℂ\nh : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1\nx : ℤ\n⊢ ↑π * I + ↑x * (2 * ↑π * I) = 2 * I * ((2 * ↑x + 1) * ↑π / 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nθ : ℂ\nh : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1\nx : ℤ\n⊢ (↑π * I + ↑x * (2 * ↑π * I)) * 2 = 2 * I * ((2 * ↑x + 1) * ↑π)\n[PROOFSTEP]\nring\n[GOAL]\nθ : ℂ\n⊢ cos θ ≠ 0 ↔ ∀ (k : ℤ), θ ≠ (2 * ↑k + 1) * ↑π / 2\n[PROOFSTEP]\nrw [← not_exists, not_iff_not, cos_eq_zero_iff]\n[GOAL]\nθ : ℂ\n⊢ sin θ = 0 ↔ ∃ k, θ = ↑k * ↑π\n[PROOFSTEP]\nrw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff]\n[GOAL]\nθ : ℂ\n⊢ (∃ k, θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2) ↔ ∃ k, θ = ↑k * ↑π\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nθ : ℂ\n⊢ (∃ k, θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2) → ∃ k, θ = ↑k * ↑π\n[PROOFSTEP]\nrintro ⟨k, hk⟩\n[GOAL]\ncase mp.intro\nθ : ℂ\nk : ℤ\nhk : θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2\n⊢ ∃ k, θ = ↑k * ↑π\n[PROOFSTEP]\nuse k + 1\n[GOAL]\ncase h\nθ : ℂ\nk : ℤ\nhk : θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2\n⊢ θ = ↑(k + 1) * ↑π\n[PROOFSTEP]\nfield_simp [eq_add_of_sub_eq hk]\n[GOAL]\ncase h\nθ : ℂ\nk : ℤ\nhk : θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2\n⊢ (2 * ↑k + 1) * ↑π + ↑π = (↑k + 1) * ↑π * 2\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr\nθ : ℂ\n⊢ (∃ k, θ = ↑k * ↑π) → ∃ k, θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2\n[PROOFSTEP]\nrintro ⟨k, rfl⟩\n[GOAL]\ncase mpr.intro\nk : ℤ\n⊢ ∃ k_1, ↑k * ↑π - ↑π / 2 = (2 * ↑k_1 + 1) * ↑π / 2\n[PROOFSTEP]\nuse k - 1\n[GOAL]\ncase h\nk : ℤ\n⊢ ↑k * ↑π - ↑π / 2 = (2 * ↑(k - 1) + 1) * ↑π / 2\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h\nk : ℤ\n⊢ ↑k * ↑π * 2 - ↑π = (2 * (↑k - 1) + 1) * ↑π\n[PROOFSTEP]\nring\n[GOAL]\nθ : ℂ\n⊢ sin θ ≠ 0 ↔ ∀ (k : ℤ), θ ≠ ↑k * ↑π\n[PROOFSTEP]\nrw [← not_exists, not_iff_not, sin_eq_zero_iff]\n[GOAL]\nθ : ℂ\n⊢ tan θ = 0 ↔ ∃ k, θ = ↑k * ↑π / 2\n[PROOFSTEP]\nhave h := (sin_two_mul θ).symm\n[GOAL]\nθ : ℂ\nh : 2 * sin θ * cos θ = sin (2 * θ)\n⊢ tan θ = 0 ↔ ∃ k, θ = ↑k * ↑π / 2\n[PROOFSTEP]\nrw [mul_assoc] at h \n[GOAL]\nθ : ℂ\nh : 2 * (sin θ * cos θ) = sin (2 * θ)\n⊢ tan θ = 0 ↔ ∃ k, θ = ↑k * ↑π / 2\n[PROOFSTEP]\nrw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div,\n CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm]\n[GOAL]\nθ : ℂ\nh : 2 * (sin θ * cos θ) = sin (2 * θ)\n⊢ sin (θ * 2) / 2 = 0 / 2 ↔ ∃ k, θ = ↑k * ↑π / 2\n[PROOFSTEP]\nsimpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff\n[GOAL]\nθ : ℂ\n⊢ tan θ ≠ 0 ↔ ∀ (k : ℤ), θ ≠ ↑k * ↑π / 2\n[PROOFSTEP]\nrw [← not_exists, not_iff_not, tan_eq_zero_iff]\n[GOAL]\nn : ℤ\n⊢ ∃ k, ↑n * ↑π / 2 = ↑k * ↑π / 2\n[PROOFSTEP]\nuse n\n[GOAL]\nx y : ℂ\n⊢ cos x - cos y = 0 ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0\n[PROOFSTEP]\nrw [cos_sub_cos]\n[GOAL]\nx y : ℂ\n⊢ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0\n[PROOFSTEP]\nsimp [(by norm_num : (2 : ℂ) ≠ 0)]\n[GOAL]\nx y : ℂ\n⊢ 2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx y : ℂ\n⊢ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 ↔ (∃ k, y = 2 * ↑k * ↑π + x) ∨ ∃ k, y = 2 * ↑k * ↑π - x\n[PROOFSTEP]\napply or_congr\n[GOAL]\ncase h₁\nx y : ℂ\n⊢ sin ((x - y) / 2) = 0 ↔ ∃ k, y = 2 * ↑k * ↑π + x\n[PROOFSTEP]\nfield_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ),\n mul_right_comm _ (2 : ℂ)]\n[GOAL]\nx y : ℂ\n⊢ -2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h₂\nx y : ℂ\n⊢ sin ((x + y) / 2) = 0 ↔ ∃ k, y = 2 * ↑k * ↑π - x\n[PROOFSTEP]\nfield_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ),\n mul_right_comm _ (2 : ℂ)]\n[GOAL]\nx y : ℂ\n⊢ -2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h₁\nx y : ℂ\n⊢ (∃ k, x = ↑k * ↑π * 2 + y) ↔ ∃ k, y = ↑k * ↑π * 2 + x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h₁.mp\nx y : ℂ\n⊢ (∃ k, x = ↑k * ↑π * 2 + y) → ∃ k, y = ↑k * ↑π * 2 + x\n[PROOFSTEP]\nrintro ⟨k, rfl⟩\n[GOAL]\ncase h₁.mp.intro\ny : ℂ\nk : ℤ\n⊢ ∃ k_1, y = ↑k_1 * ↑π * 2 + (↑k * ↑π * 2 + y)\n[PROOFSTEP]\nuse-k\n[GOAL]\ncase h\ny : ℂ\nk : ℤ\n⊢ y = ↑(-k) * ↑π * 2 + (↑k * ↑π * 2 + y)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁.mpr\nx y : ℂ\n⊢ (∃ k, y = ↑k * ↑π * 2 + x) → ∃ k, x = ↑k * ↑π * 2 + y\n[PROOFSTEP]\nrintro ⟨k, rfl⟩\n[GOAL]\ncase h₁.mpr.intro\nx : ℂ\nk : ℤ\n⊢ ∃ k_1, x = ↑k_1 * ↑π * 2 + (↑k * ↑π * 2 + x)\n[PROOFSTEP]\nuse-k\n[GOAL]\ncase h\nx : ℂ\nk : ℤ\n⊢ x = ↑(-k) * ↑π * 2 + (↑k * ↑π * 2 + x)\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℂ\n⊢ sin x = sin y ↔ ∃ k, y = 2 * ↑k * ↑π + x ∨ y = (2 * ↑k + 1) * ↑π - x\n[PROOFSTEP]\nsimp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add]\n[GOAL]\nx y : ℂ\n⊢ (∃ k, y = 2 * ↑k * ↑π + (x - ↑π / 2) + ↑π / 2 ∨ y = 2 * ↑k * ↑π - (x - ↑π / 2) + ↑π / 2) ↔\n ∃ k, y = 2 * ↑k * ↑π + x ∨ y = (2 * ↑k + 1) * ↑π - x\n[PROOFSTEP]\nrefine' exists_congr fun k => or_congr _ _\n[GOAL]\ncase refine'_1\nx y : ℂ\nk : ℤ\n⊢ y = 2 * ↑k * ↑π + (x - ↑π / 2) + ↑π / 2 ↔ y = 2 * ↑k * ↑π + x\n[PROOFSTEP]\nrefine' Eq.congr rfl _\n[GOAL]\ncase refine'_2\nx y : ℂ\nk : ℤ\n⊢ y = 2 * ↑k * ↑π - (x - ↑π / 2) + ↑π / 2 ↔ y = (2 * ↑k + 1) * ↑π - x\n[PROOFSTEP]\nrefine' Eq.congr rfl _\n[GOAL]\ncase refine'_1\nx y : ℂ\nk : ℤ\n⊢ 2 * ↑k * ↑π + (x - ↑π / 2) + ↑π / 2 = 2 * ↑k * ↑π + x\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase refine'_2\nx y : ℂ\nk : ℤ\n⊢ 2 * ↑k * ↑π - (x - ↑π / 2) + ↑π / 2 = (2 * ↑k + 1) * ↑π - x\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase refine'_1\nx y : ℂ\nk : ℤ\n⊢ 2 * ↑k * ↑π * 2 + (x * 2 - ↑π) + ↑π = (2 * ↑k * ↑π + x) * 2\n[PROOFSTEP]\nring\n[GOAL]\ncase refine'_2\nx y : ℂ\nk : ℤ\n⊢ 2 * ↑k * ↑π * 2 - (x * 2 - ↑π) + ↑π = ((2 * ↑k + 1) * ↑π - x) * 2\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * ↑π / 2\n⊢ tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)\n[PROOFSTEP]\nrcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩)\n[GOAL]\ncase inl.intro\nx y : ℂ\nh1 : ∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2\nh2 : ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2\n⊢ tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)\n[PROOFSTEP]\nrw [tan, sin_add, cos_add, ←\n div_div_div_cancel_right (sin x * cos y + cos x * sin y)\n (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)),\n add_div, sub_div]\n[GOAL]\ncase inl.intro\nx y : ℂ\nh1 : ∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2\nh2 : ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2\n⊢ (sin x * cos y / (cos x * cos y) + cos x * sin y / (cos x * cos y)) /\n (cos x * cos y / (cos x * cos y) - sin x * sin y / (cos x * cos y)) =\n (tan x + tan y) / (1 - tan x * tan y)\n[PROOFSTEP]\nsimp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1),\n div_self (cos_ne_zero_iff.mpr h2)]\n[GOAL]\ncase inr.intro.intro.intro\nk l : ℤ\n⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =\n (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /\n (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))\n[PROOFSTEP]\nhaveI t := tan_int_mul_pi_div_two\n[GOAL]\ncase inr.intro.intro.intro\nk l : ℤ\nt : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0\n⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =\n (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /\n (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))\n[PROOFSTEP]\nobtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1))\n[GOAL]\ncase inr.intro.intro.intro\nk l : ℤ\nt : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0\nhx : tan (↑(2 * k + 1) * ↑π / 2) = 0\nhy : tan (↑(2 * l + 1) * ↑π / 2) = 0\nhxy : tan (↑(2 * k + 1 + (2 * l + 1)) * ↑π / 2) = 0\n⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =\n (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /\n (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))\n[PROOFSTEP]\nsimp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy \n[GOAL]\ncase inr.intro.intro.intro\nk l : ℤ\nt : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0\nhx : tan ((2 * ↑k + 1) * ↑π / 2) = 0\nhy : tan ((2 * ↑l + 1) * ↑π / 2) = 0\nhxy : tan ((2 * ↑k + 1 + (2 * ↑l + 1)) * ↑π / 2) = 0\n⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =\n (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /\n (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))\n[PROOFSTEP]\nrw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ←\n mul_div_assoc, hxy]\n[GOAL]\nz : ℂ\n⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)\n[PROOFSTEP]\nby_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2\n[GOAL]\ncase pos\nz : ℂ\nh : ∀ (k : ℤ), z ≠ (2 * ↑k + 1) * ↑π / 2\n⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)\n[PROOFSTEP]\nrw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)]\n[GOAL]\ncase neg\nz : ℂ\nh : ¬∀ (k : ℤ), z ≠ (2 * ↑k + 1) * ↑π / 2\n⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)\n[PROOFSTEP]\nrw [not_forall_not] at h \n[GOAL]\ncase neg\nz : ℂ\nh : ∃ x, z = (2 * ↑x + 1) * ↑π / 2\n⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)\n[PROOFSTEP]\nrw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)]\n[GOAL]\nx y : ℂ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), y * I ≠ (2 * ↑l + 1) * ↑π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, y * I = (2 * ↑l + 1) * ↑π / 2\n⊢ tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I)\n[PROOFSTEP]\nrw [tan_add h, tan_mul_I, mul_assoc]\n[GOAL]\nz : ℂ\nh :\n ((∀ (k : ℤ), ↑z.re ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), ↑z.im * I ≠ (2 * ↑l + 1) * ↑π / 2) ∨\n (∃ k, ↑z.re = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, ↑z.im * I = (2 * ↑l + 1) * ↑π / 2\n⊢ tan z = (tan ↑z.re + tanh ↑z.im * I) / (1 - tan ↑z.re * tanh ↑z.im * I)\n[PROOFSTEP]\nconvert tan_add_mul_I h\n[GOAL]\ncase h.e'_2.h.e'_1\nz : ℂ\nh :\n ((∀ (k : ℤ), ↑z.re ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), ↑z.im * I ≠ (2 * ↑l + 1) * ↑π / 2) ∨\n (∃ k, ↑z.re = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, ↑z.im * I = (2 * ↑l + 1) * ↑π / 2\n⊢ z = ↑z.re + ↑z.im * I\n[PROOFSTEP]\nexact (re_add_im z).symm\n[GOAL]\nz w : ℂ\n⊢ cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0\n[PROOFSTEP]\nrw [← sub_eq_zero]\n[GOAL]\nz w : ℂ\n⊢ cos z - w = 0 ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0\n[PROOFSTEP]\nfield_simp [cos, exp_neg, exp_ne_zero]\n[GOAL]\nz w : ℂ\n⊢ exp (z * I) * exp (z * I) + 1 - exp (z * I) * 2 * w = 0 ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0\n[PROOFSTEP]\nrefine' Eq.congr _ rfl\n[GOAL]\nz w : ℂ\n⊢ exp (z * I) * exp (z * I) + 1 - exp (z * I) * 2 * w = exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1\n[PROOFSTEP]\nring\n[GOAL]\n⊢ Function.Surjective cos\n[PROOFSTEP]\nintro x\n[GOAL]\nx : ℂ\n⊢ ∃ a, cos a = x\n[PROOFSTEP]\nobtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 :=\n by\n rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩\n refine' ⟨w, _, hw⟩\n rintro rfl\n simp only [zero_add, one_ne_zero, mul_zero] at hw \n[GOAL]\nx : ℂ\n⊢ ∃ w x_1, 1 * w * w + -2 * x * w + 1 = 0\n[PROOFSTEP]\nrcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩\n[GOAL]\ncase intro\nx w : ℂ\nhw : 1 * w * w + ?m.63171 * w + ?m.63172 = 0\n⊢ ∃ w x_1, 1 * w * w + -2 * x * w + 1 = 0\n[PROOFSTEP]\nrefine' ⟨w, _, hw⟩\n[GOAL]\ncase intro\nx w : ℂ\nhw : 1 * w * w + -2 * x * w + 1 = 0\n⊢ w ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro\nx : ℂ\nhw : 1 * 0 * 0 + -2 * x * 0 + 1 = 0\n⊢ False\n[PROOFSTEP]\nsimp only [zero_add, one_ne_zero, mul_zero] at hw \n[GOAL]\ncase intro.intro\nx w : ℂ\nw₀ : w ≠ 0\nhw : 1 * w * w + -2 * x * w + 1 = 0\n⊢ ∃ a, cos a = x\n[PROOFSTEP]\nrefine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩\n[GOAL]\ncase intro.intro\nx w : ℂ\nw₀ : w ≠ 0\nhw : 1 * w * w + -2 * x * w + 1 = 0\n⊢ exp (log w / I * I) ^ 2 - 2 * x * exp (log w / I * I) + 1 = 0\n[PROOFSTEP]\nrw [div_mul_cancel _ I_ne_zero, exp_log w₀]\n[GOAL]\ncase intro.intro\nx w : ℂ\nw₀ : w ≠ 0\nhw : 1 * w * w + -2 * x * w + 1 = 0\n⊢ w ^ 2 - 2 * x * w + 1 = 0\n[PROOFSTEP]\nconvert hw using 1\n[GOAL]\ncase h.e'_2\nx w : ℂ\nw₀ : w ≠ 0\nhw : 1 * w * w + -2 * x * w + 1 = 0\n⊢ w ^ 2 - 2 * x * w + 1 = 1 * w * w + -2 * x * w + 1\n[PROOFSTEP]\nring\n[GOAL]\n⊢ Function.Surjective sin\n[PROOFSTEP]\nintro x\n[GOAL]\nx : ℂ\n⊢ ∃ a, sin a = x\n[PROOFSTEP]\nrcases cos_surjective x with ⟨z, rfl⟩\n[GOAL]\ncase intro\nz : ℂ\n⊢ ∃ a, sin a = cos z\n[PROOFSTEP]\nexact ⟨z + π / 2, sin_add_pi_div_two z⟩\n[GOAL]\nθ : ℝ\n⊢ cos θ = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * π / 2\n[PROOFSTEP]\nexact_mod_cast @Complex.cos_eq_zero_iff θ\n[GOAL]\nθ : ℝ\n⊢ cos θ ≠ 0 ↔ ∀ (k : ℤ), θ ≠ (2 * ↑k + 1) * π / 2\n[PROOFSTEP]\nrw [← not_exists, not_iff_not, cos_eq_zero_iff]\n[GOAL]\nx y : ℝ\n⊢ cos x = cos y ↔ ∃ k, y = 2 * ↑k * π + x ∨ y = 2 * ↑k * π - x\n[PROOFSTEP]\nexact_mod_cast @Complex.cos_eq_cos_iff x y\n[GOAL]\nx y : ℝ\n⊢ sin x = sin y ↔ ∃ k, y = 2 * ↑k * π + x ∨ y = (2 * ↑k + 1) * π - x\n[PROOFSTEP]\nexact_mod_cast @Complex.sin_eq_sin_iff x y\n[GOAL]\nx : ℝ\nhx : 0 < x\nhx' : x < 1\n⊢ x < sin (π / 2 * x)\n[PROOFSTEP]\nsimpa [mul_comm x] using\n strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne\n (sub_pos.2 hx') hx\n[GOAL]\nx : ℝ\nhx : 0 ≤ x\nhx' : x ≤ 1\n⊢ x ≤ sin (π / 2 * x)\n[PROOFSTEP]\nsimpa [mul_comm x] using\n strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx')\n hx\n[GOAL]\nx : ℝ\nhx : 0 < x\nhx' : x < π / 2\n⊢ 2 / π * x < sin x\n[PROOFSTEP]\nrw [← inv_div]\n[GOAL]\nx : ℝ\nhx : 0 < x\nhx' : x < π / 2\n⊢ (π / 2)⁻¹ * x < sin x\n[PROOFSTEP]\nsimpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using\n @lt_sin_mul ((π / 2)⁻¹ * x) (mul_pos (inv_pos.2 pi_div_two_pos) hx)\n (by rwa [← div_eq_inv_mul, div_lt_one pi_div_two_pos])\n[GOAL]\nx : ℝ\nhx : 0 < x\nhx' : x < π / 2\n⊢ (π / 2)⁻¹ * x < 1\n[PROOFSTEP]\nrwa [← div_eq_inv_mul, div_lt_one pi_div_two_pos]\n[GOAL]\nx : ℝ\nhx : 0 ≤ x\nhx' : x ≤ π / 2\n⊢ 2 / π * x ≤ sin x\n[PROOFSTEP]\nrw [← inv_div]\n[GOAL]\nx : ℝ\nhx : 0 ≤ x\nhx' : x ≤ π / 2\n⊢ (π / 2)⁻¹ * x ≤ sin x\n[PROOFSTEP]\nsimpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using\n @le_sin_mul ((π / 2)⁻¹ * x) (mul_nonneg (inv_nonneg.2 pi_div_two_pos.le) hx)\n (by rwa [← div_eq_inv_mul, div_le_one pi_div_two_pos])\n[GOAL]\nx : ℝ\nhx : 0 ≤ x\nhx' : x ≤ π / 2\n⊢ (π / 2)⁻¹ * x ≤ 1\n[PROOFSTEP]\nrwa [← div_eq_inv_mul, div_le_one pi_div_two_pos]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex", "llama_tokens": 9345, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8991213691605411, "lm_q2_score": 0.685949467848392, "lm_q1q2_score": 0.6167518247067907}} {"text": "[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 →ᵃ[𝕜] E\na b : E\nL : Filter 𝕜\ns : Set 𝕜\nx : 𝕜\n⊢ HasStrictDerivAt (↑f) (↑f.linear 1) x\n[PROOFSTEP]\nrw [f.decomp]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 →ᵃ[𝕜] E\na b : E\nL : Filter 𝕜\ns : Set 𝕜\nx : 𝕜\n⊢ HasStrictDerivAt (↑f.linear + fun x => ↑f 0) (↑f.linear 1) x\n[PROOFSTEP]\nexact f.linear.hasStrictDerivAt.add_const (f 0)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 →ᵃ[𝕜] E\na b : E\nL : Filter 𝕜\ns : Set 𝕜\nx : 𝕜\n⊢ HasDerivAtFilter (↑f) (↑f.linear 1) x L\n[PROOFSTEP]\nrw [f.decomp]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 →ᵃ[𝕜] E\na b : E\nL : Filter 𝕜\ns : Set 𝕜\nx : 𝕜\n⊢ HasDerivAtFilter (↑f.linear + fun x => ↑f 0) (↑f.linear 1) x L\n[PROOFSTEP]\nexact f.linear.hasDerivAtFilter.add_const (f 0)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 →ᵃ[𝕜] E\na b : E\nL : Filter 𝕜\ns : Set 𝕜\nx : 𝕜\n⊢ HasStrictDerivAt (↑(lineMap a b)) (b - a) x\n[PROOFSTEP]\nsimpa using (lineMap a b : 𝕜 →ᵃ[𝕜] E).hasStrictDerivAt\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Deriv.AffineMap", "llama_tokens": 729, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303285397349, "lm_q2_score": 0.7799929053683038, "lm_q1q2_score": 0.6166080477394675}} {"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nA : Type u_4\nB : Type u_5\nM : Type u_6\nN : Type u_7\nP : Type u_8\nQ : Type u_9\nG : Type u_10\nH : Type u_11\ninst✝ : Group G\na b : G\n⊢ (fun b => b⁻¹ * a) ((fun b => a / b) b) = b\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nA : Type u_4\nB : Type u_5\nM : Type u_6\nN : Type u_7\nP : Type u_8\nQ : Type u_9\nG : Type u_10\nH : Type u_11\ninst✝ : Group G\na b : G\n⊢ (fun b => a / b) ((fun b => b⁻¹ * a) b) = b\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nA : Type u_4\nB : Type u_5\nM : Type u_6\nN : Type u_7\nP : Type u_8\nQ : Type u_9\nG : Type u_10\nH : Type u_11\ninst✝ : Group G\na b : G\n⊢ (fun b => b * a) ((fun b => b / a) b) = b\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nA : Type u_4\nB : Type u_5\nM : Type u_6\nN : Type u_7\nP : Type u_8\nQ : Type u_9\nG : Type u_10\nH : Type u_11\ninst✝ : Group G\na b : G\n⊢ (fun b => b / a) ((fun b => b * a) b) = b\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Hom.Equiv.Units.Basic", "llama_tokens": 552, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339676722394, "lm_q2_score": 0.7341195152660687, "lm_q1q2_score": 0.616465093299997}} {"text": "[GOAL]\nβ : Type u_1\nf : β → ℕ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\n⊢ (gcd s fun b => f b / gcd s f) = 1\n[PROOFSTEP]\nobtain ⟨g, he, hg⟩ := Finset.extract_gcd f ⟨x, hx⟩\n[GOAL]\ncase intro.intro\nβ : Type u_1\nf : β → ℕ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → ℕ\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\n⊢ (gcd s fun b => f b / gcd s f) = 1\n[PROOFSTEP]\nrefine' (Finset.gcd_congr rfl fun a ha => _).trans hg\n[GOAL]\ncase intro.intro\nβ : Type u_1\nf : β → ℕ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → ℕ\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\na : β\nha : a ∈ s\n⊢ f a / gcd s f = g a\n[PROOFSTEP]\nrw [he a ha, Nat.mul_div_cancel_left]\n[GOAL]\ncase intro.intro.H\nβ : Type u_1\nf : β → ℕ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → ℕ\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\na : β\nha : a ∈ s\n⊢ 0 < gcd s f\n[PROOFSTEP]\nexact Nat.pos_of_ne_zero (mt Finset.gcd_eq_zero_iff.1 fun h => hfz <| h x hx)\n[GOAL]\nβ : Type u_1\nf : β → ℤ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\n⊢ (gcd s fun b => f b / gcd s f) = 1\n[PROOFSTEP]\nobtain ⟨g, he, hg⟩ := Finset.extract_gcd f ⟨x, hx⟩\n[GOAL]\ncase intro.intro\nβ : Type u_1\nf : β → ℤ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → ℤ\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\n⊢ (gcd s fun b => f b / gcd s f) = 1\n[PROOFSTEP]\nrefine' (Finset.gcd_congr rfl fun a ha => _).trans hg\n[GOAL]\ncase intro.intro\nβ : Type u_1\nf : β → ℤ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → ℤ\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\na : β\nha : a ∈ s\n⊢ f a / gcd s f = g a\n[PROOFSTEP]\nrw [he a ha, Int.mul_ediv_cancel_left]\n[GOAL]\ncase intro.intro.H\nβ : Type u_1\nf : β → ℤ\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → ℤ\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\na : β\nha : a ∈ s\n⊢ gcd s f ≠ 0\n[PROOFSTEP]\nexact mt Finset.gcd_eq_zero_iff.1 fun h => hfz <| h x hx\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nβ : Type u_2\nf : β → Polynomial K\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\n⊢ (gcd s fun b => f b / gcd s f) = 1\n[PROOFSTEP]\nobtain ⟨g, he, hg⟩ := Finset.extract_gcd f ⟨x, hx⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝ : Field K\nβ : Type u_2\nf : β → Polynomial K\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → Polynomial K\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\n⊢ (gcd s fun b => f b / gcd s f) = 1\n[PROOFSTEP]\nrefine' (Finset.gcd_congr rfl fun a ha => _).trans hg\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝ : Field K\nβ : Type u_2\nf : β → Polynomial K\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → Polynomial K\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\na : β\nha : a ∈ s\n⊢ f a / gcd s f = g a\n[PROOFSTEP]\nrw [he a ha, EuclideanDomain.mul_div_cancel_left]\n[GOAL]\ncase intro.intro.a0\nK : Type u_1\ninst✝ : Field K\nβ : Type u_2\nf : β → Polynomial K\ns : Finset β\nx : β\nhx : x ∈ s\nhfz : f x ≠ 0\ng : β → Polynomial K\nhe : ∀ (b : β), b ∈ s → f b = gcd s f * g b\nhg : gcd s g = 1\na : β\nha : a ∈ s\n⊢ gcd s f ≠ 0\n[PROOFSTEP]\nexact mt Finset.gcd_eq_zero_iff.1 fun h => hfz <| h x hx\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GCDMonoid.Div", "llama_tokens": 1787, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835207180243, "lm_q2_score": 0.7371581741774411, "lm_q1q2_score": 0.6158835066878391}} {"text": "[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝ : SeminormedAddCommGroup E\ns t : Set α\nf✝ : α → E\na✝ : α\nh : s ⊆ t\nf : α → E\na : α\n⊢ ‖indicator s f a‖ ≤ ‖indicator t f a‖\n[PROOFSTEP]\nsimp only [norm_indicator_eq_indicator_norm]\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝ : SeminormedAddCommGroup E\ns t : Set α\nf✝ : α → E\na✝ : α\nh : s ⊆ t\nf : α → E\na : α\n⊢ indicator s (fun a => ‖f a‖) a ≤ indicator t (fun a => ‖f a‖) a\n[PROOFSTEP]\nexact indicator_le_indicator_of_subset ‹_› (fun _ => norm_nonneg _) _\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝ : SeminormedAddCommGroup E\ns t : Set α\nf : α → E\na : α\n⊢ ‖indicator s f a‖ ≤ ‖f a‖\n[PROOFSTEP]\nrw [norm_indicator_eq_indicator_norm]\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝ : SeminormedAddCommGroup E\ns t : Set α\nf : α → E\na : α\n⊢ indicator s (fun a => ‖f a‖) a ≤ ‖f a‖\n[PROOFSTEP]\napply indicator_norm_le_norm_self\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.IndicatorFunction", "llama_tokens": 429, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835289107309, "lm_q2_score": 0.7371581510799252, "lm_q1q2_score": 0.6158834934295656}} {"text": "[GOAL]\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\nn : ℤ\nh : ↑n = 0\n⊢ n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\na✝ : ℕ\nh : ↑(ofNat a✝) = 0\n⊢ ofNat a✝ = 0\n[PROOFSTEP]\nerw [Int.cast_ofNat] at h \n[GOAL]\ncase ofNat\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\na✝ : ℕ\nh : ↑a✝ = 0\n⊢ ofNat a✝ = 0\n[PROOFSTEP]\nexact congr_arg _ (Nat.cast_eq_zero.1 h)\n[GOAL]\ncase negSucc\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\na✝ : ℕ\nh : ↑-[a✝+1] = 0\n⊢ -[a✝+1] = 0\n[PROOFSTEP]\nrw [cast_negSucc, neg_eq_zero, Nat.cast_eq_zero] at h \n[GOAL]\ncase negSucc\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\na✝ : ℕ\nh : a✝ + 1 = 0\n⊢ -[a✝+1] = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\nn : ℤ\nh : n = 0\n⊢ ↑n = 0\n[PROOFSTEP]\nrw [h, cast_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\nm n : ℤ\n⊢ ↑m = ↑n ↔ m = n\n[PROOFSTEP]\nrw [← sub_eq_zero, ← cast_sub, cast_eq_zero, sub_eq_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : AddGroupWithOne α\ninst✝ : CharZero α\nn : ℤ\n⊢ ↑n = 1 ↔ n = 1\n[PROOFSTEP]\nrw [← cast_one, cast_inj]\n[GOAL]\nα : Type u_1\nk : Type u_2\ninst✝¹ : DivisionRing k\ninst✝ : CharZero k\nm n : ℤ\nn_dvd : n ∣ m\n⊢ ↑(m / n) = ↑m / ↑n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nα : Type u_1\nk : Type u_2\ninst✝¹ : DivisionRing k\ninst✝ : CharZero k\nm : ℤ\nn_dvd : 0 ∣ m\n⊢ ↑(m / 0) = ↑m / ↑0\n[PROOFSTEP]\nsimp [Int.ediv_zero]\n[GOAL]\ncase inr\nα : Type u_1\nk : Type u_2\ninst✝¹ : DivisionRing k\ninst✝ : CharZero k\nm n : ℤ\nn_dvd : n ∣ m\nhn : n ≠ 0\n⊢ ↑(m / n) = ↑m / ↑n\n[PROOFSTEP]\nexact cast_div n_dvd (cast_ne_zero.mpr hn)\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.CharZero", "llama_tokens": 986, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324983301568, "lm_q2_score": 0.7549149923816048, "lm_q1q2_score": 0.615431235266147}} {"text": "[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\n⊢ fixedPoints M F = ↑(⨅ (m : M), FixedBy.subfield F m)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\nz : F\n⊢ z ∈ fixedPoints M F ↔ z ∈ ↑(⨅ (m : M), FixedBy.subfield F m)\n[PROOFSTEP]\nsimp [fixedPoints, FixedBy.subfield, iInf, Subfield.mem_sInf]\n[GOAL]\ncase h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\nz : F\n⊢ (∀ (m : M), m • z = z) ↔\n ∀ (i : M),\n z ∈\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := fixedBy M F i,\n mul_mem' := (_ : ∀ {a b : F}, a ∈ fixedBy M F i → b ∈ fixedBy M F i → i • (a * b) = a * b) },\n one_mem' := (_ : i • 1 = 1) },\n add_mem' :=\n (_ :\n ∀ {a b : F},\n a ∈\n {\n toSubsemigroup :=\n { carrier := fixedBy M F i,\n mul_mem' :=\n (_ : ∀ {a b : F}, a ∈ fixedBy M F i → b ∈ fixedBy M F i → i • (a * b) = a * b) },\n one_mem' := (_ : i • 1 = 1) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := fixedBy M F i,\n mul_mem' :=\n (_ : ∀ {a b : F}, a ∈ fixedBy M F i → b ∈ fixedBy M F i → i • (a * b) = a * b) },\n one_mem' := (_ : i • 1 = 1) }.toSubsemigroup.carrier →\n i • (a + b) = a + b),\n zero_mem' := (_ : i • 0 = 0) }\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm g : M\nx : F\nhx : x ∈ subfield M F\ng' : M\n⊢ g' • g • x = g • x\n[PROOFSTEP]\nrw [hx, hx]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm✝ m : M\nf : { x // x ∈ subfield M F }\nf' : F\n⊢ m • (↑f * f') = ↑f * m • f'\n[PROOFSTEP]\nrw [smul_mul', f.prop m]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm✝ m : M\np : Polynomial { x // x ∈ subfield M F }\nx : { x // x ∈ subfield M F }\n⊢ m • ↑Polynomial.C x = ↑Polynomial.C x\n[PROOFSTEP]\nrw [Polynomial.smul_C, smul]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm✝ m : M\np✝ p q : Polynomial { x // x ∈ subfield M F }\nihp : m • p = p\nihq : m • q = q\n⊢ m • (p + q) = p + q\n[PROOFSTEP]\nrw [smul_add, ihp, ihq]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm✝ m : M\np : Polynomial { x // x ∈ subfield M F }\nn : ℕ\nx : { x // x ∈ subfield M F }\nx✝ : m • (↑Polynomial.C x * Polynomial.X ^ n) = ↑Polynomial.C x * Polynomial.X ^ n\n⊢ m • (↑Polynomial.C x * Polynomial.X ^ (n + 1)) = ↑Polynomial.C x * Polynomial.X ^ (n + 1)\n[PROOFSTEP]\nrw [smul_mul', Polynomial.smul_C, smul, smul_pow', Polynomial.smul_X]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\n⊢ Algebra { x // x ∈ subfield M F } F\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns : Finset F\n⊢ (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\n[PROOFSTEP]\nhaveI : IsEmpty ((∅ : Finset F) : Set F) := by simp\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns : Finset F\n⊢ IsEmpty ↑↑∅\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns : Finset F\nthis : IsEmpty ↑↑∅\n⊢ (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\n[PROOFSTEP]\nrefine' Finset.induction_on s (fun _ => linearIndependent_empty_type) fun a s has ih hs => _\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : LinearIndependent { x // x ∈ subfield G F } fun i => ↑i\n⊢ LinearIndependent F fun i => ↑(toFun G F) ↑i\n[PROOFSTEP]\nrw [coe_insert] at hs ⊢\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : LinearIndependent { x // x ∈ subfield G F } fun i => ↑i\n⊢ LinearIndependent F fun i => ↑(toFun G F) ↑i\n[PROOFSTEP]\nrw [linearIndependent_insert (mt mem_coe.1 has)] at hs \n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\n⊢ LinearIndependent F fun i => ↑(toFun G F) ↑i\n[PROOFSTEP]\nrw [linearIndependent_insert' (mt mem_coe.1 has)]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\n⊢ (LinearIndependent F fun x => ↑(toFun G F) ↑x) ∧ ¬↑(toFun G F) a ∈ Submodule.span F (↑(toFun G F) '' ↑s)\n[PROOFSTEP]\nrefine' ⟨ih hs.1, fun ha => _⟩\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nha : ↑(toFun G F) a ∈ Submodule.span F (↑(toFun G F) '' ↑s)\n⊢ False\n[PROOFSTEP]\nrw [Finsupp.mem_span_image_iff_total] at ha \n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nha : ∃ l, l ∈ Finsupp.supported F F ↑s ∧ ↑(Finsupp.total F (G → F) F ↑(toFun G F)) l = ↑(toFun G F) a\n⊢ False\n[PROOFSTEP]\nrcases ha with ⟨l, hl, hla⟩\n[GOAL]\ncase intro.intro\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ↑(Finsupp.total F (G → F) F ↑(toFun G F)) l = ↑(toFun G F) a\n⊢ False\n[PROOFSTEP]\nrw [Finsupp.total_apply_of_mem_supported F hl] at hla \n[GOAL]\ncase intro.intro\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\n⊢ False\n[PROOFSTEP]\nsuffices ∀ i ∈ s, l i ∈ FixedPoints.subfield G F\n by\n replace hla := (sum_apply _ _ fun i => l i • toFun G F i).symm.trans (congr_fun hla 1)\n simp_rw [Pi.smul_apply, toFun_apply, one_smul] at hla \n refine' hs.2 (hla ▸ Submodule.sum_mem _ fun c hcs => _)\n change (⟨l c, this c hcs⟩ : FixedPoints.subfield G F) • c ∈ _\n exact Submodule.smul_mem _ _ (Submodule.subset_span <| mem_coe.2 hcs)\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis✝ : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\nthis : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F\n⊢ False\n[PROOFSTEP]\nreplace hla := (sum_apply _ _ fun i => l i • toFun G F i).symm.trans (congr_fun hla 1)\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis✝ : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nthis : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F\nhla : ∑ c in s, (↑l c • ↑(toFun G F) c) 1 = ↑(toFun G F) a 1\n⊢ False\n[PROOFSTEP]\nsimp_rw [Pi.smul_apply, toFun_apply, one_smul] at hla \n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis✝ : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nthis : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F\nhla : ∑ x in s, ↑l x • x = a\n⊢ False\n[PROOFSTEP]\nrefine' hs.2 (hla ▸ Submodule.sum_mem _ fun c hcs => _)\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis✝ : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nthis : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F\nhla : ∑ x in s, ↑l x • x = a\nc : F\nhcs : c ∈ s\n⊢ ↑l c • c ∈ Submodule.span { x // x ∈ subfield G F } ↑s\n[PROOFSTEP]\nchange (⟨l c, this c hcs⟩ : FixedPoints.subfield G F) • c ∈ _\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis✝ : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nthis : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F\nhla : ∑ x in s, ↑l x • x = a\nc : F\nhcs : c ∈ s\n⊢ { val := ↑l c, property := (_ : ↑l c ∈ subfield G F) } • c ∈ Submodule.span { x // x ∈ subfield G F } ↑s\n[PROOFSTEP]\nexact Submodule.smul_mem _ _ (Submodule.subset_span <| mem_coe.2 hcs)\n[GOAL]\ncase intro.intro\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\n⊢ ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F\n[PROOFSTEP]\nintro i his g\n[GOAL]\ncase intro.intro\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng : G\n⊢ g • ↑l i = ↑l i\n[PROOFSTEP]\nrefine'\n eq_of_sub_eq_zero\n (linearIndependent_iff'.1 (ih hs.1) s.attach (fun i => g • l i - l i) _ ⟨i, his⟩ (mem_attach _ _) : _)\n[GOAL]\ncase intro.intro\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng : G\n⊢ ∑ i in attach s, (fun i => g • ↑l ↑i - ↑l ↑i) i • ↑(toFun G F) ↑i = 0\n[PROOFSTEP]\nrefine' (@sum_attach _ _ s _ fun i => (g • l i - l i) • MulAction.toFun G F i).trans _\n[GOAL]\ncase intro.intro\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng : G\n⊢ ∑ x in s, (g • ↑l x - ↑l x) • ↑(toFun G F) x = 0\n[PROOFSTEP]\next g'\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g' = OfNat.ofNat 0 g'\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g' = OfNat.ofNat 0 g'\n[PROOFSTEP]\nconv_lhs =>\n rw [sum_apply]\n congr\n ·skip\n · ext\n rw [Pi.smul_apply, sub_smul, smul_eq_mul]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g'\n[PROOFSTEP]\n rw [sum_apply]\n congr\n ·skip\n · ext\n rw [Pi.smul_apply, sub_smul, smul_eq_mul]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g'\n[PROOFSTEP]\n rw [sum_apply]\n congr\n ·skip\n · ext\n rw [Pi.smul_apply, sub_smul, smul_eq_mul]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g'\n[PROOFSTEP]\nrw [sum_apply]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| ∑ c in s, ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'\n[PROOFSTEP]\ncongr\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'\n[PROOFSTEP]\n·skip\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\n[PROOFSTEP]\nskip\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\n[PROOFSTEP]\nskip\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\n[PROOFSTEP]\nskip\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'\n[PROOFSTEP]\n· ext\n rw [Pi.smul_apply, sub_smul, smul_eq_mul]\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'\n[PROOFSTEP]\n ext\n rw [Pi.smul_apply, sub_smul, smul_eq_mul]\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'\n[PROOFSTEP]\n ext\n rw [Pi.smul_apply, sub_smul, smul_eq_mul]\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\nx✝ : F\n| ((g • ↑l x✝ - ↑l x✝) • ↑(toFun G F) x✝) g'\n[PROOFSTEP]\nrw [Pi.smul_apply, sub_smul, smul_eq_mul]\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ ∑ x in s, (g • ↑l x * ↑(toFun G F) x g' - ↑l x • ↑(toFun G F) x g') = OfNat.ofNat 0 g'\n[PROOFSTEP]\nrw [sum_sub_distrib, Pi.zero_apply, sub_eq_zero]\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ ∑ x in s, g • ↑l x * ↑(toFun G F) x g' = ∑ x in s, ↑l x • ↑(toFun G F) x g'\n[PROOFSTEP]\nconv_lhs =>\n congr\n ·skip\n · ext x\n rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| ∑ x in s, g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\n congr\n ·skip\n · ext x\n rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| ∑ x in s, g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\n congr\n ·skip\n · ext x\n rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]\n[GOAL]\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| ∑ x in s, g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\ncongr\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun x => g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\n·skip\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\n[PROOFSTEP]\nskip\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\n[PROOFSTEP]\nskip\n[GOAL]\ncase s\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| s\n[PROOFSTEP]\nskip\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun x => g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\n· ext x\n rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun x => g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\n ext x\n rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun x => g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\n ext x\n rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]\n[GOAL]\ncase f\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n| fun x => g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\next x\n[GOAL]\ncase f.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\nx : F\n| g • ↑l x * ↑(toFun G F) x g'\n[PROOFSTEP]\nrw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ ∑ x in s, g • (↑l x * ↑(toFun G F) x (g⁻¹ * g')) = ∑ x in s, ↑l x • ↑(toFun G F) x g'\n[PROOFSTEP]\nshow\n (∑ x in s, g • (fun y => l y • MulAction.toFun G F y) x (g⁻¹ * g')) =\n ∑ x in s, (fun y => l y • MulAction.toFun G F y) x g'\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ ∑ x in s, g • (fun y => ↑l y • ↑(toFun G F) y) x (g⁻¹ * g') = ∑ x in s, (fun y => ↑l y • ↑(toFun G F) y) x g'\n[PROOFSTEP]\nrw [← smul_sum, ← sum_apply _ _ fun y => l y • toFun G F y, ← sum_apply _ _ fun y => l y • toFun G F y]\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ g • Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) (g⁻¹ * g') = Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) g'\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro.intro.h\nM : Type u\ninst✝⁴ : Monoid M\nG : Type u\ninst✝³ : Group G\nF : Type v\ninst✝² : Field F\ninst✝¹ : MulSemiringAction M F\ninst✝ : MulSemiringAction G F\nm : M\ns✝ : Finset F\nthis : IsEmpty ↑↑∅\na : F\ns : Finset F\nhas : ¬a ∈ s\nih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i\nhs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s\nl : F →₀ F\nhl : l ∈ Finsupp.supported F F ↑s\nhla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a\ni : F\nhis : i ∈ s\ng g' : G\n⊢ g • Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) (g⁻¹ * g') = Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) g'\n[PROOFSTEP]\nrw [hla, toFun_apply, toFun_apply, smul_smul, mul_inv_cancel_left]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\n⊢ Polynomial.Monic (minpoly G F x)\n[PROOFSTEP]\nsimp only [minpoly, Polynomial.monic_toSubring]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\n⊢ Polynomial.Monic (prodXSubSmul G F x)\n[PROOFSTEP]\nexact prodXSubSmul.monic G F x\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\n⊢ Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x (minpoly G F x) = 0\n[PROOFSTEP]\nrw [← prodXSubSmul.eval G F x, Polynomial.eval₂_eq_eval_map]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\n⊢ Polynomial.eval x (Polynomial.map (Subring.subtype (subfield G F).toSubring) (minpoly G F x)) =\n Polynomial.eval x (prodXSubSmul G F x)\n[PROOFSTEP]\nsimp only [minpoly, Polynomial.map_toSubring]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nH : minpoly G F x = 1\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x (minpoly G F x) = 0\n⊢ 1 = 0\n[PROOFSTEP]\nrwa [H, Polynomial.eval₂_one] at this \n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0\n⊢ minpoly G F x ∣ f\n[PROOFSTEP]\nhave : (subfield G F).subtype = (subfield G F).toSubring.subtype := rfl\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0\nthis : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring\n⊢ minpoly G F x ∣ f\n[PROOFSTEP]\nhave h :\n Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =\n Polynomial.map ((IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f :=\n rfl\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0\nthis : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring\nh :\n Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =\n Polynomial.map (↑(IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f\n⊢ minpoly G F x ∣ f\n[PROOFSTEP]\nerw [← Polynomial.map_dvd_map' (Subfield.subtype <| FixedPoints.subfield G F), minpoly, this,\n Polynomial.map_toSubring _ _, prodXSubSmul]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0\nthis : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring\nh :\n Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =\n Polynomial.map (↑(IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f\n⊢ ∏ g : G ⧸ stabilizer G x, (Polynomial.X - ↑Polynomial.C (ofQuotientStabilizer G x g)) ∣\n Polynomial.map (Subring.subtype (subfield G F).toSubring) f\n[PROOFSTEP]\nrefine'\n Fintype.prod_dvd_of_coprime (Polynomial.pairwise_coprime_X_sub_C <| MulAction.injective_ofQuotientStabilizer G x)\n fun y => QuotientGroup.induction_on y fun g => _\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0\nthis : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring\nh :\n Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =\n Polynomial.map (↑(IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f\ny : G ⧸ stabilizer G x\ng : G\n⊢ Polynomial.X - ↑Polynomial.C (ofQuotientStabilizer G x ↑g) ∣\n Polynomial.map (Subring.subtype (subfield G F).toSubring) f\n[PROOFSTEP]\nrw [Polynomial.dvd_iff_isRoot, Polynomial.IsRoot.def, MulAction.ofQuotientStabilizer_mk, Polynomial.eval_smul', ← this,\n ← Subfield.toSubring_subtype_eq_subtype, ← IsInvariantSubring.coe_subtypeHom' G (FixedPoints.subfield G F).toSubring,\n h, ← MulSemiringActionHom.coe_polynomial, ← MulSemiringActionHom.map_smul, smul_polynomial,\n MulSemiringActionHom.coe_polynomial, ← h, IsInvariantSubring.coe_subtypeHom', Polynomial.eval_map,\n Subfield.toSubring_subtype_eq_subtype, hf, smul_zero]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\n⊢ f = 1 ∨ g = 1\n[PROOFSTEP]\nhave hf2 : f ∣ minpoly G F x := by rw [← hfg]; exact dvd_mul_right _ _\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\n⊢ f ∣ minpoly G F x\n[PROOFSTEP]\nrw [← hfg]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\n⊢ f ∣ f * g\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\n⊢ f = 1 ∨ g = 1\n[PROOFSTEP]\nhave hg2 : g ∣ minpoly G F x := by rw [← hfg]; exact dvd_mul_left _ _\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\n⊢ g ∣ minpoly G F x\n[PROOFSTEP]\nrw [← hfg]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\n⊢ g ∣ f * g\n[PROOFSTEP]\nexact dvd_mul_left _ _\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\n⊢ f = 1 ∨ g = 1\n[PROOFSTEP]\nhave := eval₂ G F x\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x (minpoly G F x) = 0\n⊢ f = 1 ∨ g = 1\n[PROOFSTEP]\nrw [← hfg, Polynomial.eval₂_mul, mul_eq_zero] at this \n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis :\n Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0 ∨\n Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0\n⊢ f = 1 ∨ g = 1\n[PROOFSTEP]\ncases' this with this this\n[GOAL]\ncase inl\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0\n⊢ f = 1 ∨ g = 1\n[PROOFSTEP]\nright\n[GOAL]\ncase inl.h\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0\n⊢ g = 1\n[PROOFSTEP]\nhave hf3 : f = minpoly G F x :=\n Polynomial.eq_of_monic_of_associated hf (monic G F x) (associated_of_dvd_dvd hf2 <| @of_eval₂ G _ F _ _ _ x f this)\n[GOAL]\ncase inl.h\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0\nhf3 : f = minpoly G F x\n⊢ g = 1\n[PROOFSTEP]\nrwa [← mul_one (minpoly G F x), hf3, mul_right_inj' (monic G F x).ne_zero] at hfg \n[GOAL]\ncase inr\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0\n⊢ f = 1 ∨ g = 1\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr.h\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0\n⊢ f = 1\n[PROOFSTEP]\nhave hg3 : g = minpoly G F x :=\n Polynomial.eq_of_monic_of_associated hg (monic G F x) (associated_of_dvd_dvd hg2 <| @of_eval₂ G _ F _ _ _ x g this)\n[GOAL]\ncase inr.h\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\nf g : Polynomial { x // x ∈ subfield G F }\nhf : Polynomial.Monic f\nhg : Polynomial.Monic g\nhfg : f * g = minpoly G F x\nhf2 : f ∣ minpoly G F x\nhg2 : g ∣ minpoly G F x\nthis : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0\nhg3 : g = minpoly G F x\n⊢ f = 1\n[PROOFSTEP]\nrwa [← one_mul (minpoly G F x), hg3, mul_left_inj' (monic G F x).ne_zero] at hfg \n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\n⊢ IsIntegral { x // x ∈ subfield G F } x\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\nval✝ : Fintype G\n⊢ IsIntegral { x // x ∈ subfield G F } x\n[PROOFSTEP]\nexact ⟨minpoly G F x, minpoly.monic G F x, minpoly.eval₂ G F x⟩\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\nx : F\ns : Finset F\nhs : LinearIndependent { x // x ∈ subfield G F } fun i => ↑i\n⊢ card s ≤ Fintype.card G\n[PROOFSTEP]\nsimpa only [rank_fun', Cardinal.mk_coe_finset, Finset.coe_sort_coe, Cardinal.lift_natCast, Cardinal.natCast_le] using\n cardinal_lift_le_rank_of_linearIndependent' (linearIndependent_smul_of_linearIndependent G F hs)\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\n⊢ Polynomial.Splits (RingHom.id F)\n (Polynomial.map (algebraMap { x // x ∈ subfield G F } F) (_root_.minpoly { x // x ∈ subfield G F } x))\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\nval✝ : Fintype G\n⊢ Polynomial.Splits (RingHom.id F)\n (Polynomial.map (algebraMap { x // x ∈ subfield G F } F) (_root_.minpoly { x // x ∈ subfield G F } x))\n[PROOFSTEP]\nrw [← minpoly_eq_minpoly, minpoly, coe_algebraMap, ← Subfield.toSubring_subtype_eq_subtype,\n Polynomial.map_toSubring _ (subfield G F).toSubring, prodXSubSmul]\n[GOAL]\ncase intro\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\nval✝ : Fintype G\n⊢ Polynomial.Splits (RingHom.id F)\n (∏ g : G ⧸ stabilizer G x, (Polynomial.X - ↑Polynomial.C (ofQuotientStabilizer G x g)))\n[PROOFSTEP]\nexact Polynomial.splits_prod _ fun _ _ => Polynomial.splits_X_sub_C _\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\n⊢ Polynomial.Separable (_root_.minpoly { x // x ∈ subfield G F } x)\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\nval✝ : Fintype G\n⊢ Polynomial.Separable (_root_.minpoly { x // x ∈ subfield G F } x)\n[PROOFSTEP]\nerw [← minpoly_eq_minpoly, ← Polynomial.separable_map (FixedPoints.subfield G F).subtype, minpoly,\n Polynomial.map_toSubring _ (subfield G F).toSubring]\n[GOAL]\ncase intro\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nx : F\nval✝ : Fintype G\n⊢ Polynomial.Separable (prodXSubSmul G F x)\n[PROOFSTEP]\nexact Polynomial.separable_prod_X_sub_C_iff.2 (injective_ofQuotientStabilizer G x)\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\n⊢ FiniteDimensional { x // x ∈ subfield G F } F\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ FiniteDimensional { x // x ∈ subfield G F } F\n[PROOFSTEP]\nexact\n IsNoetherian.iff_fg.1 (IsNoetherian.iff_rank_lt_aleph0.2 <| (rank_le_card G F).trans_lt <| Cardinal.nat_lt_aleph0 _)\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\n⊢ finrank { x // x ∈ subfield G F } F ≤ Fintype.card G\n[PROOFSTEP]\nrw [← Cardinal.natCast_le, finrank_eq_rank]\n[GOAL]\nM : Type u\ninst✝⁵ : Monoid M\nG : Type u\ninst✝⁴ : Group G\nF : Type v\ninst✝³ : Field F\ninst✝² : MulSemiringAction M F\ninst✝¹ : MulSemiringAction G F\nm : M\ninst✝ : Fintype G\n⊢ Module.rank { x // x ∈ subfield G F } F ≤ ↑(Fintype.card G)\n[PROOFSTEP]\napply rank_le_card\n[GOAL]\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\n⊢ Function.Bijective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F)\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\nval✝ : Fintype G\n⊢ Function.Bijective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F)\n[PROOFSTEP]\nrw [Fintype.bijective_iff_injective_and_card]\n[GOAL]\ncase intro\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\nval✝ : Fintype G\n⊢ Function.Injective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F) ∧\n Fintype.card G = Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.left\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\nval✝ : Fintype G\n⊢ Function.Injective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F)\n[PROOFSTEP]\nexact MulSemiringAction.toAlgHom_injective _ F\n[GOAL]\ncase intro.right\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\nval✝ : Fintype G\n⊢ Fintype.card G = Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase intro.right.a\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\nval✝ : Fintype G\n⊢ Fintype.card G ≤ Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F)\n[PROOFSTEP]\nexact Fintype.card_le_of_injective _ (MulSemiringAction.toAlgHom_injective _ F)\n[GOAL]\ncase intro.right.a\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\nval✝ : Fintype G\n⊢ Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F) ≤ Fintype.card G\n[PROOFSTEP]\nrw [← finrank_eq_card G F]\n[GOAL]\ncase intro.right.a\nM : Type u\ninst✝⁹ : Monoid M\nG✝ : Type u\ninst✝⁸ : Group G✝\nF✝ : Type v\ninst✝⁷ : Field F✝\ninst✝⁶ : MulSemiringAction M F✝\ninst✝⁵ : MulSemiringAction G✝ F✝\nm : M\nG : Type u\nF : Type v\ninst✝⁴ : Group G\ninst✝³ : Field F\ninst✝² : Finite G\ninst✝¹ : MulSemiringAction G F\ninst✝ : FaithfulSMul G F\nval✝ : Fintype G\n⊢ Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F) ≤ finrank { x // x ∈ subfield G F } F\n[PROOFSTEP]\nexact LE.le.trans_eq (finrank_algHom _ F) (finrank_linear_map' _ _ _)\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Fixed", "llama_tokens": 29522, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430478583168, "lm_q2_score": 0.7401743563075446, "lm_q1q2_score": 0.6151907704480204}} {"text": "[GOAL]\nm n : ℕ\nhne : m ≠ n\n⊢ ↑m ≠ ↑n\n[PROOFSTEP]\nexact_mod_cast hne\n[GOAL]\nx : ℕ\nr : ℝ\n⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊\n[PROOFSTEP]\nrcases le_or_lt 0 r with (hr | hr)\n[GOAL]\ncase inl\nx : ℕ\nr : ℝ\nhr : 0 ≤ r\n⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊\n[PROOFSTEP]\nrw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]\n[GOAL]\ncase inl\nx : ℕ\nr : ℝ\nhr : 0 ≤ r\n⊢ 0 ≤ ↑x + r\n[PROOFSTEP]\nexact add_nonneg (cast_nonneg x) hr\n[GOAL]\ncase inr\nx : ℕ\nr : ℝ\nhr : r < 0\n⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊\n[PROOFSTEP]\nrw [closedBall_eq_empty.2 hr, Icc_eq_empty_of_lt]\n[GOAL]\ncase inr\nx : ℕ\nr : ℝ\nhr : r < 0\n⊢ ⌊↑x + r⌋₊ < ⌈↑x - r⌉₊\n[PROOFSTEP]\ncalc\n ⌊(x : ℝ) + r⌋₊ ≤ ⌊(x : ℝ)⌋₊ := floor_mono <| by linarith\n _ < ⌈↑x - r⌉₊ := by\n rw [floor_coe, Nat.lt_ceil]\n linarith\n[GOAL]\nx : ℕ\nr : ℝ\nhr : r < 0\n⊢ ↑x + r ≤ ↑x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℕ\nr : ℝ\nhr : r < 0\n⊢ ⌊↑x⌋₊ < ⌈↑x - r⌉₊\n[PROOFSTEP]\nrw [floor_coe, Nat.lt_ceil]\n[GOAL]\nx : ℕ\nr : ℝ\nhr : r < 0\n⊢ ↑x < ↑x - r\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℕ\nr : ℝ\n⊢ IsCompact (closedBall x r)\n[PROOFSTEP]\nrw [closedBall_eq_Icc]\n[GOAL]\nx : ℕ\nr : ℝ\n⊢ IsCompact (Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊)\n[PROOFSTEP]\nexact (Set.finite_Icc _ _).isCompact\n[GOAL]\n⊢ NeBot (cocompact ℕ)\n[PROOFSTEP]\nsimp [Filter.atTop_neBot]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.Nat", "llama_tokens": 849, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677583778258, "lm_q2_score": 0.7248702642896702, "lm_q1q2_score": 0.6146666131244537}} {"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns✝ t : Set α\na✝ : α\nm n : ℕ\na : α\ns : Fin n → Set α\n⊢ a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a\n[PROOFSTEP]\ninduction' n with n ih generalizing a\n[GOAL]\ncase zero\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns✝¹ t : Set α\na✝¹ : α\nm n : ℕ\na✝ : α\ns✝ : Fin n → Set α\na : α\ns : Fin Nat.zero → Set α\n⊢ a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a\n[PROOFSTEP]\nsimp_rw [List.ofFn_zero, List.prod_nil, Fin.exists_fin_zero_pi, eq_comm, Set.mem_one]\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns✝¹ t : Set α\na✝¹ : α\nm n✝ : ℕ\na✝ : α\ns✝ : Fin n✝ → Set α\nn : ℕ\nih : ∀ {a : α} {s : Fin n → Set α}, a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a\na : α\ns : Fin (Nat.succ n) → Set α\n⊢ a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a\n[PROOFSTEP]\nsimp_rw [List.ofFn_succ, List.prod_cons, Fin.exists_fin_succ_pi, Fin.cons_zero, Fin.cons_succ, mem_mul, @ih,\n exists_and_left, exists_exists_eq_and, SetCoe.exists, exists_prop]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na✝ : α\nm n : ℕ\nl : List (Set α)\na : α\n⊢ a ∈ List.prod l ↔ ∃ l', List.prod (List.map (fun x => ↑x.snd) l') = a ∧ List.map Sigma.fst l' = l\n[PROOFSTEP]\ninduction' l using List.ofFnRec with n f\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na✝ : α\nm n✝ : ℕ\na : α\nn : ℕ\nf : Fin n → Set α\n⊢ a ∈ List.prod (List.ofFn f) ↔\n ∃ l', List.prod (List.map (fun x => ↑x.snd) l') = a ∧ List.map Sigma.fst l' = List.ofFn f\n[PROOFSTEP]\nsimp only [mem_prod_list_ofFn, List.exists_iff_exists_tuple, List.map_ofFn, Function.comp, List.ofFn_inj',\n Sigma.mk.inj_iff, and_left_comm, exists_and_left, exists_eq_left, heq_eq_eq]\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na✝ : α\nm n✝ : ℕ\na : α\nn : ℕ\nf : Fin n → Set α\n⊢ (∃ f_1, List.prod (List.ofFn fun i => ↑(f_1 i)) = a) ↔\n ∃ x, List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = a ∧ (fun x_1 => (x x_1).fst) = f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na✝ : α\nm n✝ : ℕ\na : α\nn : ℕ\nf : Fin n → Set α\n⊢ (∃ f_1, List.prod (List.ofFn fun i => ↑(f_1 i)) = a) →\n ∃ x, List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = a ∧ (fun x_1 => (x x_1).fst) = f\n[PROOFSTEP]\nrintro ⟨fi, rfl⟩\n[GOAL]\ncase h.mp.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ n : ℕ\nf : Fin n → Set α\nfi : (i : Fin n) → ↑(f i)\n⊢ ∃ x,\n List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = List.prod (List.ofFn fun i => ↑(fi i)) ∧\n (fun x_1 => (x x_1).fst) = f\n[PROOFSTEP]\nexact ⟨fun i ↦ ⟨_, fi i⟩, rfl, rfl⟩\n[GOAL]\ncase h.mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na✝ : α\nm n✝ : ℕ\na : α\nn : ℕ\nf : Fin n → Set α\n⊢ (∃ x, List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = a ∧ (fun x_1 => (x x_1).fst) = f) →\n ∃ f_1, List.prod (List.ofFn fun i => ↑(f_1 i)) = a\n[PROOFSTEP]\nrintro ⟨fi, rfl, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ n : ℕ\nfi : Fin n → (s : Set α) × ↑s\n⊢ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = List.prod (List.ofFn fun x => ↑(fi x).snd)\n[PROOFSTEP]\nexact ⟨fun i ↦ _, rfl⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na✝ : α\nm n✝ : ℕ\na : α\nn : ℕ\n⊢ a ∈ s ^ n ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a\n[PROOFSTEP]\nrw [← mem_prod_list_ofFn, List.ofFn_const, List.prod_replicate]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Pointwise.ListOfFn", "llama_tokens": 2030, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104789178257654, "lm_q2_score": 0.7577943767446202, "lm_q1q2_score": 0.6141763663984302}} {"text": "[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\n⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nhave hp₀' : 0 < 1 / p := by positivity\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\n⊢ 0 < 1 / p\n[PROOFSTEP]\npositivity\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\n⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nhave hp₁' : 1 < 1 / p := by rw [one_lt_div hp₀]; exact hp₁\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\n⊢ 1 < 1 / p\n[PROOFSTEP]\nrw [one_lt_div hp₀]\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\n⊢ p < 1\n[PROOFSTEP]\nexact hp₁\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\n⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nlet f := NNReal.orderIsoRpow (1 / p) hp₀'\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\n⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nhave h₁ : StrictConvexOn ℝ≥0 univ f :=\n by\n refine ⟨convex_univ, fun x _ y _ hxy a b ha hb hab => ?_⟩\n exact\n (strictConvexOn_rpow hp₁').2 (by positivity : 0 ≤ x) (by positivity : 0 ≤ y) (by simp [hxy]) ha hb\n (by simp; norm_cast)\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\n⊢ StrictConvexOn ℝ≥0 univ ↑f\n[PROOFSTEP]\nrefine ⟨convex_univ, fun x _ y _ hxy a b ha hb hab => ?_⟩\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ ↑f (a • x + b • y) < a • ↑f x + b • ↑f y\n[PROOFSTEP]\nexact\n (strictConvexOn_rpow hp₁').2 (by positivity : 0 ≤ x) (by positivity : 0 ≤ y) (by simp [hxy]) ha hb\n (by simp; norm_cast)\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ 0 ≤ x\n[PROOFSTEP]\npositivity\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ 0 ≤ y\n[PROOFSTEP]\npositivity\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ (fun a => ↑a) x ≠ (fun a => ↑a) y\n[PROOFSTEP]\nsimp [hxy]\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ ↑(↑(RingHom.id ℝ≥0) a) + ↑(↑(RingHom.id ℝ≥0) b) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ ↑a + ↑b = 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nh₁ : StrictConvexOn ℝ≥0 univ ↑f\n⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nhave h₂ : ∀ x, f.symm x = x ^ p := by simp [NNReal.orderIsoRpow_symm_eq]\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nh₁ : StrictConvexOn ℝ≥0 univ ↑f\n⊢ ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p\n[PROOFSTEP]\nsimp [NNReal.orderIsoRpow_symm_eq]\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nh₁ : StrictConvexOn ℝ≥0 univ ↑f\nh₂ : ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p\n⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nrefine ⟨convex_univ, fun x _ y _ hxy a b ha hb hab => ?_⟩\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nh₁ : StrictConvexOn ℝ≥0 univ ↑f\nh₂ : ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nsimp only [← h₂]\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nhp₀' : 0 < 1 / p\nhp₁' : 1 < 1 / p\nf : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'\nh₁ : StrictConvexOn ℝ≥0 univ ↑f\nh₂ : ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p\nx : ℝ≥0\nx✝¹ : x ∈ univ\ny : ℝ≥0\nx✝ : y ∈ univ\nhxy : x ≠ y\na b : ℝ≥0\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • ↑(OrderIso.symm (orderIsoRpow (1 / p) hp₀')) x + b • ↑(OrderIso.symm (orderIsoRpow (1 / p) hp₀')) y <\n ↑(OrderIso.symm (orderIsoRpow (1 / p) hp₀')) (a • x + b • y)\n[PROOFSTEP]\nexact (f.strictConcaveOn_symm h₁).2 (Set.mem_univ x) (Set.mem_univ y) hxy ha hb hab\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\ncase neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : ¬p = 0 ⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nexact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\nx✝⁷ : ℝ≥0\nx✝⁶ : x✝⁷ ∈ univ\nx✝⁵ : ℝ≥0\nx✝⁴ : x✝⁵ ∈ univ\nx✝³ x✝² : ℝ≥0\nx✝¹ : 0 ≤ x✝³\nx✝ : 0 ≤ x✝²\nhab : x✝³ + x✝² = 1\n⊢ x✝³ • (fun x => x ^ p) x✝⁷ + x✝² • (fun x => x ^ p) x✝⁵ ≤ (fun x => x ^ p) (x✝³ • x✝⁷ + x✝² • x✝⁵)\n[PROOFSTEP]\nsimp [hp, hab]\n[GOAL]\ncase neg\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : ¬p = 0\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp \n by_cases hp' : p = 1\n case pos => exact ⟨convex_univ, by simp [hp']⟩\n case neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : ¬p = 0\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp \n by_cases hp' : p = 1\n case pos => exact ⟨convex_univ, by simp [hp']⟩\n case neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : ¬p = 0\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\npush_neg at hp \n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nby_cases hp' : p = 1\n[GOAL]\ncase pos\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\ncase neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : p ≠ 0 hp' : ¬p = 1 ⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_univ, by simp [hp']⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_univ, by simp [hp']⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nexact ⟨convex_univ, by simp [hp']⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ∀ ⦃x : ℝ≥0⦄,\n x ∈ univ →\n ∀ ⦃y : ℝ≥0⦄,\n y ∈ univ →\n ∀ ⦃a b : ℝ≥0⦄,\n 0 ≤ a →\n 0 ≤ b → a + b = 1 → a • (fun x => x ^ p) x + b • (fun x => x ^ p) y ≤ (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nsimp [hp']\n[GOAL]\ncase neg\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : ¬p = 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : ¬p = 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : ¬p = 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\npush_neg at hp' \n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p ≠ 1\n⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p\n[PROOFSTEP]\nexact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p ≠ 1\n⊢ 0 < p\n[PROOFSTEP]\npositivity\n[GOAL]\n⊢ StrictConcaveOn ℝ≥0 univ ↑sqrt\n[PROOFSTEP]\nhave : NNReal.sqrt = fun (x : ℝ≥0) ↦ x ^ (1 / (2 : ℝ)) := by ext x; exact_mod_cast NNReal.sqrt_eq_rpow x\n[GOAL]\n⊢ ↑sqrt = fun x => x ^ (1 / 2)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.a\nx : ℝ≥0\n⊢ ↑(↑sqrt x) = ↑(x ^ (1 / 2))\n[PROOFSTEP]\nexact_mod_cast NNReal.sqrt_eq_rpow x\n[GOAL]\nthis : ↑sqrt = fun x => x ^ (1 / 2)\n⊢ StrictConcaveOn ℝ≥0 univ ↑sqrt\n[PROOFSTEP]\nrw [this]\n[GOAL]\nthis : ↑sqrt = fun x => x ^ (1 / 2)\n⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ (1 / 2)\n[PROOFSTEP]\nexact strictConcaveOn_rpow (by positivity) (by linarith)\n[GOAL]\nthis : ↑sqrt = fun x => x ^ (1 / 2)\n⊢ 0 < 1 / 2\n[PROOFSTEP]\npositivity\n[GOAL]\nthis : ↑sqrt = fun x => x ^ (1 / 2)\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nlinarith\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\n⊢ StrictConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nrefine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nlet x' : ℝ≥0 := ⟨x, hx⟩\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nlet y' : ℝ≥0 := ⟨y, hy⟩\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nlet a' : ℝ≥0 := ⟨a, by positivity⟩\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\n⊢ 0 ≤ a\n[PROOFSTEP]\npositivity\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nlet b' : ℝ≥0 := ⟨b, by positivity⟩\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\n⊢ 0 ≤ b\n[PROOFSTEP]\npositivity\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nhave hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nhave hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nhave hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\nhxy' : x' ≠ y'\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nhave hab' : a' + b' = 1 := by ext; simp [hab]\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\nhxy' : x' ≠ y'\n⊢ a' + b' = 1\n[PROOFSTEP]\next\n[GOAL]\ncase a\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\nhxy' : x' ≠ y'\n⊢ ↑(a' + b') = ↑1\n[PROOFSTEP]\nsimp [hab]\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\nhxy' : x' ≠ y'\nhab' : a' + b' = 1\n⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nrw [hx', hy']\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\nhxy' : x' ≠ y'\nhab' : a' + b' = 1\n⊢ a • ↑((fun z => z ^ p) x') + b • ↑((fun z => z ^ p) y') < (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nexact\n (NNReal.strictConcaveOn_rpow hp₀ hp₁).2 (Set.mem_univ x') (Set.mem_univ y') hxy' (by exact_mod_cast ha)\n (by exact_mod_cast hb) hab'\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\nhxy' : x' ≠ y'\nhab' : a' + b' = 1\n⊢ 0 < a'\n[PROOFSTEP]\nexact_mod_cast ha\n[GOAL]\np : ℝ\nhp₀ : 0 < p\nhp₁ : p < 1\nx : ℝ\nhx : x ∈ Ici 0\ny : ℝ\nhy : y ∈ Ici 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nx' : ℝ≥0 := { val := x, property := hx }\ny' : ℝ≥0 := { val := y, property := hy }\na' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }\nb' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }\nhx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')\nhy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')\nhxy' : x' ≠ y'\nhab' : a' + b' = 1\n⊢ 0 < b'\n[PROOFSTEP]\nexact_mod_cast hb\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\ncase neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : ¬p = 0 ⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nexact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p = 0\nx✝⁷ : ℝ\nx✝⁶ : x✝⁷ ∈ Ici 0\nx✝⁵ : ℝ\nx✝⁴ : x✝⁵ ∈ Ici 0\nx✝³ x✝² : ℝ\nx✝¹ : 0 ≤ x✝³\nx✝ : 0 ≤ x✝²\nhab : x✝³ + x✝² = 1\n⊢ x✝³ • (fun x => x ^ p) x✝⁷ + x✝² • (fun x => x ^ p) x✝⁵ ≤ (fun x => x ^ p) (x✝³ • x✝⁷ + x✝² • x✝⁵)\n[PROOFSTEP]\nsimp [hp, hab]\n[GOAL]\ncase neg\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : ¬p = 0\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp \n by_cases hp' : p = 1\n case pos => exact ⟨convex_Ici 0, by simp [hp']⟩\n case neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : ¬p = 0\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp \n by_cases hp' : p = 1\n case pos => exact ⟨convex_Ici 0, by simp [hp']⟩\n case neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : ¬p = 0\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\npush_neg at hp \n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nby_cases hp' : p = 1\n[GOAL]\ncase pos\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\ncase neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : p ≠ 0 hp' : ¬p = 1 ⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_Ici 0, by simp [hp']⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase pos => exact ⟨convex_Ici 0, by simp [hp']⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nexact ⟨convex_Ici 0, by simp [hp']⟩\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p = 1\n⊢ ∀ ⦃x : ℝ⦄,\n x ∈ Ici 0 →\n ∀ ⦃y : ℝ⦄,\n y ∈ Ici 0 →\n ∀ ⦃a b : ℝ⦄,\n 0 ≤ a →\n 0 ≤ b → a + b = 1 → a • (fun x => x ^ p) x + b • (fun x => x ^ p) y ≤ (fun x => x ^ p) (a • x + b • y)\n[PROOFSTEP]\nsimp [hp']\n[GOAL]\ncase neg\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : ¬p = 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : ¬p = 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\ncase neg =>\n push_neg at hp' \n exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : ¬p = 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\npush_neg at hp' \n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p ≠ 1\n⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nexact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn\n[GOAL]\np : ℝ\nhp₀ : 0 ≤ p\nhp₁ : p ≤ 1\nhp : p ≠ 0\nhp' : p ≠ 1\n⊢ 0 < p\n[PROOFSTEP]\npositivity\n[GOAL]\n⊢ StrictConcaveOn ℝ (Ici 0) sqrt\n[PROOFSTEP]\nhave : Real.sqrt = fun (x : ℝ) ↦ x ^ (1 / (2 : ℝ)) := by ext x; exact Real.sqrt_eq_rpow x\n[GOAL]\n⊢ sqrt = fun x => x ^ (1 / 2)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nx : ℝ\n⊢ sqrt x = x ^ (1 / 2)\n[PROOFSTEP]\nexact Real.sqrt_eq_rpow x\n[GOAL]\nthis : sqrt = fun x => x ^ (1 / 2)\n⊢ StrictConcaveOn ℝ (Ici 0) sqrt\n[PROOFSTEP]\nrw [this]\n[GOAL]\nthis : sqrt = fun x => x ^ (1 / 2)\n⊢ StrictConcaveOn ℝ (Ici 0) fun x => x ^ (1 / 2)\n[PROOFSTEP]\nexact strictConcaveOn_rpow (by positivity) (by linarith)\n[GOAL]\nthis : sqrt = fun x => x ^ (1 / 2)\n⊢ 0 < 1 / 2\n[PROOFSTEP]\npositivity\n[GOAL]\nthis : sqrt = fun x => x ^ (1 / 2)\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nlinarith\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.SpecificFunctions.Pow", "llama_tokens": 12248, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8991213772699436, "lm_q2_score": 0.6825737408694988, "lm_q1q2_score": 0.6137166419788813}} {"text": "[GOAL]\nX : Type ?u.7\ninst✝² : TopologicalSpace X\ns : Set X\ninst✝¹ : T0Space ↑s\ninst✝ : SecondCountableTopology ↑s\n⊢ HasCountableSeparatingOn X IsOpen s\n[PROOFSTEP]\nsuffices HasCountableSeparatingOn s IsOpen univ from .of_subtype fun _ ↦ isOpen_induced_iff.1\n[GOAL]\nX : Type ?u.7\ninst✝² : TopologicalSpace X\ns : Set X\ninst✝¹ : T0Space ↑s\ninst✝ : SecondCountableTopology ↑s\n⊢ HasCountableSeparatingOn (↑s) IsOpen univ\n[PROOFSTEP]\nrefine ⟨⟨countableBasis s, countable_countableBasis _, fun _ ↦ isOpen_of_mem_countableBasis, fun x _ y _ h ↦ ?_⟩⟩\n[GOAL]\nX : Type ?u.7\ninst✝² : TopologicalSpace X\ns : Set X\ninst✝¹ : T0Space ↑s\ninst✝ : SecondCountableTopology ↑s\nx : ↑s\nx✝¹ : x ∈ univ\ny : ↑s\nx✝ : y ∈ univ\nh : ∀ (s_1 : Set ↑s), s_1 ∈ countableBasis ↑s → (x ∈ s_1 ↔ y ∈ s_1)\n⊢ x = y\n[PROOFSTEP]\nexact ((isBasis_countableBasis _).inseparable_iff.2 h).eq\n", "meta": {"mathlib_filename": "Mathlib.Topology.CountableSeparatingOn", "llama_tokens": 416, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8615382236515258, "lm_q2_score": 0.7122321964553657, "lm_q1q2_score": 0.6136152613615803}} {"text": "[GOAL]\nm k : ℕ\n⊢ shiftl m (k + 1) = m * 2 ^ (k + 1)\n[PROOFSTEP]\nshow bit0 (shiftl m k) = m * (2 ^ k * 2)\n[GOAL]\nm k : ℕ\n⊢ bit0 (shiftl m k) = m * (2 ^ k * 2)\n[PROOFSTEP]\nrw [bit0_val, shiftl_eq_mul_pow m k, mul_comm 2, mul_assoc]\n[GOAL]\nm : ℕ\n⊢ shiftl' true m 0 + 1 = (m + 1) * 2 ^ 0\n[PROOFSTEP]\nsimp [shiftl, shiftl', pow_zero, Nat.one_mul]\n[GOAL]\nm k : ℕ\n⊢ shiftl' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)\n[PROOFSTEP]\nchange bit1 (shiftl' true m k) + 1 = (m + 1) * (2 ^ k * 2)\n[GOAL]\nm k : ℕ\n⊢ bit1 (shiftl' true m k) + 1 = (m + 1) * (2 ^ k * 2)\n[PROOFSTEP]\nrw [bit1_val]\n[GOAL]\nm k : ℕ\n⊢ 2 * shiftl' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)\n[PROOFSTEP]\nchange 2 * (shiftl' true m k + 1) = _\n[GOAL]\nm k : ℕ\n⊢ 2 * (shiftl' true m k + 1) = (m + 1) * (2 ^ k * 2)\n[PROOFSTEP]\nrw [shiftl'_tt_eq_mul_pow m k, mul_left_comm, mul_comm 2]\n[GOAL]\nm k : ℕ\n⊢ div2 (m / 2 ^ k) = m / 2 ^ (k + 1)\n[PROOFSTEP]\nrw [div2_val, Nat.div_div_eq_div_mul, Nat.pow_succ]\n[GOAL]\nb : Bool\nm : ℕ\nh : m ≠ 0\nn : ℕ\n⊢ shiftl' b m n ≠ 0\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nb : Bool\nm : ℕ\nh : m ≠ 0\n⊢ shiftl' b m zero ≠ 0\n[PROOFSTEP]\nsimp [bit_ne_zero, shiftl', *]\n[GOAL]\ncase succ\nb : Bool\nm : ℕ\nh : m ≠ 0\nn✝ : ℕ\nn_ih✝ : shiftl' b m n✝ ≠ 0\n⊢ shiftl' b m (succ n✝) ≠ 0\n[PROOFSTEP]\nsimp [bit_ne_zero, shiftl', *]\n[GOAL]\n⊢ size 0 = 0\n[PROOFSTEP]\nsimp [size]\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n⊢ size (bit b n) = succ (size n)\n[PROOFSTEP]\nrw [size]\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n⊢ binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)\n[PROOFSTEP]\nconv =>\n lhs\n rw [binaryRec]\n simp [h]\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n| binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)\n[PROOFSTEP]\n lhs\n rw [binaryRec]\n simp [h]\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n| binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)\n[PROOFSTEP]\n lhs\n rw [binaryRec]\n simp [h]\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n| binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)\n[PROOFSTEP]\nlhs\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n| binaryRec 0 (fun x x => succ) (bit b n)\n[PROOFSTEP]\nrw [binaryRec]\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n| if n0 : bit b n = 0 then Eq.mpr (_ : ℕ = ℕ) 0\n else\n let n' := div2 (bit b n);\n let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n Eq.mpr (_ : ℕ = ℕ) (succ (binaryRec 0 (fun x x => succ) n'))\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nb : Bool\nn : ℕ\nh : bit b n ≠ 0\n⊢ succ (binaryRec 0 (fun x x => succ) (div2 (bit b n))) = succ (binaryRec 0 (fun x x => succ) n)\n[PROOFSTEP]\nrw [div2_bit]\n[GOAL]\n⊢ size (bit1 0) = 1\n[PROOFSTEP]\nrw [size_bit1, size_zero]\n[GOAL]\nb : Bool\nm n : ℕ\nh : shiftl' b m n ≠ 0\n⊢ size (shiftl' b m n) = size m + n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nb : Bool\nm n : ℕ\nh✝ : shiftl' b m n ≠ 0\nh : shiftl' b m zero ≠ 0\n⊢ size (shiftl' b m zero) = size m + zero\n[PROOFSTEP]\nsimp [shiftl'] at h ⊢\n[GOAL]\ncase succ\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : shiftl' b m (succ n) ≠ 0\n⊢ size (shiftl' b m (succ n)) = size m + succ n\n[PROOFSTEP]\nsimp [shiftl'] at h ⊢\n[GOAL]\ncase succ\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : ¬bit b (shiftl' b m n) = 0\n⊢ size (bit b (shiftl' b m n)) = size m + succ n\n[PROOFSTEP]\nrw [size_bit h, Nat.add_succ]\n[GOAL]\ncase succ\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : ¬bit b (shiftl' b m n) = 0\n⊢ succ (size (shiftl' b m n)) = succ (size m + n)\n[PROOFSTEP]\nby_cases s0 : shiftl' b m n = 0 <;> [skip; rw [IH s0]]\n[GOAL]\ncase succ\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : ¬bit b (shiftl' b m n) = 0\n⊢ succ (size (shiftl' b m n)) = succ (size m + n)\n[PROOFSTEP]\nby_cases s0 : shiftl' b m n = 0\n[GOAL]\ncase pos\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : ¬bit b (shiftl' b m n) = 0\ns0 : shiftl' b m n = 0\n⊢ succ (size (shiftl' b m n)) = succ (size m + n)\n[PROOFSTEP]\nskip\n[GOAL]\ncase neg\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : ¬bit b (shiftl' b m n) = 0\ns0 : ¬shiftl' b m n = 0\n⊢ succ (size (shiftl' b m n)) = succ (size m + n)\n[PROOFSTEP]\nrw [IH s0]\n[GOAL]\ncase pos\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : ¬bit b (shiftl' b m n) = 0\ns0 : shiftl' b m n = 0\n⊢ succ (size (shiftl' b m n)) = succ (size m + n)\n[PROOFSTEP]\nrw [s0] at h ⊢\n[GOAL]\ncase pos\nb : Bool\nm n✝ : ℕ\nh✝ : shiftl' b m n✝ ≠ 0\nn : ℕ\nIH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n\nh : ¬bit b 0 = 0\ns0 : shiftl' b m n = 0\n⊢ succ (size 0) = succ (size m + n)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase pos.false\nm n✝ n : ℕ\nh✝ : shiftl' false m n✝ ≠ 0\nIH : shiftl' false m n ≠ 0 → size (shiftl' false m n) = size m + n\nh : ¬bit false 0 = 0\ns0 : shiftl' false m n = 0\n⊢ succ (size 0) = succ (size m + n)\n[PROOFSTEP]\nexact absurd rfl h\n[GOAL]\ncase pos.true\nm n✝ n : ℕ\nh✝ : shiftl' true m n✝ ≠ 0\nIH : shiftl' true m n ≠ 0 → size (shiftl' true m n) = size m + n\nh : ¬bit true 0 = 0\ns0 : shiftl' true m n = 0\n⊢ succ (size 0) = succ (size m + n)\n[PROOFSTEP]\nhave : shiftl' true m n + 1 = 1 := congr_arg (· + 1) s0\n[GOAL]\ncase pos.true\nm n✝ n : ℕ\nh✝ : shiftl' true m n✝ ≠ 0\nIH : shiftl' true m n ≠ 0 → size (shiftl' true m n) = size m + n\nh : ¬bit true 0 = 0\ns0 : shiftl' true m n = 0\nthis : shiftl' true m n + 1 = 1\n⊢ succ (size 0) = succ (size m + n)\n[PROOFSTEP]\nrw [shiftl'_tt_eq_mul_pow] at this \n[GOAL]\ncase pos.true\nm n✝ n : ℕ\nh✝ : shiftl' true m n✝ ≠ 0\nIH : shiftl' true m n ≠ 0 → size (shiftl' true m n) = size m + n\nh : ¬bit true 0 = 0\ns0 : shiftl' true m n = 0\nthis : (m + 1) * 2 ^ n = 1\n⊢ succ (size 0) = succ (size m + n)\n[PROOFSTEP]\nobtain rfl := succ.inj (eq_one_of_dvd_one ⟨_, this.symm⟩)\n[GOAL]\ncase pos.true\nn✝ n : ℕ\nh✝ : ¬bit true 0 = 0\nh : shiftl' true 0 n✝ ≠ 0\nIH : shiftl' true 0 n ≠ 0 → size (shiftl' true 0 n) = size 0 + n\ns0 : shiftl' true 0 n = 0\nthis : (0 + 1) * 2 ^ n = 1\n⊢ succ (size 0) = succ (size 0 + n)\n[PROOFSTEP]\nsimp only [zero_add, one_mul] at this \n[GOAL]\ncase pos.true\nn✝ n : ℕ\nh✝ : ¬bit true 0 = 0\nh : shiftl' true 0 n✝ ≠ 0\nIH : shiftl' true 0 n ≠ 0 → size (shiftl' true 0 n) = size 0 + n\ns0 : shiftl' true 0 n = 0\nthis : 2 ^ n = 1\n⊢ succ (size 0) = succ (size 0 + n)\n[PROOFSTEP]\nobtain rfl : n = 0 :=\n Nat.eq_zero_of_le_zero (le_of_not_gt fun hn => ne_of_gt (pow_lt_pow_of_lt_right (by decide) hn) this)\n[GOAL]\nn✝ n : ℕ\nh✝ : ¬bit true 0 = 0\nh : shiftl' true 0 n✝ ≠ 0\nIH : shiftl' true 0 n ≠ 0 → size (shiftl' true 0 n) = size 0 + n\ns0 : shiftl' true 0 n = 0\nthis : 2 ^ n = 1\nhn : n > 0\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.true\nn : ℕ\nh✝ : ¬bit true 0 = 0\nh : shiftl' true 0 n ≠ 0\nIH : shiftl' true 0 0 ≠ 0 → size (shiftl' true 0 0) = size 0 + 0\ns0 : shiftl' true 0 0 = 0\nthis : 2 ^ 0 = 1\n⊢ succ (size 0) = succ (size 0 + 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ n < 2 ^ size n\n[PROOFSTEP]\nrw [← one_shiftl]\n[GOAL]\nn : ℕ\n⊢ n < shiftl 1 (size n)\n[PROOFSTEP]\nhave : ∀ {n}, n = 0 → n < shiftl 1 (size n) := by simp\n[GOAL]\nn : ℕ\n⊢ ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nthis : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\n⊢ n < shiftl 1 (size n)\n[PROOFSTEP]\napply binaryRec _ _ n\n[GOAL]\nn : ℕ\nthis : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\n⊢ 0 < shiftl 1 (size 0)\n[PROOFSTEP]\napply this rfl\n[GOAL]\nn : ℕ\nthis : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\n⊢ ∀ (b : Bool) (n : ℕ), n < shiftl 1 (size n) → bit b n < shiftl 1 (size (bit b n))\n[PROOFSTEP]\nintro b n IH\n[GOAL]\nn✝ : ℕ\nthis : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\nb : Bool\nn : ℕ\nIH : n < shiftl 1 (size n)\n⊢ bit b n < shiftl 1 (size (bit b n))\n[PROOFSTEP]\nby_cases h : bit b n = 0\n[GOAL]\ncase pos\nn✝ : ℕ\nthis : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\nb : Bool\nn : ℕ\nIH : n < shiftl 1 (size n)\nh : bit b n = 0\n⊢ bit b n < shiftl 1 (size (bit b n))\n[PROOFSTEP]\napply this h\n[GOAL]\ncase neg\nn✝ : ℕ\nthis : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\nb : Bool\nn : ℕ\nIH : n < shiftl 1 (size n)\nh : ¬bit b n = 0\n⊢ bit b n < shiftl 1 (size (bit b n))\n[PROOFSTEP]\nrw [size_bit h, shiftl_succ]\n[GOAL]\ncase neg\nn✝ : ℕ\nthis : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)\nb : Bool\nn : ℕ\nIH : n < shiftl 1 (size n)\nh : ¬bit b n = 0\n⊢ bit b n < bit0 (shiftl 1 (size n))\n[PROOFSTEP]\nexact bit_lt_bit0 _ IH\n[GOAL]\nm n : ℕ\nh : size m ≤ n\n⊢ 2 > 0\n[PROOFSTEP]\ndecide\n[GOAL]\nm n : ℕ\n⊢ m < 2 ^ n → size m ≤ n\n[PROOFSTEP]\nrw [← one_shiftl]\n[GOAL]\nm n : ℕ\n⊢ m < shiftl 1 n → size m ≤ n\n[PROOFSTEP]\nrevert n\n[GOAL]\nm : ℕ\n⊢ ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\n[PROOFSTEP]\napply binaryRec _ _ m\n[GOAL]\nm : ℕ\n⊢ ∀ {n : ℕ}, 0 < shiftl 1 n → size 0 ≤ n\n[PROOFSTEP]\nintro n\n[GOAL]\nm n : ℕ\n⊢ 0 < shiftl 1 n → size 0 ≤ n\n[PROOFSTEP]\nsimp\n[GOAL]\nm : ℕ\n⊢ ∀ (b : Bool) (n : ℕ),\n (∀ {n_1 : ℕ}, n < shiftl 1 n_1 → size n ≤ n_1) → ∀ {n_1 : ℕ}, bit b n < shiftl 1 n_1 → size (bit b n) ≤ n_1\n[PROOFSTEP]\nintro b m IH n h\n[GOAL]\nm✝ : ℕ\nb : Bool\nm : ℕ\nIH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\nn : ℕ\nh : bit b m < shiftl 1 n\n⊢ size (bit b m) ≤ n\n[PROOFSTEP]\nby_cases e : bit b m = 0\n[GOAL]\ncase pos\nm✝ : ℕ\nb : Bool\nm : ℕ\nIH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\nn : ℕ\nh : bit b m < shiftl 1 n\ne : bit b m = 0\n⊢ size (bit b m) ≤ n\n[PROOFSTEP]\nsimp [e]\n[GOAL]\ncase neg\nm✝ : ℕ\nb : Bool\nm : ℕ\nIH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\nn : ℕ\nh : bit b m < shiftl 1 n\ne : ¬bit b m = 0\n⊢ size (bit b m) ≤ n\n[PROOFSTEP]\nrw [size_bit e]\n[GOAL]\ncase neg\nm✝ : ℕ\nb : Bool\nm : ℕ\nIH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\nn : ℕ\nh : bit b m < shiftl 1 n\ne : ¬bit b m = 0\n⊢ succ (size m) ≤ n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase neg.zero\nm✝ : ℕ\nb : Bool\nm : ℕ\nIH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\ne : ¬bit b m = 0\nh : bit b m < shiftl 1 zero\n⊢ succ (size m) ≤ zero\n[PROOFSTEP]\nexact e.elim (Nat.eq_zero_of_le_zero (le_of_lt_succ h))\n[GOAL]\ncase neg.succ\nm✝ : ℕ\nb : Bool\nm : ℕ\nIH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\ne : ¬bit b m = 0\nn : ℕ\nh : bit b m < shiftl 1 (succ n)\n⊢ succ (size m) ≤ succ n\n[PROOFSTEP]\napply succ_le_succ (IH _)\n[GOAL]\nm✝ : ℕ\nb : Bool\nm : ℕ\nIH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n\ne : ¬bit b m = 0\nn : ℕ\nh : bit b m < shiftl 1 (succ n)\n⊢ m < shiftl 1 n\n[PROOFSTEP]\napply lt_imp_lt_of_le_imp_le (fun h' => bit0_le_bit _ h') h\n[GOAL]\nm n : ℕ\n⊢ m < size n ↔ 2 ^ m ≤ n\n[PROOFSTEP]\nrw [← not_lt, Decidable.iff_not_comm, not_lt, size_le]\n[GOAL]\nn : ℕ\n⊢ 0 < size n ↔ 0 < n\n[PROOFSTEP]\nrw [lt_size]\n[GOAL]\nn : ℕ\n⊢ 2 ^ 0 ≤ n ↔ 0 < n\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ size n = 0 ↔ n = 0\n[PROOFSTEP]\nhave := @size_pos n\n[GOAL]\nn : ℕ\nthis : 0 < size n ↔ 0 < n\n⊢ size n = 0 ↔ n = 0\n[PROOFSTEP]\nsimp [pos_iff_ne_zero] at this \n[GOAL]\nn : ℕ\nthis : ¬size n = 0 ↔ ¬n = 0\n⊢ size n = 0 ↔ n = 0\n[PROOFSTEP]\nexact Decidable.not_iff_not.1 this\n[GOAL]\nn : ℕ\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\n⊢ List.length (bits n) = size n\n[PROOFSTEP]\ninduction' n using Nat.binaryRec' with b n h ih\n[GOAL]\ncase z\n⊢ List.length (bits 0) = size 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase f\nb : Bool\nn : ℕ\nh : n = 0 → b = true\nih : List.length (bits n) = size n\n⊢ List.length (bits (bit b n)) = size (bit b n)\n[PROOFSTEP]\nrw [size_bit, bits_append_bit _ _ h]\n[GOAL]\ncase f\nb : Bool\nn : ℕ\nh : n = 0 → b = true\nih : List.length (bits n) = size n\n⊢ List.length (b :: bits n) = succ (size n)\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\ncase f\nb : Bool\nn : ℕ\nh : n = 0 → b = true\nih : List.length (bits n) = size n\n⊢ bit b n ≠ 0\n[PROOFSTEP]\nsimpa [bit_eq_zero_iff]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Size", "llama_tokens": 6371, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.877476793890012, "lm_q2_score": 0.6992544273261175, "lm_q1q2_score": 0.613579533003518}} {"text": "[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nm : MeasurableSpace α\ninst✝² : MeasurableSpace E\ninst✝¹ : OpensMeasurableSpace E\ninst✝ : TopologicalSpace.SecondCountableTopology E\nμ : MeasureTheory.Measure α\nf g : α → E\nhf : AEMeasurable f\nhg : AEMeasurable g\n⊢ AEMeasurable fun x => Inner.inner (f x) (g x)\n[PROOFSTEP]\nrefine' ⟨fun x => ⟪hf.mk f x, hg.mk g x⟫, hf.measurable_mk.inner hg.measurable_mk, _⟩\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nm : MeasurableSpace α\ninst✝² : MeasurableSpace E\ninst✝¹ : OpensMeasurableSpace E\ninst✝ : TopologicalSpace.SecondCountableTopology E\nμ : MeasureTheory.Measure α\nf g : α → E\nhf : AEMeasurable f\nhg : AEMeasurable g\n⊢ (fun x => Inner.inner (f x) (g x)) =ᶠ[MeasureTheory.Measure.ae μ] fun x => Inner.inner (mk f hf x) (mk g hg x)\n[PROOFSTEP]\nrefine' hf.ae_eq_mk.mp (hg.ae_eq_mk.mono fun x hxg hxf => _)\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nm : MeasurableSpace α\ninst✝² : MeasurableSpace E\ninst✝¹ : OpensMeasurableSpace E\ninst✝ : TopologicalSpace.SecondCountableTopology E\nμ : MeasureTheory.Measure α\nf g : α → E\nhf : AEMeasurable f\nhg : AEMeasurable g\nx : α\nhxg : g x = mk g hg x\nhxf : f x = mk f hf x\n⊢ (fun x => Inner.inner (f x) (g x)) x = (fun x => Inner.inner (mk f hf x) (mk g hg x)) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nm : MeasurableSpace α\ninst✝² : MeasurableSpace E\ninst✝¹ : OpensMeasurableSpace E\ninst✝ : TopologicalSpace.SecondCountableTopology E\nμ : MeasureTheory.Measure α\nf g : α → E\nhf : AEMeasurable f\nhg : AEMeasurable g\nx : α\nhxg : g x = mk g hg x\nhxf : f x = mk f hf x\n⊢ Inner.inner (f x) (g x) = Inner.inner (mk f hf x) (mk g hg x)\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.SpecialFunctions.Inner", "llama_tokens": 938, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.7662936430859597, "lm_q1q2_score": 0.6135651912758998}} {"text": "[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o x (x + y) = ↑(Real.arccos (‖x‖ / ‖x + y‖))\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ oangle o x (x + y) = ↑(Real.arccos (‖x‖ / ‖x + y‖))\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs,\n InnerProductGeometry.angle_add_eq_arccos_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o (x + y) y = ↑(Real.arccos (‖y‖ / ‖x + y‖))\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) y (x + y) = ↑(Real.arccos (‖y‖ / ‖x + y‖))\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) y (y + x) = ↑(Real.arccos (‖y‖ / ‖y + x‖))\n[PROOFSTEP]\nexact (-o).oangle_add_right_eq_arccos_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o x (x + y) = ↑(Real.arcsin (‖y‖ / ‖x + y‖))\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ oangle o x (x + y) = ↑(Real.arcsin (‖y‖ / ‖x + y‖))\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs,\n InnerProductGeometry.angle_add_eq_arcsin_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.left_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o (x + y) y = ↑(Real.arcsin (‖x‖ / ‖x + y‖))\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) y (x + y) = ↑(Real.arcsin (‖x‖ / ‖x + y‖))\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) y (y + x) = ↑(Real.arcsin (‖x‖ / ‖y + x‖))\n[PROOFSTEP]\nexact (-o).oangle_add_right_eq_arcsin_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o x (x + y) = ↑(Real.arctan (‖y‖ / ‖x‖))\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ oangle o x (x + y) = ↑(Real.arctan (‖y‖ / ‖x‖))\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs,\n InnerProductGeometry.angle_add_eq_arctan_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)\n (o.left_ne_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o (x + y) y = ↑(Real.arctan (‖x‖ / ‖y‖))\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) y (x + y) = ↑(Real.arctan (‖x‖ / ‖y‖))\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) y (y + x) = ↑(Real.arctan (‖x‖ / ‖y‖))\n[PROOFSTEP]\nexact (-o).oangle_add_right_eq_arctan_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o x (x + y)) = ‖x‖ / ‖x + y‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ Real.Angle.cos (oangle o x (x + y)) = ‖x‖ / ‖x + y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n InnerProductGeometry.cos_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o (x + y) y) = ‖y‖ / ‖x + y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.cos (oangle (-o) y (x + y)) = ‖y‖ / ‖x + y‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.cos (oangle (-o) y (y + x)) = ‖y‖ / ‖y + x‖\n[PROOFSTEP]\nexact (-o).cos_oangle_add_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o x (x + y)) = ‖y‖ / ‖x + y‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ Real.Angle.sin (oangle o x (x + y)) = ‖y‖ / ‖x + y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n InnerProductGeometry.sin_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.left_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o (x + y) y) = ‖x‖ / ‖x + y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.sin (oangle (-o) y (x + y)) = ‖x‖ / ‖x + y‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.sin (oangle (-o) y (y + x)) = ‖x‖ / ‖y + x‖\n[PROOFSTEP]\nexact (-o).sin_oangle_add_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o x (x + y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ Real.Angle.tan (oangle o x (x + y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n InnerProductGeometry.tan_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o (x + y) y) = ‖x‖ / ‖y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.tan (oangle (-o) y (x + y)) = ‖x‖ / ‖y‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.tan (oangle (-o) y (y + x)) = ‖x‖ / ‖y‖\n[PROOFSTEP]\nexact (-o).tan_oangle_add_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o x (x + y)) * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ Real.Angle.cos (oangle o x (x + y)) * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n InnerProductGeometry.cos_angle_add_mul_norm_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o (x + y) y) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.cos (oangle (-o) y (x + y)) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.cos (oangle (-o) y (y + x)) * ‖y + x‖ = ‖y‖\n[PROOFSTEP]\nexact (-o).cos_oangle_add_right_mul_norm_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o x (x + y)) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ Real.Angle.sin (oangle o x (x + y)) * ‖x + y‖ = ‖y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n InnerProductGeometry.sin_angle_add_mul_norm_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o (x + y) y) * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.sin (oangle (-o) y (x + y)) * ‖x + y‖ = ‖x‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.sin (oangle (-o) y (y + x)) * ‖y + x‖ = ‖x‖\n[PROOFSTEP]\nexact (-o).sin_oangle_add_right_mul_norm_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o x (x + y)) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ Real.Angle.tan (oangle o x (x + y)) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n InnerProductGeometry.tan_angle_add_mul_norm_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.left_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o (x + y) y) * ‖y‖ = ‖x‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.tan (oangle (-o) y (x + y)) * ‖y‖ = ‖x‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.tan (oangle (-o) y (y + x)) * ‖y‖ = ‖x‖\n[PROOFSTEP]\nexact (-o).tan_oangle_add_right_mul_norm_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.cos (oangle o x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ ‖x‖ / Real.Angle.cos (oangle o x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n InnerProductGeometry.norm_div_cos_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.left_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.cos (oangle o (x + y) y) = ‖x + y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.cos (oangle (-o) y (x + y)) = ‖x + y‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.cos (oangle (-o) y (y + x)) = ‖y + x‖\n[PROOFSTEP]\nexact (-o).norm_div_cos_oangle_add_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.sin (oangle o x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ ‖y‖ / Real.Angle.sin (oangle o x (x + y)) = ‖x + y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n InnerProductGeometry.norm_div_sin_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inr (o.right_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.sin (oangle o (x + y) y) = ‖x + y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.sin (oangle (-o) y (x + y)) = ‖x + y‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.sin (oangle (-o) y (y + x)) = ‖y + x‖\n[PROOFSTEP]\nexact (-o).norm_div_sin_oangle_add_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.tan (oangle o x (x + y)) = ‖x‖\n[PROOFSTEP]\nhave hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o x (x + y)) = 1\n[PROOFSTEP]\nrw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o x (x + y)) = 1\n⊢ ‖y‖ / Real.Angle.tan (oangle o x (x + y)) = ‖x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n InnerProductGeometry.norm_div_tan_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inr (o.right_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.tan (oangle o (x + y) y) = ‖y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.tan (oangle (-o) y (x + y)) = ‖y‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.tan (oangle (-o) y (y + x)) = ‖y‖\n[PROOFSTEP]\nexact (-o).norm_div_tan_oangle_add_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o y (y - x) = ↑(Real.arccos (‖y‖ / ‖y - x‖))\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ oangle o y (y - x) = ↑(Real.arccos (‖y‖ / ‖y - x‖))\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs,\n InnerProductGeometry.angle_sub_eq_arccos_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o (x - y) x = ↑(Real.arccos (‖x‖ / ‖x - y‖))\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) x (x - y) = ↑(Real.arccos (‖x‖ / ‖x - y‖))\n[PROOFSTEP]\nexact (-o).oangle_sub_right_eq_arccos_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o y (y - x) = ↑(Real.arcsin (‖x‖ / ‖y - x‖))\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ oangle o y (y - x) = ↑(Real.arcsin (‖x‖ / ‖y - x‖))\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs,\n InnerProductGeometry.angle_sub_eq_arcsin_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.right_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o (x - y) x = ↑(Real.arcsin (‖y‖ / ‖x - y‖))\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) x (x - y) = ↑(Real.arcsin (‖y‖ / ‖x - y‖))\n[PROOFSTEP]\nexact (-o).oangle_sub_right_eq_arcsin_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o y (y - x) = ↑(Real.arctan (‖x‖ / ‖y‖))\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ oangle o y (y - x) = ↑(Real.arctan (‖x‖ / ‖y‖))\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs,\n InnerProductGeometry.angle_sub_eq_arctan_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)\n (o.right_ne_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ oangle o (x - y) x = ↑(Real.arctan (‖y‖ / ‖x‖))\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ oangle (-o) x (x - y) = ↑(Real.arctan (‖y‖ / ‖x‖))\n[PROOFSTEP]\nexact (-o).oangle_sub_right_eq_arctan_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o y (y - x)) = ‖y‖ / ‖y - x‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ Real.Angle.cos (oangle o y (y - x)) = ‖y‖ / ‖y - x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n InnerProductGeometry.cos_angle_sub_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o (x - y) x) = ‖x‖ / ‖x - y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.cos (oangle (-o) x (x - y)) = ‖x‖ / ‖x - y‖\n[PROOFSTEP]\nexact (-o).cos_oangle_sub_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o y (y - x)) = ‖x‖ / ‖y - x‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ Real.Angle.sin (oangle o y (y - x)) = ‖x‖ / ‖y - x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n InnerProductGeometry.sin_angle_sub_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.right_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o (x - y) x) = ‖y‖ / ‖x - y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.sin (oangle (-o) x (x - y)) = ‖y‖ / ‖x - y‖\n[PROOFSTEP]\nexact (-o).sin_oangle_sub_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o y (y - x)) = ‖x‖ / ‖y‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ Real.Angle.tan (oangle o y (y - x)) = ‖x‖ / ‖y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n InnerProductGeometry.tan_angle_sub_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o (x - y) x) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.tan (oangle (-o) x (x - y)) = ‖y‖ / ‖x‖\n[PROOFSTEP]\nexact (-o).tan_oangle_sub_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o y (y - x)) * ‖y - x‖ = ‖y‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ Real.Angle.cos (oangle o y (y - x)) * ‖y - x‖ = ‖y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n InnerProductGeometry.cos_angle_sub_mul_norm_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.cos (oangle o (x - y) x) * ‖x - y‖ = ‖x‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.cos (oangle (-o) x (x - y)) * ‖x - y‖ = ‖x‖\n[PROOFSTEP]\nexact (-o).cos_oangle_sub_right_mul_norm_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o y (y - x)) * ‖y - x‖ = ‖x‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ Real.Angle.sin (oangle o y (y - x)) * ‖y - x‖ = ‖x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n InnerProductGeometry.sin_angle_sub_mul_norm_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sin (oangle o (x - y) x) * ‖x - y‖ = ‖y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.sin (oangle (-o) x (x - y)) * ‖x - y‖ = ‖y‖\n[PROOFSTEP]\nexact (-o).sin_oangle_sub_right_mul_norm_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o y (y - x)) * ‖y‖ = ‖x‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ Real.Angle.tan (oangle o y (y - x)) * ‖y‖ = ‖x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n InnerProductGeometry.tan_angle_sub_mul_norm_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.right_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.tan (oangle o (x - y) x) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ Real.Angle.tan (oangle (-o) x (x - y)) * ‖x‖ = ‖y‖\n[PROOFSTEP]\nexact (-o).tan_oangle_sub_right_mul_norm_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.cos (oangle o y (y - x)) = ‖y - x‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ ‖y‖ / Real.Angle.cos (oangle o y (y - x)) = ‖y - x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n InnerProductGeometry.norm_div_cos_angle_sub_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inl (o.right_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.cos (oangle o (x - y) x) = ‖x - y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.cos (oangle (-o) x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nexact (-o).norm_div_cos_oangle_sub_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.sin (oangle o y (y - x)) = ‖y - x‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ ‖x‖ / Real.Angle.sin (oangle o y (y - x)) = ‖y - x‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n InnerProductGeometry.norm_div_sin_angle_sub_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inr (o.left_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.sin (oangle o (x - y) x) = ‖x - y‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.sin (oangle (-o) x (x - y)) = ‖x - y‖\n[PROOFSTEP]\nexact (-o).norm_div_sin_oangle_sub_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖x‖ / Real.Angle.tan (oangle o y (y - x)) = ‖y‖\n[PROOFSTEP]\nhave hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ Real.Angle.sign (oangle o y (y - x)) = 1\n[PROOFSTEP]\nrw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\nhs : Real.Angle.sign (oangle o y (y - x)) = 1\n⊢ ‖x‖ / Real.Angle.tan (oangle o y (y - x)) = ‖y‖\n[PROOFSTEP]\nrw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n InnerProductGeometry.norm_div_tan_angle_sub_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)\n (Or.inr (o.left_ne_zero_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.tan (oangle o (x - y) x) = ‖x‖\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh✝ : oangle o x y = ↑(π / 2)\nh : oangle (-o) y x = ↑(π / 2)\n⊢ ‖y‖ / Real.Angle.tan (oangle (-o) x (x - y)) = ‖x‖\n[PROOFSTEP]\nexact (-o).norm_div_tan_oangle_sub_right_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\n⊢ oangle o x (x + r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r)\n[PROOFSTEP]\nrcases lt_trichotomy r 0 with (hr | rfl | hr)\n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r < 0\n⊢ oangle o x (x + r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r)\n[PROOFSTEP]\nhave ha : o.oangle x (r • o.rotation (π / 2 : ℝ) x) = -(π / 2 : ℝ) :=\n by\n rw [o.oangle_smul_right_of_neg _ _ hr, o.oangle_neg_right h, o.oangle_rotation_self_right h, ← sub_eq_zero, add_comm,\n sub_neg_eq_add, ← Real.Angle.coe_add, ← Real.Angle.coe_add, add_assoc, add_halves, ← two_mul, Real.Angle.coe_two_pi]\n simpa using h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r < 0\n⊢ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = -↑(π / 2)\n[PROOFSTEP]\nrw [o.oangle_smul_right_of_neg _ _ hr, o.oangle_neg_right h, o.oangle_rotation_self_right h, ← sub_eq_zero, add_comm,\n sub_neg_eq_add, ← Real.Angle.coe_add, ← Real.Angle.coe_add, add_assoc, add_halves, ← two_mul, Real.Angle.coe_two_pi]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r < 0\n⊢ ↑(rotation o ↑(π / 2)) x ≠ 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r < 0\nha : oangle o x (r • ↑(rotation o ↑(π / 2)) x) = -↑(π / 2)\n⊢ oangle o x (x + r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r)\n[PROOFSTEP]\nrw [← neg_inj, ← oangle_neg_orientation_eq_neg, @neg_neg Real.Angle] at ha \n[GOAL]\ncase inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r < 0\nha✝ : oangle o x (r • ↑(rotation o ↑(π / 2)) x) = -↑(π / 2)\nha : oangle (-o) x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2)\n⊢ oangle o x (x + r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r)\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj, oangle_rev,\n (-o).oangle_add_right_eq_arctan_of_oangle_eq_pi_div_two ha, norm_smul, LinearIsometryEquiv.norm_map, mul_div_assoc,\n div_self (norm_ne_zero_iff.2 h), mul_one, Real.norm_eq_abs, abs_of_neg hr, Real.arctan_neg, Real.Angle.coe_neg,\n neg_neg]\n[GOAL]\ncase inr.inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\n⊢ oangle o x (x + 0 • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan 0)\n[PROOFSTEP]\nrw [zero_smul, add_zero, oangle_self, Real.arctan_zero, Real.Angle.coe_zero]\n[GOAL]\ncase inr.inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : 0 < r\n⊢ oangle o x (x + r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r)\n[PROOFSTEP]\nhave ha : o.oangle x (r • o.rotation (π / 2 : ℝ) x) = (π / 2 : ℝ) := by\n rw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : 0 < r\n⊢ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2)\n[PROOFSTEP]\nrw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right h]\n[GOAL]\ncase inr.inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : 0 < r\nha : oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2)\n⊢ oangle o x (x + r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r)\n[PROOFSTEP]\nrw [o.oangle_add_right_eq_arctan_of_oangle_eq_pi_div_two ha, norm_smul, LinearIsometryEquiv.norm_map, mul_div_assoc,\n div_self (norm_ne_zero_iff.2 h), mul_one, Real.norm_eq_abs, abs_of_pos hr]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\n⊢ oangle o (x + r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nby_cases hr : r = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r = 0\n⊢ oangle o (x + r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\n⊢ oangle o (x + r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nrw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj, ← neg_neg ((π / 2 : ℝ) : Real.Angle), ←\n rotation_neg_orientation_eq_neg, add_comm]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\n⊢ oangle (-o) (r • ↑(rotation (-o) (-↑(π / 2))) x) (r • ↑(rotation (-o) (-↑(π / 2))) x + x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nhave hx : x = r⁻¹ • (-o).rotation (π / 2 : ℝ) (r • (-o).rotation (-(π / 2 : ℝ)) x) := by simp [hr]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\n⊢ x = r⁻¹ • ↑(rotation (-o) ↑(π / 2)) (r • ↑(rotation (-o) (-↑(π / 2))) x)\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation (-o) ↑(π / 2)) (r • ↑(rotation (-o) (-↑(π / 2))) x)\n⊢ oangle (-o) (r • ↑(rotation (-o) (-↑(π / 2))) x) (r • ↑(rotation (-o) (-↑(π / 2))) x + x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nnth_rw 3 [hx]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation (-o) ↑(π / 2)) (r • ↑(rotation (-o) (-↑(π / 2))) x)\n⊢ oangle (-o) (r • ↑(rotation (-o) (-↑(π / 2))) x)\n (r • ↑(rotation (-o) (-↑(π / 2))) x + r⁻¹ • ↑(rotation (-o) ↑(π / 2)) (r • ↑(rotation (-o) (-↑(π / 2))) x)) =\n ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nrefine' (-o).oangle_add_right_smul_rotation_pi_div_two _ _\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation (-o) ↑(π / 2)) (r • ↑(rotation (-o) (-↑(π / 2))) x)\n⊢ r • ↑(rotation (-o) (-↑(π / 2))) x ≠ 0\n[PROOFSTEP]\nsimp [hr, h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\n⊢ Real.Angle.tan (oangle o x (x + r • ↑(rotation o ↑(π / 2)) x)) = r\n[PROOFSTEP]\nrw [o.oangle_add_right_smul_rotation_pi_div_two h, Real.Angle.tan_coe, Real.tan_arctan]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\n⊢ Real.Angle.tan (oangle o (x + r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x)) = r⁻¹\n[PROOFSTEP]\nrw [o.oangle_add_left_smul_rotation_pi_div_two h, Real.Angle.tan_coe, Real.tan_arctan]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\n⊢ oangle o (r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x - x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nby_cases hr : r = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r = 0\n⊢ oangle o (r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x - x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\n⊢ oangle o (r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x - x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nhave hx : -x = r⁻¹ • o.rotation (π / 2 : ℝ) (r • o.rotation (π / 2 : ℝ) x) := by simp [hr, ← Real.Angle.coe_add]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\n⊢ -x = r⁻¹ • ↑(rotation o ↑(π / 2)) (r • ↑(rotation o ↑(π / 2)) x)\n[PROOFSTEP]\nsimp [hr, ← Real.Angle.coe_add]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : -x = r⁻¹ • ↑(rotation o ↑(π / 2)) (r • ↑(rotation o ↑(π / 2)) x)\n⊢ oangle o (r • ↑(rotation o ↑(π / 2)) x) (r • ↑(rotation o ↑(π / 2)) x - x) = ↑(Real.arctan r⁻¹)\n[PROOFSTEP]\nrw [sub_eq_add_neg, hx, o.oangle_add_right_smul_rotation_pi_div_two]\n[GOAL]\ncase neg.h\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : -x = r⁻¹ • ↑(rotation o ↑(π / 2)) (r • ↑(rotation o ↑(π / 2)) x)\n⊢ r • ↑(rotation o ↑(π / 2)) x ≠ 0\n[PROOFSTEP]\nsimpa [hr] using h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\n⊢ oangle o (x - r • ↑(rotation o ↑(π / 2)) x) x = ↑(Real.arctan r)\n[PROOFSTEP]\nby_cases hr : r = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : r = 0\n⊢ oangle o (x - r • ↑(rotation o ↑(π / 2)) x) x = ↑(Real.arctan r)\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\n⊢ oangle o (x - r • ↑(rotation o ↑(π / 2)) x) x = ↑(Real.arctan r)\n[PROOFSTEP]\nhave hx : x = r⁻¹ • o.rotation (π / 2 : ℝ) (-(r • o.rotation (π / 2 : ℝ) x)) := by simp [hr, ← Real.Angle.coe_add]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\n⊢ x = r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))\n[PROOFSTEP]\nsimp [hr, ← Real.Angle.coe_add]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))\n⊢ oangle o (x - r • ↑(rotation o ↑(π / 2)) x) x = ↑(Real.arctan r)\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_comm]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))\n⊢ oangle o (-(r • ↑(rotation o ↑(π / 2)) x) + x) x = ↑(Real.arctan r)\n[PROOFSTEP]\nnth_rw 3 [hx]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))\n⊢ oangle o (-(r • ↑(rotation o ↑(π / 2)) x) + x) (r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))) =\n ↑(Real.arctan r)\n[PROOFSTEP]\nnth_rw 2 [hx]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))\n⊢ oangle o (-(r • ↑(rotation o ↑(π / 2)) x) + r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x)))\n (r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))) =\n ↑(Real.arctan r)\n[PROOFSTEP]\nrw [o.oangle_add_left_smul_rotation_pi_div_two, inv_inv]\n[GOAL]\ncase neg.h\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nhd2 : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nh : x ≠ 0\nr : ℝ\nhr : ¬r = 0\nhx : x = r⁻¹ • ↑(rotation o ↑(π / 2)) (-(r • ↑(rotation o ↑(π / 2)) x))\n⊢ -(r • ↑(rotation o ↑(π / 2)) x) ≠ 0\n[PROOFSTEP]\nsimpa [hr] using h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∡ p₂ p₃ p₁ = ↑(Real.arccos (dist p₃ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ ∡ p₂ p₃ p₁ = ↑(Real.arccos (dist p₃ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs,\n angle_eq_arccos_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∡ p₃ p₁ p₂ = ↑(Real.arccos (dist p₁ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ ∡ p₃ p₁ p₂ = ↑(Real.arccos (dist p₁ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm,\n angle_eq_arccos_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h), dist_comm p₁ p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∡ p₂ p₃ p₁ = ↑(Real.arcsin (dist p₁ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ ∡ p₂ p₃ p₁ = ↑(Real.arcsin (dist p₁ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs,\n angle_eq_arcsin_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inl (left_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∡ p₃ p₁ p₂ = ↑(Real.arcsin (dist p₃ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ ∡ p₃ p₁ p₂ = ↑(Real.arcsin (dist p₃ p₂ / dist p₁ p₃))\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm,\n angle_eq_arcsin_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inr (left_ne_of_oangle_eq_pi_div_two h)),\n dist_comm p₁ p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∡ p₂ p₃ p₁ = ↑(Real.arctan (dist p₁ p₂ / dist p₃ p₂))\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ ∡ p₂ p₃ p₁ = ↑(Real.arctan (dist p₁ p₂ / dist p₃ p₂))\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs,\n angle_eq_arctan_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (right_ne_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∡ p₃ p₁ p₂ = ↑(Real.arctan (dist p₃ p₂ / dist p₁ p₂))\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ ∡ p₃ p₁ p₂ = ↑(Real.arctan (dist p₃ p₂ / dist p₁ p₂))\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm,\n angle_eq_arctan_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (left_ne_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.cos (∡ p₂ p₃ p₁) = dist p₃ p₂ / dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ Real.Angle.cos (∡ p₂ p₃ p₁) = dist p₃ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n cos_angle_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.cos (∡ p₃ p₁ p₂) = dist p₁ p₂ / dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ Real.Angle.cos (∡ p₃ p₁ p₂) = dist p₁ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.cos_coe,\n cos_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h), dist_comm p₁ p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sin (∡ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ Real.Angle.sin (∡ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n sin_angle_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inl (left_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sin (∡ p₃ p₁ p₂) = dist p₃ p₂ / dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ Real.Angle.sin (∡ p₃ p₁ p₂) = dist p₃ p₂ / dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.sin_coe,\n sin_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inr (left_ne_of_oangle_eq_pi_div_two h)),\n dist_comm p₁ p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.tan (∡ p₂ p₃ p₁) = dist p₁ p₂ / dist p₃ p₂\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ Real.Angle.tan (∡ p₂ p₃ p₁) = dist p₁ p₂ / dist p₃ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n tan_angle_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.tan (∡ p₃ p₁ p₂) = dist p₃ p₂ / dist p₁ p₂\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ Real.Angle.tan (∡ p₃ p₁ p₂) = dist p₃ p₂ / dist p₁ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.tan_coe,\n tan_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.cos (∡ p₂ p₃ p₁) * dist p₁ p₃ = dist p₃ p₂\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ Real.Angle.cos (∡ p₂ p₃ p₁) * dist p₁ p₃ = dist p₃ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n cos_angle_mul_dist_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.cos (∡ p₃ p₁ p₂) * dist p₁ p₃ = dist p₁ p₂\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ Real.Angle.cos (∡ p₃ p₁ p₂) * dist p₁ p₃ = dist p₁ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.cos_coe, dist_comm p₁ p₃,\n cos_angle_mul_dist_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sin (∡ p₂ p₃ p₁) * dist p₁ p₃ = dist p₁ p₂\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ Real.Angle.sin (∡ p₂ p₃ p₁) * dist p₁ p₃ = dist p₁ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n sin_angle_mul_dist_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sin (∡ p₃ p₁ p₂) * dist p₁ p₃ = dist p₃ p₂\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ Real.Angle.sin (∡ p₃ p₁ p₂) * dist p₁ p₃ = dist p₃ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.sin_coe, dist_comm p₁ p₃,\n sin_angle_mul_dist_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.tan (∡ p₂ p₃ p₁) * dist p₃ p₂ = dist p₁ p₂\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ Real.Angle.tan (∡ p₂ p₃ p₁) * dist p₃ p₂ = dist p₁ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n tan_angle_mul_dist_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inr (right_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.tan (∡ p₃ p₁ p₂) * dist p₁ p₂ = dist p₃ p₂\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ Real.Angle.tan (∡ p₃ p₁ p₂) * dist p₁ p₂ = dist p₃ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.tan_coe,\n tan_angle_mul_dist_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inr (left_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ dist p₃ p₂ / Real.Angle.cos (∡ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ dist p₃ p₂ / Real.Angle.cos (∡ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,\n dist_div_cos_angle_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inr (right_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ dist p₁ p₂ / Real.Angle.cos (∡ p₃ p₁ p₂) = dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ dist p₁ p₂ / Real.Angle.cos (∡ p₃ p₁ p₂) = dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.cos_coe, dist_comm p₁ p₃,\n dist_div_cos_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inr (left_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ dist p₁ p₂ / Real.Angle.sin (∡ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ dist p₁ p₂ / Real.Angle.sin (∡ p₂ p₃ p₁) = dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.sin_coe,\n dist_div_sin_angle_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inl (left_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ dist p₃ p₂ / Real.Angle.sin (∡ p₃ p₁ p₂) = dist p₁ p₃\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ dist p₃ p₂ / Real.Angle.sin (∡ p₃ p₁ p₂) = dist p₁ p₃\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.sin_coe, dist_comm p₁ p₃,\n dist_div_sin_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inl (right_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ dist p₁ p₂ / Real.Angle.tan (∡ p₂ p₃ p₁) = dist p₃ p₂\n[PROOFSTEP]\nhave hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n[PROOFSTEP]\nrw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₂ p₃ p₁) = 1\n⊢ dist p₁ p₂ / Real.Angle.tan (∡ p₂ p₃ p₁) = dist p₃ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.tan_coe,\n dist_div_tan_angle_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inl (left_ne_of_oangle_eq_pi_div_two h))]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ dist p₃ p₂ / Real.Angle.tan (∡ p₃ p₁ p₂) = dist p₁ p₂\n[PROOFSTEP]\nhave hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n[PROOFSTEP]\nrw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\nhs : Real.Angle.sign (∡ p₃ p₁ p₂) = 1\n⊢ dist p₃ p₂ / Real.Angle.tan (∡ p₃ p₁ p₂) = dist p₁ p₂\n[PROOFSTEP]\nrw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.tan_coe,\n dist_div_tan_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)\n (Or.inl (right_ne_of_oangle_eq_pi_div_two h))]\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Oriented.RightAngle", "llama_tokens": 47039, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289387998695209, "lm_q2_score": 0.7401743735019595, "lm_q1q2_score": 0.6135592568648888}} {"text": "[GOAL]\n⊢ AbsoluteValue.uniformSpace AbsoluteValue.abs = PseudoMetricSpace.toUniformSpace\n[PROOFSTEP]\next s\n[GOAL]\ncase a.a\ns : Set (ℚ × ℚ)\n⊢ s ∈ uniformity ℚ ↔ s ∈ uniformity ℚ\n[PROOFSTEP]\nrw [(AbsoluteValue.hasBasis_uniformity _).mem_iff, Metric.uniformity_basis_dist_rat.mem_iff]\n[GOAL]\ncase a.a\ns : Set (ℚ × ℚ)\n⊢ (∃ i, 0 < i ∧ {p | ↑AbsoluteValue.abs (p.snd - p.fst) < i} ⊆ s) ↔ ∃ i, 0 < i ∧ {p | dist p.fst p.snd < ↑i} ⊆ s\n[PROOFSTEP]\nsimp only [Rat.dist_eq, AbsoluteValue.abs_apply, ← Rat.cast_sub, ← Rat.cast_abs, Rat.cast_lt, abs_sub_comm]\n[GOAL]\n⊢ UniformSpace ℝ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CompleteSpace ℝ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ SeparatedSpace ℝ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ UniformInducing Rat.cast\n[PROOFSTEP]\nrw [Rat.uniformSpace_eq]\n[GOAL]\n⊢ UniformInducing Rat.cast\n[PROOFSTEP]\nexact Rat.uniformEmbedding_coe_real.toUniformInducing\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.CompareReals", "llama_tokens": 414, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424295406087, "lm_q2_score": 0.7248702702332475, "lm_q1q2_score": 0.6131985175028709}} {"text": "[GOAL]\n⊢ Denumerable ℚ\n[PROOFSTEP]\nlet T := { x : ℤ × ℕ // 0 < x.2 ∧ x.1.natAbs.coprime x.2 }\n[GOAL]\nT : Type := { x // 0 < x.snd ∧ Nat.coprime (Int.natAbs x.fst) x.snd }\n⊢ Denumerable ℚ\n[PROOFSTEP]\nletI : Infinite T := Infinite.of_injective _ denumerable_aux.injective\n[GOAL]\nT : Type := { x // 0 < x.snd ∧ Nat.coprime (Int.natAbs x.fst) x.snd }\nthis : Infinite T := Infinite.of_injective (↑Rat.denumerable_aux) (Equiv.injective Rat.denumerable_aux)\n⊢ Denumerable ℚ\n[PROOFSTEP]\nletI : Encodable T := Subtype.encodable\n[GOAL]\nT : Type := { x // 0 < x.snd ∧ Nat.coprime (Int.natAbs x.fst) x.snd }\nthis✝ : Infinite T := Infinite.of_injective (↑Rat.denumerable_aux) (Equiv.injective Rat.denumerable_aux)\nthis : Encodable T := Subtype.encodable\n⊢ Denumerable ℚ\n[PROOFSTEP]\nletI : Denumerable T := ofEncodableOfInfinite T\n[GOAL]\nT : Type := { x // 0 < x.snd ∧ Nat.coprime (Int.natAbs x.fst) x.snd }\nthis✝¹ : Infinite T := Infinite.of_injective (↑Rat.denumerable_aux) (Equiv.injective Rat.denumerable_aux)\nthis✝ : Encodable T := Subtype.encodable\nthis : Denumerable T := ofEncodableOfInfinite T\n⊢ Denumerable ℚ\n[PROOFSTEP]\nexact Denumerable.ofEquiv T denumerable_aux\n[GOAL]\n⊢ #ℚ = ℵ₀\n[PROOFSTEP]\nsimp only [mk_eq_aleph0]\n", "meta": {"mathlib_filename": "Mathlib.Data.Rat.Denumerable", "llama_tokens": 560, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8840392817460333, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.6123227156687147}} {"text": "[GOAL]\nb : Bool\n⊢ (b::zero b) = zero b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ (false::zero false) = zero false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\n⊢ (true::zero true) = zero true\n[PROOFSTEP]\nrfl\n[GOAL]\nb : Bool\n⊢ (b::zero (decide ¬b = true)) = nz (msb b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ (false::zero (decide ¬false = true)) = nz (msb false)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\n⊢ (true::zero (decide ¬true = true)) = nz (msb true)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : SNum → Sort u_1\nz : (b : Bool) → C (zero b)\ns : (b : Bool) → (p : SNum) → C p → C (b::p)\nb : Bool\n⊢ C (nz (msb b))\n[PROOFSTEP]\nrw [← bit_one]\n[GOAL]\nC : SNum → Sort u_1\nz : (b : Bool) → C (zero b)\ns : (b : Bool) → (p : SNum) → C p → C (b::p)\nb : Bool\n⊢ C (b::zero (decide ¬b = true))\n[PROOFSTEP]\nexact s b (SNum.zero (Not b)) (z (Not b))\n", "meta": {"mathlib_filename": "Mathlib.Data.Num.Bitwise", "llama_tokens": 397, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8558511616741042, "lm_q2_score": 0.7154239836484143, "lm_q1q2_score": 0.6122964474950108}} {"text": "[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\n⊢ M p\n[PROOFSTEP]\nhave A : ∀ {n : ℕ} {a}, M (C a * X ^ n) := by\n intro n a\n induction' n with n ih\n · rw [pow_zero, mul_one]; exact h_C a\n · exact h_monomial _ _ ih\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\n⊢ ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\n[PROOFSTEP]\nintro n a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nn : ℕ\na : R\n⊢ M (↑C a * X ^ n)\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\na : R\n⊢ M (↑C a * X ^ Nat.zero)\n[PROOFSTEP]\nrw [pow_zero, mul_one]\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\na : R\n⊢ M (↑C a)\n[PROOFSTEP]\nexact h_C a\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\na : R\nn : ℕ\nih : M (↑C a * X ^ n)\n⊢ M (↑C a * X ^ Nat.succ n)\n[PROOFSTEP]\nexact h_monomial _ _ ih\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\n⊢ M p\n[PROOFSTEP]\nhave B : ∀ s : Finset ℕ, M (s.sum fun n : ℕ => C (p.coeff n) * X ^ n) :=\n by\n apply Finset.induction\n · convert h_C 0\n exact C_0.symm\n · intro n s ns ih\n rw [sum_insert ns]\n exact h_add _ _ A ih\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\n⊢ ∀ (s : Finset ℕ), M (Finset.sum s fun n => ↑C (coeff p n) * X ^ n)\n[PROOFSTEP]\napply Finset.induction\n[GOAL]\ncase empty\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\n⊢ M (Finset.sum ∅ fun n => ↑C (coeff p n) * X ^ n)\n[PROOFSTEP]\nconvert h_C 0\n[GOAL]\ncase h.e'_1\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\n⊢ (Finset.sum ∅ fun n => ↑C (coeff p n) * X ^ n) = ↑C 0\n[PROOFSTEP]\nexact C_0.symm\n[GOAL]\ncase insert\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\n⊢ ∀ ⦃a : ℕ⦄ {s : Finset ℕ},\n ¬a ∈ s →\n M (Finset.sum s fun n => ↑C (coeff p n) * X ^ n) → M (Finset.sum (insert a s) fun n => ↑C (coeff p n) * X ^ n)\n[PROOFSTEP]\nintro n s ns ih\n[GOAL]\ncase insert\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\nn : ℕ\ns : Finset ℕ\nns : ¬n ∈ s\nih : M (Finset.sum s fun n => ↑C (coeff p n) * X ^ n)\n⊢ M (Finset.sum (insert n s) fun n => ↑C (coeff p n) * X ^ n)\n[PROOFSTEP]\nrw [sum_insert ns]\n[GOAL]\ncase insert\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\nn : ℕ\ns : Finset ℕ\nns : ¬n ∈ s\nih : M (Finset.sum s fun n => ↑C (coeff p n) * X ^ n)\n⊢ M (↑C (coeff p n) * X ^ n + Finset.sum s fun x => ↑C (coeff p x) * X ^ x)\n[PROOFSTEP]\nexact h_add _ _ A ih\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\nB : ∀ (s : Finset ℕ), M (Finset.sum s fun n => ↑C (coeff p n) * X ^ n)\n⊢ M p\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq p, Polynomial.sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA✝ : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_C : ∀ (a : R), M (↑C a)\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑C a * X ^ n) → M (↑C a * X ^ (n + 1))\nA : ∀ {n : ℕ} {a : R}, M (↑C a * X ^ n)\nB : ∀ (s : Finset ℕ), M (Finset.sum s fun n => ↑C (coeff p n) * X ^ n)\n⊢ M (Finset.sum (support p) fun n => ↑C (coeff p n) * X ^ n)\n[PROOFSTEP]\nexact B (support p)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑(monomial n) a)\nn : ℕ\na : R\n_h : M (↑C a * X ^ n)\n⊢ M (↑C a * X ^ (n + 1))\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nM : R[X] → Prop\np : R[X]\nh_add : ∀ (p q : R[X]), M p → M q → M (p + q)\nh_monomial : ∀ (n : ℕ) (a : R), M (↑(monomial n) a)\nn : ℕ\na : R\n_h : M (↑C a * X ^ n)\n⊢ M (↑(monomial (n + 1)) a)\n[PROOFSTEP]\nexact h_monomial _ _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nI : Ideal R[X]\ncf : ∀ (i : ℕ), ↑C (coeff f i) ∈ I\n⊢ Ideal.span {g | ∃ i, g = ↑C (coeff f i)} ≤ I\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [@eq_comm _ _ (C _)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nI : Ideal R[X]\ncf : ∀ (i : ℕ), ↑C (coeff f i) ∈ I\n⊢ Ideal.span {g | ∃ i, ↑C (coeff f i) = g} ≤ I\n[PROOFSTEP]\nexact (Ideal.span_le.trans range_subset_iff).mpr cf\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nI : Ideal R[X]\n⊢ f ∈ Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\nlet p := Ideal.span {g : R[X] | ∃ i : ℕ, g = C (coeff f i)}\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n⊢ f ∈ Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\nnth_rw 1 [(sum_C_mul_X_pow_eq f).symm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n⊢ (sum f fun n a => ↑C a * X ^ n) ∈ Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\nrefine' Submodule.sum_mem _ fun n _hn => _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\n⊢ (fun n a => ↑C a * X ^ n) n (coeff f n) ∈ Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\n⊢ ↑C (coeff f n) * X ^ n ∈ Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\nhave : C (coeff f n) ∈ p := by\n apply subset_span\n rw [mem_setOf_eq]\n use n\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\n⊢ ↑C (coeff f n) ∈ p\n[PROOFSTEP]\napply subset_span\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\n⊢ ↑C (coeff f n) ∈ {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\nrw [mem_setOf_eq]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\n⊢ ∃ i, ↑C (coeff f n) = ↑C (coeff f i)\n[PROOFSTEP]\nuse n\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\nthis : ↑C (coeff f n) ∈ p\n⊢ ↑C (coeff f n) * X ^ n ∈ Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\nhave : monomial n (1 : R) • C (coeff f n) ∈ p := p.smul_mem _ this\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\nthis✝ : ↑C (coeff f n) ∈ p\nthis : ↑(monomial n) 1 • ↑C (coeff f n) ∈ p\n⊢ ↑C (coeff f n) * X ^ n ∈ Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_4\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\nthis✝ : ↑C (coeff f n) ∈ p\nthis : ↑(monomial n) 1 • ↑C (coeff f n) ∈ p\n⊢ ↑C (coeff f n) * X ^ n = ↑(monomial n) 1 • ↑C (coeff f n)\n[PROOFSTEP]\nsimp only [monomial_mul_C, one_mul, smul_eq_mul]\n[GOAL]\ncase h.e'_4\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r f : R[X]\nI : Ideal R[X]\np : Ideal R[X] := Ideal.span {g | ∃ i, g = ↑C (coeff f i)}\nn : ℕ\n_hn : n ∈ support f\nthis✝ : ↑C (coeff f n) ∈ p\nthis : ↑(monomial n) 1 • ↑C (coeff f n) ∈ p\n⊢ ↑C (coeff f n) * X ^ n = ↑(monomial n) (coeff f n)\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_monomial]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Induction", "llama_tokens": 6844, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.855851135937125, "lm_q2_score": 0.7154239957834733, "lm_q1q2_score": 0.6122964394679625}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\nx : α\nh : x ∈ a :: l\npx : p x\n⊢ p a ∨ ∃ x, x ∈ l ∧ p x\n[PROOFSTEP]\nsimp only [find?, mem_cons] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\nx : α\npx : p x\nh : x = a ∨ x ∈ l\n⊢ p a ∨ ∃ x, x ∈ l ∧ p x\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\nx : α\npx : p x\nh : x = a\n⊢ p a ∨ ∃ x, x ∈ l ∧ p x\n[PROOFSTEP]\ncases h\n[GOAL]\ncase inl.refl\nα : Type u\nβ : Type v\nγ : Type w\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\npx : p a\n⊢ p a ∨ ∃ x, x ∈ l ∧ p x\n[PROOFSTEP]\nexact Or.inl px\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\nx : α\npx : p x\nh : x ∈ l\n⊢ p a ∨ ∃ x, x ∈ l ∧ p x\n[PROOFSTEP]\nexact Or.inr ⟨x, h, px⟩\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.List.Lemmas", "llama_tokens": 538, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117940706735, "lm_q2_score": 0.7401743735019595, "lm_q1q2_score": 0.6119108842429417}} {"text": "[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y : V\nx : V × V\nhx1 : x.fst ≠ 0\nhx2 : x.snd ≠ 0\n⊢ ‖x.fst‖ * ‖x.snd‖ ≠ 0\n[PROOFSTEP]\nsimp [hx1, hx2]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ : V\nc : ℝ\nhc : c ≠ 0\nx y : V\n⊢ angle (c • x) (c • y) = angle x y\n[PROOFSTEP]\nhave : c * c ≠ 0 := mul_ne_zero hc hc\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ : V\nc : ℝ\nhc : c ≠ 0\nx y : V\nthis : c * c ≠ 0\n⊢ angle (c • x) (c • y) = angle x y\n[PROOFSTEP]\nrw [angle, angle, real_inner_smul_left, inner_smul_right, norm_smul, norm_smul, Real.norm_eq_abs,\n mul_mul_mul_comm _ ‖x‖, abs_mul_abs_self, ← mul_assoc c c, mul_div_mul_left _ _ this]\n[GOAL]\nV : Type u_1\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : InnerProductSpace ℝ V\nx y : V\nE : Type u_2\nF : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : InnerProductSpace ℝ F\nf : E →ₗᵢ[ℝ] F\nu v : E\n⊢ angle (↑f u) (↑f v) = angle u v\n[PROOFSTEP]\nrw [angle, angle, f.inner_map_map, f.norm_map, f.norm_map]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ angle x y = angle y x\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ arccos (inner x y / (‖x‖ * ‖y‖)) = arccos (inner y x / (‖y‖ * ‖x‖))\n[PROOFSTEP]\nrw [real_inner_comm, mul_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ angle (-x) (-y) = angle x y\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ arccos (inner (-x) (-y) / (‖-x‖ * ‖-y‖)) = arccos (inner x y / (‖x‖ * ‖y‖))\n[PROOFSTEP]\nrw [inner_neg_neg, norm_neg, norm_neg]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ angle x (-y) = π - angle x y\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ arccos (inner x (-y) / (‖x‖ * ‖-y‖)) = π - arccos (inner x y / (‖x‖ * ‖y‖))\n[PROOFSTEP]\nrw [← Real.arccos_neg, norm_neg, inner_neg_right, neg_div]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ angle (-x) y = π - angle x y\n[PROOFSTEP]\nrw [← angle_neg_neg, neg_neg, angle_neg_right]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\n⊢ angle 0 x = π / 2\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\n⊢ arccos (inner 0 x / (‖0‖ * ‖x‖)) = π / 2\n[PROOFSTEP]\nrw [inner_zero_left, zero_div, Real.arccos_zero]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\n⊢ angle x 0 = π / 2\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\n⊢ arccos (inner x 0 / (‖x‖ * ‖0‖)) = π / 2\n[PROOFSTEP]\nrw [inner_zero_right, zero_div, Real.arccos_zero]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\nhx : x ≠ 0\n⊢ angle x x = 0\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\nhx : x ≠ 0\n⊢ arccos (inner x x / (‖x‖ * ‖x‖)) = 0\n[PROOFSTEP]\nrw [← real_inner_self_eq_norm_mul_norm, div_self (inner_self_ne_zero.2 hx : ⟪x, x⟫ ≠ 0), Real.arccos_one]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\nhx : x ≠ 0\n⊢ angle x (-x) = π\n[PROOFSTEP]\nrw [angle_neg_right, angle_self hx, sub_zero]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x : V\nhx : x ≠ 0\n⊢ angle (-x) x = π\n[PROOFSTEP]\nrw [angle_comm, angle_self_neg_of_nonzero hx]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nr : ℝ\nhr : 0 < r\n⊢ angle x (r • y) = angle x y\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nr : ℝ\nhr : 0 < r\n⊢ arccos (inner x (r • y) / (‖x‖ * ‖r • y‖)) = arccos (inner x y / (‖x‖ * ‖y‖))\n[PROOFSTEP]\nrw [inner_smul_right, norm_smul, Real.norm_eq_abs, abs_of_nonneg (le_of_lt hr), ← mul_assoc, mul_comm _ r, mul_assoc,\n mul_div_mul_left _ _ (ne_of_gt hr)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nr : ℝ\nhr : 0 < r\n⊢ angle (r • x) y = angle x y\n[PROOFSTEP]\nrw [angle_comm, angle_smul_right_of_pos y x hr, angle_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nr : ℝ\nhr : r < 0\n⊢ angle x (r • y) = angle x (-y)\n[PROOFSTEP]\nrw [← neg_neg r, neg_smul, angle_neg_right, angle_smul_right_of_pos x y (neg_pos_of_neg hr), angle_neg_right]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nr : ℝ\nhr : r < 0\n⊢ angle (r • x) y = angle (-x) y\n[PROOFSTEP]\nrw [angle_comm, angle_smul_right_of_neg y x hr, angle_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ cos (angle x y) * (‖x‖ * ‖y‖) = inner x y\n[PROOFSTEP]\nrw [cos_angle, div_mul_cancel_of_imp]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ ‖x‖ * ‖y‖ = 0 → inner x y = 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) [or_imp]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ sin (angle x y) * (‖x‖ * ‖y‖) = sqrt (inner x x * inner y y - inner x y * inner x y)\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ sin (arccos (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖) = sqrt (inner x x * inner y y - inner x y * inner x y)\n[PROOFSTEP]\nrw [Real.sin_arccos, ← Real.sqrt_mul_self (mul_nonneg (norm_nonneg x) (norm_nonneg y)), ←\n Real.sqrt_mul' _ (mul_self_nonneg _), sq, Real.sqrt_mul_self (mul_nonneg (norm_nonneg x) (norm_nonneg y)),\n real_inner_self_eq_norm_mul_norm, real_inner_self_eq_norm_mul_norm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ sqrt ((1 - inner x y / (‖x‖ * ‖y‖) * (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =\n sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)\n[PROOFSTEP]\nby_cases h : ‖x‖ * ‖y‖ = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ * ‖y‖ = 0\n⊢ sqrt ((1 - inner x y / (‖x‖ * ‖y‖) * (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =\n sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)\n[PROOFSTEP]\nrw [show ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) by ring, h, mul_zero, mul_zero, zero_sub]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ * ‖y‖ = 0\n⊢ ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖)\n[PROOFSTEP]\nring\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ * ‖y‖ = 0\n⊢ sqrt 0 = sqrt (-(inner x y * inner x y))\n[PROOFSTEP]\ncases' eq_zero_or_eq_zero_of_mul_eq_zero h with hx hy\n[GOAL]\ncase pos.inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ * ‖y‖ = 0\nhx : ‖x‖ = 0\n⊢ sqrt 0 = sqrt (-(inner x y * inner x y))\n[PROOFSTEP]\nrw [norm_eq_zero] at hx \n[GOAL]\ncase pos.inl\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ * ‖y‖ = 0\nhx : x = 0\n⊢ sqrt 0 = sqrt (-(inner x y * inner x y))\n[PROOFSTEP]\nrw [hx, inner_zero_left, zero_mul, neg_zero]\n[GOAL]\ncase pos.inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ * ‖y‖ = 0\nhy : ‖y‖ = 0\n⊢ sqrt 0 = sqrt (-(inner x y * inner x y))\n[PROOFSTEP]\nrw [norm_eq_zero] at hy \n[GOAL]\ncase pos.inr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ * ‖y‖ = 0\nhy : y = 0\n⊢ sqrt 0 = sqrt (-(inner x y * inner x y))\n[PROOFSTEP]\nrw [hy, inner_zero_right, zero_mul, neg_zero]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ¬‖x‖ * ‖y‖ = 0\n⊢ sqrt ((1 - inner x y / (‖x‖ * ‖y‖) * (inner x y / (‖x‖ * ‖y‖))) * (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖))) =\n sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)\n[PROOFSTEP]\nfield_simp [h]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ¬‖x‖ * ‖y‖ = 0\n⊢ sqrt (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖) - inner x y * inner x y) = sqrt (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) - inner x y * inner x y)\n[PROOFSTEP]\nring_nf\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ angle x y = 0 ↔ x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x\n[PROOFSTEP]\nrw [angle, ← real_inner_div_norm_mul_norm_eq_one_iff, Real.arccos_eq_zero, LE.le.le_iff_eq, eq_comm]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ inner x y / (‖x‖ * ‖y‖) ≤ 1\n[PROOFSTEP]\nexact (abs_le.mp (abs_real_inner_div_norm_mul_norm_le_one x y)).2\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ angle x y = π ↔ x ≠ 0 ∧ ∃ r, r < 0 ∧ y = r • x\n[PROOFSTEP]\nrw [angle, ← real_inner_div_norm_mul_norm_eq_neg_one_iff, Real.arccos_eq_pi, LE.le.le_iff_eq]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ -1 ≤ inner x y / (‖x‖ * ‖y‖)\n[PROOFSTEP]\nexact (abs_le.mp (abs_real_inner_div_norm_mul_norm_le_one x y)).1\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y z : V\nh : angle x y = π\n⊢ angle x z + angle y z = π\n[PROOFSTEP]\nrcases angle_eq_pi_iff.1 h with ⟨_, ⟨r, ⟨hr, rfl⟩⟩⟩\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y x z : V\nleft✝ : x ≠ 0\nr : ℝ\nhr : r < 0\nh : angle x (r • x) = π\n⊢ angle x z + angle (r • x) z = π\n[PROOFSTEP]\nrw [angle_smul_left_of_neg x z hr, angle_neg_left, add_sub_cancel'_right]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ angle x y = π / 2 ↔ inner x y = 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) [angle, or_imp]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = π\n⊢ inner x y = -(‖x‖ * ‖y‖)\n[PROOFSTEP]\nsimp [← cos_angle_mul_norm_mul_norm, h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = 0\n⊢ inner x y = ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimp [← cos_angle_mul_norm_mul_norm, h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ inner x y = -(‖x‖ * ‖y‖) ↔ angle x y = π\n[PROOFSTEP]\nrefine' ⟨fun h => _, inner_eq_neg_mul_norm_of_angle_eq_pi⟩\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : inner x y = -(‖x‖ * ‖y‖)\n⊢ angle x y = π\n[PROOFSTEP]\nhave h₁ : ‖x‖ * ‖y‖ ≠ 0 := (mul_pos (norm_pos_iff.mpr hx) (norm_pos_iff.mpr hy)).ne'\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : inner x y = -(‖x‖ * ‖y‖)\nh₁ : ‖x‖ * ‖y‖ ≠ 0\n⊢ angle x y = π\n[PROOFSTEP]\nrw [angle, h, neg_div, div_self h₁, Real.arccos_neg_one]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ inner x y = ‖x‖ * ‖y‖ ↔ angle x y = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, inner_eq_mul_norm_of_angle_eq_zero⟩\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : inner x y = ‖x‖ * ‖y‖\n⊢ angle x y = 0\n[PROOFSTEP]\nhave h₁ : ‖x‖ * ‖y‖ ≠ 0 := (mul_pos (norm_pos_iff.mpr hx) (norm_pos_iff.mpr hy)).ne'\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : inner x y = ‖x‖ * ‖y‖\nh₁ : ‖x‖ * ‖y‖ ≠ 0\n⊢ angle x y = 0\n[PROOFSTEP]\nrw [angle, h, div_self h₁, Real.arccos_one]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = π\n⊢ ‖x - y‖ = ‖x‖ + ‖y‖\n[PROOFSTEP]\nrw [← sq_eq_sq (norm_nonneg (x - y)) (add_nonneg (norm_nonneg x) (norm_nonneg y)), norm_sub_pow_two_real,\n inner_eq_neg_mul_norm_of_angle_eq_pi h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = π\n⊢ ‖x‖ ^ 2 - 2 * -(‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = 0\n⊢ ‖x + y‖ = ‖x‖ + ‖y‖\n[PROOFSTEP]\nrw [← sq_eq_sq (norm_nonneg (x + y)) (add_nonneg (norm_nonneg x) (norm_nonneg y)), norm_add_pow_two_real,\n inner_eq_mul_norm_of_angle_eq_zero h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = 0\n⊢ ‖x‖ ^ 2 + 2 * (‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = 0\n⊢ ‖x - y‖ = |‖x‖ - ‖y‖|\n[PROOFSTEP]\nrw [← sq_eq_sq (norm_nonneg (x - y)) (abs_nonneg (‖x‖ - ‖y‖)), norm_sub_pow_two_real,\n inner_eq_mul_norm_of_angle_eq_zero h, sq_abs (‖x‖ - ‖y‖)]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : angle x y = 0\n⊢ ‖x‖ ^ 2 - 2 * (‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ‖x - y‖ = ‖x‖ + ‖y‖ ↔ angle x y = π\n[PROOFSTEP]\nrefine' ⟨fun h => _, norm_sub_eq_add_norm_of_angle_eq_pi⟩\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = ‖x‖ + ‖y‖\n⊢ angle x y = π\n[PROOFSTEP]\nrw [← inner_eq_neg_mul_norm_iff_angle_eq_pi hx hy]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = ‖x‖ + ‖y‖\n⊢ inner x y = -(‖x‖ * ‖y‖)\n[PROOFSTEP]\nobtain ⟨hxy₁, hxy₂⟩ := norm_nonneg (x - y), add_nonneg (norm_nonneg x) (norm_nonneg y)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = ‖x‖ + ‖y‖\nhxy₁ : 0 ≤ ‖x - y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ inner x y = -(‖x‖ * ‖y‖)\n[PROOFSTEP]\nrw [← sq_eq_sq hxy₁ hxy₂, norm_sub_pow_two_real] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh✝ : ‖x - y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nh : ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nhxy₁ : 0 ≤ ‖x - y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ inner x y = -(‖x‖ * ‖y‖)\n[PROOFSTEP]\ncalc\n ⟪x, y⟫ = (‖x‖ ^ 2 + ‖y‖ ^ 2 - (‖x‖ + ‖y‖) ^ 2) / 2 := by linarith\n _ = -(‖x‖ * ‖y‖) := by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh✝ : ‖x - y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nh : ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nhxy₁ : 0 ≤ ‖x - y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ inner x y = (‖x‖ ^ 2 + ‖y‖ ^ 2 - (‖x‖ + ‖y‖) ^ 2) / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh✝ : ‖x - y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nh : ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nhxy₁ : 0 ≤ ‖x - y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ (‖x‖ ^ 2 + ‖y‖ ^ 2 - (‖x‖ + ‖y‖) ^ 2) / 2 = -(‖x‖ * ‖y‖)\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ‖x + y‖ = ‖x‖ + ‖y‖ ↔ angle x y = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, norm_add_eq_add_norm_of_angle_eq_zero⟩\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x + y‖ = ‖x‖ + ‖y‖\n⊢ angle x y = 0\n[PROOFSTEP]\nrw [← inner_eq_mul_norm_iff_angle_eq_zero hx hy]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x + y‖ = ‖x‖ + ‖y‖\n⊢ inner x y = ‖x‖ * ‖y‖\n[PROOFSTEP]\nobtain ⟨hxy₁, hxy₂⟩ := norm_nonneg (x + y), add_nonneg (norm_nonneg x) (norm_nonneg y)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x + y‖ = ‖x‖ + ‖y‖\nhxy₁ : 0 ≤ ‖x + y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ inner x y = ‖x‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq_eq_sq hxy₁ hxy₂, norm_add_pow_two_real] at h \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh✝ : ‖x + y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nh : ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nhxy₁ : 0 ≤ ‖x + y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ inner x y = ‖x‖ * ‖y‖\n[PROOFSTEP]\ncalc\n ⟪x, y⟫ = ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2 := by linarith\n _ = ‖x‖ * ‖y‖ := by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh✝ : ‖x + y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nh : ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nhxy₁ : 0 ≤ ‖x + y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ inner x y = ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh✝ : ‖x + y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nh : ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2\nhxy₁ : 0 ≤ ‖x + y‖\nhxy₂ : 0 ≤ ‖x‖ + ‖y‖\n⊢ ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2 = ‖x‖ * ‖y‖\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ‖x - y‖ = |‖x‖ - ‖y‖| ↔ angle x y = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, norm_sub_eq_abs_sub_norm_of_angle_eq_zero⟩\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\n⊢ angle x y = 0\n[PROOFSTEP]\nrw [← inner_eq_mul_norm_iff_angle_eq_zero hx hy]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\n⊢ inner x y = ‖x‖ * ‖y‖\n[PROOFSTEP]\nhave h1 : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2 := by\n rw [h]\n exact sq_abs (‖x‖ - ‖y‖)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\n⊢ ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\n[PROOFSTEP]\nrw [h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\n⊢ |‖x‖ - ‖y‖| ^ 2 = (‖x‖ - ‖y‖) ^ 2\n[PROOFSTEP]\nexact sq_abs (‖x‖ - ‖y‖)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\nh1 : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\n⊢ inner x y = ‖x‖ * ‖y‖\n[PROOFSTEP]\nrw [norm_sub_pow_two_real] at h1 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\nh1✝ : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\nh1 : ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\n⊢ inner x y = ‖x‖ * ‖y‖\n[PROOFSTEP]\ncalc\n ⟪x, y⟫ = ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2 := by linarith\n _ = ‖x‖ * ‖y‖ := by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\nh1✝ : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\nh1 : ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\n⊢ inner x y = ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nhx : x ≠ 0\nhy : y ≠ 0\nh : ‖x - y‖ = |‖x‖ - ‖y‖|\nh1✝ : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\nh1 : ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2\n⊢ ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2 = ‖x‖ * ‖y‖\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ ‖x + y‖ = ‖x - y‖ ↔ angle x y = π / 2\n[PROOFSTEP]\nrw [← sq_eq_sq (norm_nonneg (x + y)) (norm_nonneg (x - y)), ← inner_eq_zero_iff_angle_eq_pi_div_two x y,\n norm_add_pow_two_real, norm_sub_pow_two_real]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 ↔ inner x y = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2 → inner x y = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\n⊢ inner x y = 0 → ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2\n⊢ inner x y = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx✝ y✝ x y : V\nh : inner x y = 0\n⊢ ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = ‖x‖ ^ 2 - 2 * inner x y + ‖y‖ ^ 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ cos (angle x y) = 1 ↔ angle x y = 0\n[PROOFSTEP]\nrw [← cos_zero]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ cos (angle x y) = cos 0 ↔ angle x y = 0\n[PROOFSTEP]\nexact injOn_cos.eq_iff ⟨angle_nonneg x y, angle_le_pi x y⟩ (left_mem_Icc.2 pi_pos.le)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ cos (angle x y) = 0 ↔ angle x y = π / 2\n[PROOFSTEP]\nrw [← cos_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ cos (angle x y) = cos (π / 2) ↔ angle x y = π / 2\n[PROOFSTEP]\napply injOn_cos.eq_iff ⟨angle_nonneg x y, angle_le_pi x y⟩\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ π / 2 ∈ Icc 0 π\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ 0 ≤ π / 2\n[PROOFSTEP]\nlinarith [pi_pos]\n[GOAL]\ncase right\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ π / 2 ≤ π\n[PROOFSTEP]\nlinarith [pi_pos]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ cos (angle x y) = -1 ↔ angle x y = π\n[PROOFSTEP]\nrw [← cos_pi]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ cos (angle x y) = cos π ↔ angle x y = π\n[PROOFSTEP]\nexact injOn_cos.eq_iff ⟨angle_nonneg x y, angle_le_pi x y⟩ (right_mem_Icc.2 pi_pos.le)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ sin (angle x y) = 0 ↔ angle x y = 0 ∨ angle x y = π\n[PROOFSTEP]\nrw [sin_eq_zero_iff_cos_eq, cos_eq_one_iff_angle_eq_zero, cos_eq_neg_one_iff_angle_eq_pi]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ sin (angle x y) = 1 ↔ angle x y = π / 2\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => by rw [h, sin_pi_div_two]⟩\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : angle x y = π / 2\n⊢ sin (angle x y) = 1\n[PROOFSTEP]\nrw [h, sin_pi_div_two]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : sin (angle x y) = 1\n⊢ angle x y = π / 2\n[PROOFSTEP]\nrw [← cos_eq_zero_iff_angle_eq_pi_div_two, ← abs_eq_zero, abs_cos_eq_sqrt_one_sub_sin_sq, h]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : sin (angle x y) = 1\n⊢ sqrt (1 - 1 ^ 2) = 0\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic", "llama_tokens": 13320, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673087708699, "lm_q2_score": 0.7520125793176222, "lm_q1q2_score": 0.6112864415117559}} {"text": "[GOAL]\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\ninst✝³ : Ring R\ninst✝² : DecidableEq n\ninst✝¹ : Nonempty n\np : ℕ\ninst✝ : CharP R p\n⊢ ∀ (x : ℕ), ↑x = 0 ↔ p ∣ x\n[PROOFSTEP]\nintro k\n[GOAL]\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\ninst✝³ : Ring R\ninst✝² : DecidableEq n\ninst✝¹ : Nonempty n\np : ℕ\ninst✝ : CharP R p\nk : ℕ\n⊢ ↑k = 0 ↔ p ∣ k\n[PROOFSTEP]\nrw [← CharP.cast_eq_zero_iff R p k, ← Nat.cast_zero, ← map_natCast <| scalar n]\n[GOAL]\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\ninst✝³ : Ring R\ninst✝² : DecidableEq n\ninst✝¹ : Nonempty n\np : ℕ\ninst✝ : CharP R p\nk : ℕ\n⊢ ↑(scalar n) ↑k = ↑0 ↔ ↑k = 0\n[PROOFSTEP]\nconvert @scalar_inj n _ _ _ _ _ (@Nat.cast R NonAssocSemiring.toNatCast k) 0\n[GOAL]\ncase h.e'_1.h.e'_3\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\ninst✝³ : Ring R\ninst✝² : DecidableEq n\ninst✝¹ : Nonempty n\np : ℕ\ninst✝ : CharP R p\nk : ℕ\n⊢ ↑0 = ↑(scalar n) 0\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Matrix.CharP", "llama_tokens": 511, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240825770432, "lm_q2_score": 0.7057850216484838, "lm_q1q2_score": 0.6106621978524279}} {"text": "[GOAL]\nn : ℕ\nh : 0 < n\nm : ℕ := n / 2\n⊢ m < n\n[PROOFSTEP]\napply Nat.div_lt_self h\n[GOAL]\nn : ℕ\nh : 0 < n\nm : ℕ := n / 2\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\n⊢ Fin.ofNat 0 ≤ Fin.ofNat __do_lift✝\n[PROOFSTEP]\nsimp [Fin.ofNat, LE.le]\n[GOAL]\nn : ℕ\n⊢ 0 ≤ __do_lift✝ % (n + 1)\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\n⊢ 0 < List.length (String.toList \" 0123abcABC:,;`\\\\/\")\n[PROOFSTEP]\ndecide\n", "meta": {"mathlib_filename": "Mathlib.Testing.SlimCheck.Sampleable", "llama_tokens": 236, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.84594244507642, "lm_q2_score": 0.7217432003123989, "lm_q1q2_score": 0.6105532075895511}} {"text": "[GOAL]\nm n k l : ℕ\n⊢ 1 < 0 ↔ 0 ≠ 0 ∧ 0 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\nm n k l : ℕ\n⊢ 1 < 1 ↔ 1 ≠ 0 ∧ 1 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\nm n✝ k l n : ℕ\n⊢ 1 < n + 2 ↔ n + 2 ≠ 0 ∧ n + 2 ≠ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nm n k l : ℕ\n⊢ 0 = m * n ↔ m = 0 ∨ n = 0\n[PROOFSTEP]\nrw [eq_comm, Nat.mul_eq_zero]\n[GOAL]\nm n k l : ℕ\n⊢ m + n = max m n ↔ m = 0 ∨ n = 0\n[PROOFSTEP]\nrw [← min_eq_zero_iff]\n[GOAL]\nm n k l : ℕ\n⊢ m + n = max m n ↔ min m n = 0\n[PROOFSTEP]\ncases' le_total m n with H H\n[GOAL]\ncase inl\nm n k l : ℕ\nH : m ≤ n\n⊢ m + n = max m n ↔ min m n = 0\n[PROOFSTEP]\nsimp [H]\n[GOAL]\ncase inr\nm n k l : ℕ\nH : n ≤ m\n⊢ m + n = max m n ↔ min m n = 0\n[PROOFSTEP]\nsimp [H]\n[GOAL]\nm n k l : ℕ\n⊢ m + n = min m n ↔ m = 0 ∧ n = 0\n[PROOFSTEP]\nrw [← max_eq_zero_iff]\n[GOAL]\nm n k l : ℕ\n⊢ m + n = min m n ↔ max m n = 0\n[PROOFSTEP]\ncases' le_total m n with H H\n[GOAL]\ncase inl\nm n k l : ℕ\nH : m ≤ n\n⊢ m + n = min m n ↔ max m n = 0\n[PROOFSTEP]\nsimp [H]\n[GOAL]\ncase inr\nm n k l : ℕ\nH : n ≤ m\n⊢ m + n = min m n ↔ max m n = 0\n[PROOFSTEP]\nsimp [H]\n[GOAL]\nm n k l : ℕ\nH : m * n = 1\n⊢ n * ?m.12220 H = 1\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\nm n k l : ℕ\n⊢ 2 ≤ 0 ↔ 0 ≠ 0 ∧ 0 ≠ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nm n k l : ℕ\n⊢ 2 ≤ 1 ↔ 1 ≠ 0 ∧ 1 ≠ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nm n✝ k l n : ℕ\n⊢ 2 ≤ n + 2 ↔ n + 2 ≠ 0 ∧ n + 2 ≠ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nm✝ n✝ k l m n : ℕ\n⊢ 0 < m + n → 0 < m ∨ 0 < n\n[PROOFSTEP]\nintro h\n[GOAL]\nm✝ n✝ k l m n : ℕ\nh : 0 < m + n\n⊢ 0 < m ∨ 0 < n\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase zero\nm n✝ k l n : ℕ\nh : 0 < zero + n\n⊢ 0 < zero ∨ 0 < n\n[PROOFSTEP]\nsimp [zero_add] at h \n[GOAL]\ncase zero\nm n✝ k l n : ℕ\nh : 0 < n\n⊢ 0 < zero ∨ 0 < n\n[PROOFSTEP]\nexact Or.inr h\n[GOAL]\ncase succ\nm✝ n✝ k l n m : ℕ\nh : 0 < succ m + n\n⊢ 0 < succ m ∨ 0 < n\n[PROOFSTEP]\nexact Or.inl (succ_pos _)\n[GOAL]\nm✝ n✝ k l m n : ℕ\n⊢ 0 < m ∨ 0 < n → 0 < m + n\n[PROOFSTEP]\nintro h\n[GOAL]\nm✝ n✝ k l m n : ℕ\nh : 0 < m ∨ 0 < n\n⊢ 0 < m + n\n[PROOFSTEP]\ncases' h with mpos npos\n[GOAL]\ncase inl\nm✝ n✝ k l m n : ℕ\nmpos : 0 < m\n⊢ 0 < m + n\n[PROOFSTEP]\napply add_pos_left mpos\n[GOAL]\ncase inr\nm✝ n✝ k l m n : ℕ\nnpos : 0 < n\n⊢ 0 < m + n\n[PROOFSTEP]\napply add_pos_right _ npos\n[GOAL]\nm n k l : ℕ\n⊢ m + n = 1 ↔ m = 0 ∧ n = 1 ∨ m = 1 ∧ n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm k l : ℕ\n⊢ m + zero = 1 ↔ m = 0 ∧ zero = 1 ∨ m = 1 ∧ zero = 0\n[PROOFSTEP]\nsimp [succ_eq_add_one, ← add_assoc, succ_inj']\n[GOAL]\ncase succ\nm k l n✝ : ℕ\n⊢ m + succ n✝ = 1 ↔ m = 0 ∧ succ n✝ = 1 ∨ m = 1 ∧ succ n✝ = 0\n[PROOFSTEP]\nsimp [succ_eq_add_one, ← add_assoc, succ_inj']\n[GOAL]\nm n k l : ℕ\n⊢ m + n = 2 ↔ m = 0 ∧ n = 2 ∨ m = 1 ∧ n = 1 ∨ m = 2 ∧ n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm k l : ℕ\n⊢ m + zero = 2 ↔ m = 0 ∧ zero = 2 ∨ m = 1 ∧ zero = 1 ∨ m = 2 ∧ zero = 0\n[PROOFSTEP]\nsimp [(succ_ne_zero 1).symm, (show 2 = Nat.succ 1 from rfl), succ_eq_add_one, ← add_assoc, succ_inj', add_eq_one_iff]\n[GOAL]\ncase succ\nm k l n✝ : ℕ\n⊢ m + succ n✝ = 2 ↔ m = 0 ∧ succ n✝ = 2 ∨ m = 1 ∧ succ n✝ = 1 ∨ m = 2 ∧ succ n✝ = 0\n[PROOFSTEP]\nsimp [(succ_ne_zero 1).symm, (show 2 = Nat.succ 1 from rfl), succ_eq_add_one, ← add_assoc, succ_inj', add_eq_one_iff]\n[GOAL]\nm n k l : ℕ\n⊢ m + n = 3 ↔ m = 0 ∧ n = 3 ∨ m = 1 ∧ n = 2 ∨ m = 2 ∧ n = 1 ∨ m = 3 ∧ n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm k l : ℕ\n⊢ m + zero = 3 ↔ m = 0 ∧ zero = 3 ∨ m = 1 ∧ zero = 2 ∨ m = 2 ∧ zero = 1 ∨ m = 3 ∧ zero = 0\n[PROOFSTEP]\nsimp [(succ_ne_zero 1).symm, succ_eq_add_one, (show 3 = Nat.succ 2 from rfl), ← add_assoc, succ_inj', add_eq_two_iff]\n[GOAL]\ncase succ\nm k l n✝ : ℕ\n⊢ m + succ n✝ = 3 ↔ m = 0 ∧ succ n✝ = 3 ∨ m = 1 ∧ succ n✝ = 2 ∨ m = 2 ∧ succ n✝ = 1 ∨ m = 3 ∧ succ n✝ = 0\n[PROOFSTEP]\nsimp [(succ_ne_zero 1).symm, succ_eq_add_one, (show 3 = Nat.succ 2 from rfl), ← add_assoc, succ_inj', add_eq_two_iff]\n[GOAL]\nm n k l : ℕ\n⊢ n ≤ m ∧ m ≤ n + 1 ↔ m = n ∨ m = n + 1\n[PROOFSTEP]\nrw [le_add_one_iff, and_or_left, ← le_antisymm_iff, eq_comm, and_iff_right_of_imp]\n[GOAL]\nm n k l : ℕ\n⊢ m = n + 1 → n ≤ m\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn k l : ℕ\n⊢ n ≤ n + 1\n[PROOFSTEP]\nexact n.le_succ\n[GOAL]\nm n k l : ℕ\nhab : m < n\nhcd : k < l\n⊢ m + k + 1 < n + l\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\nm n k l : ℕ\nhab : m < n\nhcd : k < l\n⊢ m + (k + 1) < n + l\n[PROOFSTEP]\nexact add_lt_add_of_lt_of_le hab (Nat.succ_le_iff.2 hcd)\n[GOAL]\nm n k l : ℕ\n⊢ m ≤ succ n → pred m ≤ n\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nn k l : ℕ\n⊢ zero ≤ succ n → pred zero ≤ n\n[PROOFSTEP]\nexact fun _ => zero_le n\n[GOAL]\ncase succ\nn k l n✝ : ℕ\n⊢ succ n✝ ≤ succ n → pred (succ n✝) ≤ n\n[PROOFSTEP]\nexact le_of_succ_le_succ\n[GOAL]\nm n k l : ℕ\n⊢ OrderedSub ℕ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase tsub_le_iff_right\nm n k l : ℕ\n⊢ ∀ (a b c : ℕ), a - b ≤ c ↔ a ≤ c + b\n[PROOFSTEP]\nintro m n k\n[GOAL]\ncase tsub_le_iff_right\nm✝ n✝ k✝ l m n k : ℕ\n⊢ m - n ≤ k ↔ m ≤ k + n\n[PROOFSTEP]\ninduction' n with n ih generalizing k\n[GOAL]\ncase tsub_le_iff_right.zero\nm✝ n k✝¹ l m k✝ k : ℕ\n⊢ m - zero ≤ k ↔ m ≤ k + zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase tsub_le_iff_right.succ\nm✝ n✝ k✝¹ l m k✝ n : ℕ\nih : ∀ (k : ℕ), m - n ≤ k ↔ m ≤ k + n\nk : ℕ\n⊢ m - succ n ≤ k ↔ m ≤ k + succ n\n[PROOFSTEP]\nsimp only [sub_succ, pred_le_iff, ih, succ_add, add_succ]\n[GOAL]\nm n k l : ℕ\nh : k + l = m + n - 1\n⊢ m ≤ k ∨ n ≤ l\n[PROOFSTEP]\ncases' le_or_lt m k with h' h' <;> [left; right]\n[GOAL]\nm n k l : ℕ\nh : k + l = m + n - 1\n⊢ m ≤ k ∨ n ≤ l\n[PROOFSTEP]\ncases' le_or_lt m k with h' h'\n[GOAL]\ncase inl\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : m ≤ k\n⊢ m ≤ k ∨ n ≤ l\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : k < m\n⊢ m ≤ k ∨ n ≤ l\n[PROOFSTEP]\nright\n[GOAL]\ncase inl.h\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : m ≤ k\n⊢ m ≤ k\n[PROOFSTEP]\nexact h'\n[GOAL]\ncase inr.h\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : k < m\n⊢ n ≤ l\n[PROOFSTEP]\nreplace h' := add_lt_add_right h' l\n[GOAL]\ncase inr.h\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : k + l < m + l\n⊢ n ≤ l\n[PROOFSTEP]\nrw [h] at h' \n[GOAL]\ncase inr.h\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : m + n - 1 < m + l\n⊢ n ≤ l\n[PROOFSTEP]\ncases' n.eq_zero_or_pos with hn hn\n[GOAL]\ncase inr.h.inl\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : m + n - 1 < m + l\nhn : n = 0\n⊢ n ≤ l\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase inr.h.inl\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : m + n - 1 < m + l\nhn : n = 0\n⊢ 0 ≤ l\n[PROOFSTEP]\nexact zero_le l\n[GOAL]\ncase inr.h.inr\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : m + n - 1 < m + l\nhn : n > 0\n⊢ n ≤ l\n[PROOFSTEP]\nrw [n.add_sub_assoc (Nat.succ_le_of_lt hn), add_lt_add_iff_left] at h' \n[GOAL]\ncase inr.h.inr\nm n k l : ℕ\nh : k + l = m + n - 1\nh' : n - succ 0 < l\nhn : n > 0\n⊢ n ≤ l\n[PROOFSTEP]\nexact Nat.le_of_pred_lt h'\n[GOAL]\nm n✝ k l n : ℕ\n⊢ n + 1 ≤ (n + 1) * (n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n⊢ m ≤ n * m\n[PROOFSTEP]\nconv =>\n lhs\n rw [← one_mul m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m ≤ n * m\n[PROOFSTEP]\n lhs\n rw [← one_mul m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m ≤ n * m\n[PROOFSTEP]\n lhs\n rw [← one_mul m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m ≤ n * m\n[PROOFSTEP]\nlhs\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m\n[PROOFSTEP]\nrw [← one_mul m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n⊢ 1 * m ≤ n * m\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right h.nat_succ_le (zero_le _)\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n⊢ m ≤ m * n\n[PROOFSTEP]\nconv =>\n lhs\n rw [← mul_one m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m ≤ m * n\n[PROOFSTEP]\n lhs\n rw [← mul_one m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m ≤ m * n\n[PROOFSTEP]\n lhs\n rw [← mul_one m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m ≤ m * n\n[PROOFSTEP]\nlhs\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n| m\n[PROOFSTEP]\nrw [← mul_one m]\n[GOAL]\nm n k l : ℕ\nh : 0 < n\n⊢ m * 1 ≤ m * n\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left h.nat_succ_le (zero_le _)\n[GOAL]\nm n✝ k l n i : ℕ\nhi : i ≠ 0\n⊢ n ≤ i + (n - 1)\n[PROOFSTEP]\nrefine le_trans ?_ add_tsub_le_assoc\n[GOAL]\nm n✝ k l n i : ℕ\nhi : i ≠ 0\n⊢ n ≤ i + n - 1\n[PROOFSTEP]\nsimp [add_comm, Nat.add_sub_assoc, one_le_iff_ne_zero.2 hi]\n[GOAL]\nm n k l : ℕ\nhm : m ≠ 0\nhn : n ≠ 0\n⊢ m + n - 1 ≤ m * n\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nn k l : ℕ\nhn : n ≠ 0\nhm : zero ≠ 0\n⊢ zero + n - 1 ≤ zero * n\n[PROOFSTEP]\ncases hm rfl\n[GOAL]\ncase succ\nn k l : ℕ\nhn : n ≠ 0\nn✝ : ℕ\nhm : succ n✝ ≠ 0\n⊢ succ n✝ + n - 1 ≤ succ n✝ * n\n[PROOFSTEP]\nrw [succ_add, succ_sub_one, succ_mul]\n[GOAL]\ncase succ\nn k l : ℕ\nhn : n ≠ 0\nn✝ : ℕ\nhm : succ n✝ ≠ 0\n⊢ n✝ + n ≤ n✝ * n + n\n[PROOFSTEP]\nexact add_le_add_right (le_mul_of_one_le_right' $ succ_le_iff.2 $ pos_iff_ne_zero.2 hn) _\n[GOAL]\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\n⊢ P (a + 1) (b + 1)\n[PROOFSTEP]\napply hd _ _ ((add_lt_add_iff_right _).1 h)\n[GOAL]\ncase a\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\n⊢ P (a + 1) b\n[PROOFSTEP]\nhave this : a + 1 = b ∨ a + 1 < b := by rwa [← le_iff_eq_or_lt, ← Nat.lt_succ_iff]\n[GOAL]\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\n⊢ a + 1 = b ∨ a + 1 < b\n[PROOFSTEP]\nrwa [← le_iff_eq_or_lt, ← Nat.lt_succ_iff]\n[GOAL]\ncase a\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\nthis : a + 1 = b ∨ a + 1 < b\n⊢ P (a + 1) b\n[PROOFSTEP]\nhave wf : (a + 1) + b < (a + 1) + (b + 1) := by simp\n[GOAL]\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\nthis : a + 1 = b ∨ a + 1 < b\n⊢ a + 1 + b < a + 1 + (b + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\nthis : a + 1 = b ∨ a + 1 < b\nwf : a + 1 + b < a + 1 + (b + 1)\n⊢ P (a + 1) b\n[PROOFSTEP]\nrcases this with (rfl | h)\n[GOAL]\ncase a.inl\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na : ℕ\nh : a + 1 < a + 1 + 1\nwf : a + 1 + (a + 1) < a + 1 + (a + 1 + 1)\n⊢ P (a + 1) (a + 1)\n[PROOFSTEP]\nexact ha _\n[GOAL]\ncase a.inr\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh✝ : a + 1 < b + 1\nwf : a + 1 + b < a + 1 + (b + 1)\nh : a + 1 < b\n⊢ P (a + 1) b\n[PROOFSTEP]\napply diag_induction P ha hb hd (a + 1) b h\n[GOAL]\ncase a\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\n⊢ P a (b + 1)\n[PROOFSTEP]\nhave _ : a + (b + 1) < (a + 1) + (b + 1) := by simp\n[GOAL]\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\n⊢ a + (b + 1) < a + 1 + (b + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\nx✝ : a + (b + 1) < a + 1 + (b + 1)\n⊢ P a (b + 1)\n[PROOFSTEP]\napply diag_induction P ha hb hd a (b + 1)\n[GOAL]\ncase a\nm n k l : ℕ\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\na b : ℕ\nh : a + 1 < b + 1\nx✝ : a + (b + 1) < a + 1 + (b + 1)\n⊢ a < b + 1\n[PROOFSTEP]\napply lt_of_le_of_lt (Nat.le_succ _) h\n[GOAL]\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\n_x✝ : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1\na✝² :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y _x✝ →\n P y.1 y.2.1\nx✝⁴ : ℕ\nx✝³ : (x : ℕ) ×' x✝⁴ < x\na✝¹ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁴, snd := x✝³ } →\n P y.1 y.2.1\nx✝² : ℕ\nx✝¹ : x✝⁴ < x✝²\na✝ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁴, snd := { fst := x✝², snd := x✝¹ } } →\n P y.1 y.2.1\na b : ℕ\nh✝ : a + 1 < b + 1\nx✝ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := succ a, snd := { fst := succ b, snd := h✝ } } →\n P y.1 y.2.1\nthis : a + 1 = b ∨ a + 1 < b\nwf : a + 1 + b < a + 1 + (b + 1)\nh : a + 1 < b\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n { fst := a + 1, snd := { fst := b, snd := h } } { fst := succ a, snd := { fst := succ b, snd := h✝ } }\n[PROOFSTEP]\n{assumption\n}\n[GOAL]\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\n_x✝ : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1\na✝² :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y _x✝ →\n P y.1 y.2.1\nx✝⁴ : ℕ\nx✝³ : (x : ℕ) ×' x✝⁴ < x\na✝¹ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁴, snd := x✝³ } →\n P y.1 y.2.1\nx✝² : ℕ\nx✝¹ : x✝⁴ < x✝²\na✝ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁴, snd := { fst := x✝², snd := x✝¹ } } →\n P y.1 y.2.1\na b : ℕ\nh✝ : a + 1 < b + 1\nx✝ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := succ a, snd := { fst := succ b, snd := h✝ } } →\n P y.1 y.2.1\nthis : a + 1 = b ∨ a + 1 < b\nwf : a + 1 + b < a + 1 + (b + 1)\nh : a + 1 < b\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n { fst := a + 1, snd := { fst := b, snd := h } } { fst := succ a, snd := { fst := succ b, snd := h✝ } }\n[PROOFSTEP]\nassumption\n[GOAL]\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\n_x✝ : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1\na✝³ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y _x✝ →\n P y.1 y.2.1\nx✝⁵ : ℕ\nx✝⁴ : (x : ℕ) ×' x✝⁵ < x\na✝² :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁵, snd := x✝⁴ } →\n P y.1 y.2.1\nx✝³ : ℕ\nx✝² : x✝⁵ < x✝³\na✝¹ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁵, snd := { fst := x✝³, snd := x✝² } } →\n P y.1 y.2.1\na b : ℕ\nh : a + 1 < b + 1\nx✝¹ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := succ a, snd := { fst := succ b, snd := h } } →\n P y.1 y.2.1\nx✝ : a + (b + 1) < a + 1 + (b + 1)\na✝ : a < b + 1\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n { fst := a, snd := { fst := b + 1, snd := a✝ } } { fst := succ a, snd := { fst := succ b, snd := h } }\n[PROOFSTEP]\n{assumption\n}\n[GOAL]\nP : ℕ → ℕ → Prop\nha : ∀ (a : ℕ), P (a + 1) (a + 1)\nhb : ∀ (b : ℕ), P 0 (b + 1)\nhd : ∀ (a b : ℕ), a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)\n_x✝ : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1\na✝³ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y _x✝ →\n P y.1 y.2.1\nx✝⁵ : ℕ\nx✝⁴ : (x : ℕ) ×' x✝⁵ < x\na✝² :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁵, snd := x✝⁴ } →\n P y.1 y.2.1\nx✝³ : ℕ\nx✝² : x✝⁵ < x✝³\na✝¹ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := x✝⁵, snd := { fst := x✝³, snd := x✝² } } →\n P y.1 y.2.1\na b : ℕ\nh : a + 1 < b + 1\nx✝¹ :\n ∀ (y : (x : ℕ) ×' (x_1 : ℕ) ×' x < x_1),\n (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n y { fst := succ a, snd := { fst := succ b, snd := h } } →\n P y.1 y.2.1\nx✝ : a + (b + 1) < a + 1 + (b + 1)\na✝ : a < b + 1\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => PSigma.casesOn snd fun b snd => a + b) instWellFoundedRelation).1\n { fst := a, snd := { fst := b + 1, snd := a✝ } } { fst := succ a, snd := { fst := succ b, snd := h } }\n[PROOFSTEP]\nassumption\n[GOAL]\nm n k l : ℕ\nh : m ≤ k * n\nk0 : k = 0\n⊢ m / k ≤ n\n[PROOFSTEP]\nrw [k0, Nat.div_zero]\n[GOAL]\nm n k l : ℕ\nh : m ≤ k * n\nk0 : k = 0\n⊢ 0 ≤ n\n[PROOFSTEP]\napply zero_le\n[GOAL]\nm✝ n✝ k l m n : ℕ\nn0 : n = 0\n⊢ m / n ≤ m\n[PROOFSTEP]\nrw [n0, Nat.div_zero]\n[GOAL]\nm✝ n✝ k l m n : ℕ\nn0 : n = 0\n⊢ 0 ≤ m\n[PROOFSTEP]\napply zero_le\n[GOAL]\nm n k l : ℕ\nhn : 2 ≤ n\nh : m ≤ m / n\n⊢ n * m ≤ m\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm n k l : ℕ\nhn : 2 ≤ n\nh : m ≤ m / n\n⊢ m * n ≤ m\n[PROOFSTEP]\nexact (Nat.le_div_iff_mul_le' (lt_of_lt_of_le (by decide) hn)).1 h\n[GOAL]\nm n k l : ℕ\nhn : 2 ≤ n\nh : m ≤ m / n\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhm0 : m = 0\n⊢ m / k * n / m ≤ n / k\n[PROOFSTEP]\nsimp [hm0]\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhm0 : ¬m = 0\n⊢ m / k * n ≤ n * m / k\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhm0 : ¬m = 0\n⊢ n * (m / k) ≤ n * m / k\n[PROOFSTEP]\nexact mul_div_le_mul_div_assoc _ _ _\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhm0 : ¬m = 0\n⊢ n * m / k / m = n / k\n[PROOFSTEP]\n{rw [Nat.div_div_eq_div_mul, mul_comm n, mul_comm k, Nat.mul_div_mul_left _ _ (Nat.pos_of_ne_zero hm0)]\n}\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhm0 : ¬m = 0\n⊢ n * m / k / m = n / k\n[PROOFSTEP]\nrw [Nat.div_div_eq_div_mul, mul_comm n, mul_comm k, Nat.mul_div_mul_left _ _ (Nat.pos_of_ne_zero hm0)]\n[GOAL]\nm n k l : ℕ\nhmk : k ∣ m\nhnl : l ∣ n\n⊢ m * n / (k * l) = m / k * (n / l)\n[PROOFSTEP]\nrcases k.eq_zero_or_pos with (rfl | hk0)\n[GOAL]\ncase inl\nm n l : ℕ\nhnl : l ∣ n\nhmk : 0 ∣ m\n⊢ m * n / (0 * l) = m / 0 * (n / l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nm n k l : ℕ\nhmk : k ∣ m\nhnl : l ∣ n\nhk0 : k > 0\n⊢ m * n / (k * l) = m / k * (n / l)\n[PROOFSTEP]\nrcases l.eq_zero_or_pos with (rfl | hl0)\n[GOAL]\ncase inr.inl\nm n k : ℕ\nhmk : k ∣ m\nhk0 : k > 0\nhnl : 0 ∣ n\n⊢ m * n / (k * 0) = m / k * (n / 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nm n k l : ℕ\nhmk : k ∣ m\nhnl : l ∣ n\nhk0 : k > 0\nhl0 : l > 0\n⊢ m * n / (k * l) = m / k * (n / l)\n[PROOFSTEP]\nobtain ⟨_, rfl⟩ := hmk\n[GOAL]\ncase inr.inr.intro\nn k l : ℕ\nhnl : l ∣ n\nhk0 : k > 0\nhl0 : l > 0\nw✝ : ℕ\n⊢ k * w✝ * n / (k * l) = k * w✝ / k * (n / l)\n[PROOFSTEP]\nobtain ⟨_, rfl⟩ := hnl\n[GOAL]\ncase inr.inr.intro.intro\nk l : ℕ\nhk0 : k > 0\nhl0 : l > 0\nw✝¹ w✝ : ℕ\n⊢ k * w✝¹ * (l * w✝) / (k * l) = k * w✝¹ / k * (l * w✝ / l)\n[PROOFSTEP]\nrw [mul_mul_mul_comm, Nat.mul_div_cancel_left _ hk0, Nat.mul_div_cancel_left _ hl0,\n Nat.mul_div_cancel_left _ (mul_pos hk0 hl0)]\n[GOAL]\nm n k l a b : ℕ\nh : a / 2 < a - b\n⊢ b ≤ a / 2\n[PROOFSTEP]\nrw [Nat.le_div_iff_mul_le two_pos]\n[GOAL]\nm n k l a b : ℕ\nh : a / 2 < a - b\n⊢ b * 2 ≤ a\n[PROOFSTEP]\nrw [Nat.div_lt_iff_lt_mul two_pos, Nat.mul_sub_right_distrib, lt_tsub_iff_right, mul_two a] at h \n[GOAL]\nm n k l a b : ℕ\nh✝ : a < a * 2 - b * 2\nh : a + b * 2 < a + a\n⊢ b * 2 ≤ a\n[PROOFSTEP]\nexact le_of_lt (Nat.lt_of_add_lt_add_left h)\n[GOAL]\nm n k l a b : ℕ\nh : a - b ≤ a / 2\n⊢ a / 2 ≤ b\n[PROOFSTEP]\nrw [Nat.le_div_iff_mul_le two_pos, Nat.mul_sub_right_distrib, tsub_le_iff_right, mul_two, add_le_add_iff_left] at h \n[GOAL]\nm n k l a b : ℕ\nh✝ : a * 2 - b * 2 ≤ a\nh : a ≤ b * 2\n⊢ a / 2 ≤ b\n[PROOFSTEP]\nrw [← Nat.mul_div_left b two_pos]\n[GOAL]\nm n k l a b : ℕ\nh✝ : a * 2 - b * 2 ≤ a\nh : a ≤ b * 2\n⊢ a / 2 ≤ b * 2 / 2\n[PROOFSTEP]\nexact Nat.div_le_div_right h\n[GOAL]\nm n k l : ℕ\nhn : n % 2 = 1\n⊢ 2 * (n / 2) = n - 1\n[PROOFSTEP]\nconv =>\n rhs\n rw [← Nat.mod_add_div n 2, hn, @add_tsub_cancel_left]\n[GOAL]\nm n k l : ℕ\nhn : n % 2 = 1\n| 2 * (n / 2) = n - 1\n[PROOFSTEP]\n rhs\n rw [← Nat.mod_add_div n 2, hn, @add_tsub_cancel_left]\n[GOAL]\nm n k l : ℕ\nhn : n % 2 = 1\n| 2 * (n / 2) = n - 1\n[PROOFSTEP]\n rhs\n rw [← Nat.mod_add_div n 2, hn, @add_tsub_cancel_left]\n[GOAL]\nm n k l : ℕ\nhn : n % 2 = 1\n| 2 * (n / 2) = n - 1\n[PROOFSTEP]\nrhs\n[GOAL]\nm n k l : ℕ\nhn : n % 2 = 1\n| n - 1\n[PROOFSTEP]\nrw [← Nat.mod_add_div n 2, hn, @add_tsub_cancel_left]\n[GOAL]\nm n k l : ℕ\nh : n ∣ m\nhm : m ≠ 0\n⊢ m / (m / n) = n\n[PROOFSTEP]\nrcases h with ⟨_, rfl⟩\n[GOAL]\ncase intro\nn k l w✝ : ℕ\nhm : n * w✝ ≠ 0\n⊢ n * w✝ / (n * w✝ / n) = n\n[PROOFSTEP]\nrw [mul_ne_zero_iff] at hm \n[GOAL]\ncase intro\nn k l w✝ : ℕ\nhm : n ≠ 0 ∧ w✝ ≠ 0\n⊢ n * w✝ / (n * w✝ / n) = n\n[PROOFSTEP]\nrw [mul_div_right _ (Nat.pos_of_ne_zero hm.1), mul_div_left _ (Nat.pos_of_ne_zero hm.2)]\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\n⊢ m % (n * k) / n = m / n % k\n[PROOFSTEP]\nrcases Nat.eq_zero_or_pos n with (rfl | hn)\n[GOAL]\ncase inl\nm✝ n k✝ l m k : ℕ\n⊢ m % (0 * k) / 0 = m / 0 % k\ncase inr m✝ n✝ k✝ l m n k : ℕ hn : n > 0 ⊢ m % (n * k) / n = m / n % k\n[PROOFSTEP]\nsimp [mod_zero]\n[GOAL]\ncase inr\nm✝ n✝ k✝ l m n k : ℕ\nhn : n > 0\n⊢ m % (n * k) / n = m / n % k\n[PROOFSTEP]\nrcases Nat.eq_zero_or_pos k with (rfl | hk)\n[GOAL]\ncase inr.inl\nm✝ n✝ k l m n : ℕ\nhn : n > 0\n⊢ m % (n * 0) / n = m / n % 0\ncase inr.inr m✝ n✝ k✝ l m n k : ℕ hn : n > 0 hk : k > 0 ⊢ m % (n * k) / n = m / n % k\n[PROOFSTEP]\nsimp [mod_zero]\n[GOAL]\ncase inr.inr\nm✝ n✝ k✝ l m n k : ℕ\nhn : n > 0\nhk : k > 0\n⊢ m % (n * k) / n = m / n % k\n[PROOFSTEP]\nconv_rhs => rw [← mod_add_div m (n * k)]\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhn : n > 0\nhk : k > 0\n| m / n % k\n[PROOFSTEP]\nrw [← mod_add_div m (n * k)]\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhn : n > 0\nhk : k > 0\n| m / n % k\n[PROOFSTEP]\nrw [← mod_add_div m (n * k)]\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\nhn : n > 0\nhk : k > 0\n| m / n % k\n[PROOFSTEP]\nrw [← mod_add_div m (n * k)]\n[GOAL]\ncase inr.inr\nm✝ n✝ k✝ l m n k : ℕ\nhn : n > 0\nhk : k > 0\n⊢ m % (n * k) / n = (m % (n * k) + n * k * (m / (n * k))) / n % k\n[PROOFSTEP]\nrw [mul_assoc, add_mul_div_left _ _ hn, add_mul_mod_self_left,\n mod_eq_of_lt (Nat.div_lt_of_lt_mul (mod_lt _ (mul_pos hn hk)))]\n[GOAL]\nm✝ n✝ k✝ l m n k : ℕ\n⊢ m % (k * n) / n = m / n % k\n[PROOFSTEP]\nrw [mul_comm k, mod_mul_right_div_self]\n[GOAL]\nm n k l : ℕ\nh1 : 0 < n\nh2 : n < m\n⊢ ¬m ∣ n\n[PROOFSTEP]\nrintro ⟨k, rfl⟩\n[GOAL]\ncase intro\nm k✝ l k : ℕ\nh1 : 0 < m * k\nh2 : m * k < m\n⊢ False\n[PROOFSTEP]\nrcases Nat.eq_zero_or_pos k with (rfl | hk)\n[GOAL]\ncase intro.inl\nm k l : ℕ\nh1 : 0 < m * 0\nh2 : m * 0 < m\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl 0 h1\n[GOAL]\ncase intro.inr\nm k✝ l k : ℕ\nh1 : 0 < m * k\nh2 : m * k < m\nhk : k > 0\n⊢ False\n[PROOFSTEP]\nexact not_lt.2 (le_mul_of_pos_right hk) h2\n[GOAL]\nm n k l : ℕ\nh : m % k = n % k\n⊢ (m - n) % k = 0\n[PROOFSTEP]\nrw [← Nat.mod_add_div m k, ← Nat.mod_add_div n k, ← h, tsub_add_eq_tsub_tsub, @add_tsub_cancel_left, ← mul_tsub k,\n Nat.mul_mod_right]\n[GOAL]\nm n k l : ℕ\n⊢ (m + n) % k = if k ≤ m % k + n % k then m % k + n % k - k else m % k + n % k\n[PROOFSTEP]\ncases k\n[GOAL]\ncase zero\nm n l : ℕ\n⊢ (m + n) % zero = if zero ≤ m % zero + n % zero then m % zero + n % zero - zero else m % zero + n % zero\ncase succ\nm n l n✝ : ℕ\n⊢ (m + n) % succ n✝ =\n if succ n✝ ≤ m % succ n✝ + n % succ n✝ then m % succ n✝ + n % succ n✝ - succ n✝ else m % succ n✝ + n % succ n✝\n[PROOFSTEP]\nsimp [mod_zero]\n[GOAL]\ncase succ\nm n l n✝ : ℕ\n⊢ (m + n) % succ n✝ =\n if succ n✝ ≤ m % succ n✝ + n % succ n✝ then m % succ n✝ + n % succ n✝ - succ n✝ else m % succ n✝ + n % succ n✝\n[PROOFSTEP]\nrw [Nat.add_mod]\n[GOAL]\ncase succ\nm n l n✝ : ℕ\n⊢ (m % succ n✝ + n % succ n✝) % succ n✝ =\n if succ n✝ ≤ m % succ n✝ + n % succ n✝ then m % succ n✝ + n % succ n✝ - succ n✝ else m % succ n✝ + n % succ n✝\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nm n l n✝ : ℕ\nh : succ n✝ ≤ m % succ n✝ + n % succ n✝\n⊢ (m % succ n✝ + n % succ n✝) % succ n✝ = m % succ n✝ + n % succ n✝ - succ n✝\n[PROOFSTEP]\nrw [Nat.mod_eq_sub_mod h, Nat.mod_eq_of_lt]\n[GOAL]\ncase pos\nm n l n✝ : ℕ\nh : succ n✝ ≤ m % succ n✝ + n % succ n✝\n⊢ m % succ n✝ + n % succ n✝ - succ n✝ < succ n✝\n[PROOFSTEP]\nexact (tsub_lt_iff_right h).mpr (Nat.add_lt_add (m.mod_lt (zero_lt_succ _)) (n.mod_lt (zero_lt_succ _)))\n[GOAL]\ncase neg\nm n l n✝ : ℕ\nh : ¬succ n✝ ≤ m % succ n✝ + n % succ n✝\n⊢ (m % succ n✝ + n % succ n✝) % succ n✝ = m % succ n✝ + n % succ n✝\n[PROOFSTEP]\nexact Nat.mod_eq_of_lt (lt_of_not_ge h)\n[GOAL]\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nexi1 : ∃ x, m = n * x\nexi2 : ∃ y, k = l * y\nhn : n = 0\n⊢ m / n * (k / l) = m * k / (n * l)\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nexi1 : ∃ x, m = n * x\nexi2 : ∃ y, k = l * y\nhn : ¬n = 0\nthis : 0 < n\nhl : l = 0\n⊢ m / n * (k / l) = m * k / (n * l)\n[PROOFSTEP]\nsimp [hl]\n[GOAL]\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nexi1 : ∃ x, m = n * x\nexi2 : ∃ y, k = l * y\nhn : ¬n = 0\nthis : 0 < n\nhl : ¬l = 0\n⊢ m / n * (k / l) = m * k / (n * l)\n[PROOFSTEP]\nhave : 0 < l := Nat.pos_of_ne_zero hl\n[GOAL]\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nexi1 : ∃ x, m = n * x\nexi2 : ∃ y, k = l * y\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\n⊢ m / n * (k / l) = m * k / (n * l)\n[PROOFSTEP]\ncases' exi1 with x hx\n[GOAL]\ncase intro\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nexi2 : ∃ y, k = l * y\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\n⊢ m / n * (k / l) = m * k / (n * l)\n[PROOFSTEP]\ncases' exi2 with y hy\n[GOAL]\ncase intro.intro\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ m / n * (k / l) = m * k / (n * l)\n[PROOFSTEP]\nrw [hx, hy, Nat.mul_div_cancel_left, Nat.mul_div_cancel_left]\n[GOAL]\ncase intro.intro\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ x * y = n * x * (l * y) / (n * l)\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < l\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase intro.intro.h\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ n * x * (l * y) / (n * l) = x * y\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < l\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n\n[PROOFSTEP]\napply Nat.div_eq_of_eq_mul_left\n[GOAL]\ncase intro.intro.h.H1\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n * l\ncase intro.intro.h.H2\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ n * x * (l * y) = x * y * (n * l)\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < l\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n\n[PROOFSTEP]\napply mul_pos\n[GOAL]\ncase intro.intro.h.H1.ha\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n\ncase intro.intro.h.H1.hb\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < l\ncase intro.intro.h.H2\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ n * x * (l * y) = x * y * (n * l)\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < l\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n\n[PROOFSTEP]\nrepeat'\n assumption\n -- Porting note: this line was `cc` in Lean3\n[GOAL]\ncase intro.intro.h.H1.ha\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n\n[PROOFSTEP]\nassumption\n -- Porting note: this line was `cc` in Lean3\n[GOAL]\ncase intro.intro.h.H1.hb\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < l\n[PROOFSTEP]\nassumption\n -- Porting note: this line was `cc` in Lean3\n[GOAL]\ncase intro.intro.h.H2\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ n * x * (l * y) = x * y * (n * l)\n[PROOFSTEP]\nassumption\n -- Porting note: this line was `cc` in Lean3\n[GOAL]\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < l\n[PROOFSTEP]\nassumption\n -- Porting note: this line was `cc` in Lean3\n[GOAL]\ncase intro.intro.H\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ 0 < n\n[PROOFSTEP]\nassumption\n -- Porting note: this line was `cc` in Lean3\n[GOAL]\ncase intro.intro.h.H2\nm n k l : ℕ\nhmn : n ∣ m\nhkl : l ∣ k\nhn : ¬n = 0\nthis✝ : 0 < n\nhl : ¬l = 0\nthis : 0 < l\nx : ℕ\nhx : m = n * x\ny : ℕ\nhy : k = l * y\n⊢ n * x * (l * y) = x * y * (n * l)\n[PROOFSTEP]\nsimp only [mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\nm n k l : ℕ\n⊢ m / n = m ↔ m = 0 ∨ n = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nm n k l : ℕ\n⊢ m / n = m → m = 0 ∨ n = 1\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nm n k l : ℕ\na✝ : m / n = m\n⊢ m = 0 ∨ n = 1\n[PROOFSTEP]\nmatch n with\n| 0 => simp_all\n| 1 =>\n right\n rfl\n| n + 2 =>\n left\n have : m / (n + 2) ≤ m / 2 := div_le_div_left (by simp) (by decide)\n refine eq_zero_of_le_half ?_\n simp_all\n[GOAL]\nm n k l : ℕ\na✝ : m / 0 = m\n⊢ m = 0 ∨ 0 = 1\n[PROOFSTEP]\nsimp_all\n[GOAL]\nm n k l : ℕ\na✝ : m / 1 = m\n⊢ m = 0 ∨ 1 = 1\n[PROOFSTEP]\nright\n[GOAL]\ncase h\nm n k l : ℕ\na✝ : m / 1 = m\n⊢ 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nm n✝ k l n : ℕ\na✝ : m / (n + 2) = m\n⊢ m = 0 ∨ n + 2 = 1\n[PROOFSTEP]\nleft\n[GOAL]\ncase h\nm n✝ k l n : ℕ\na✝ : m / (n + 2) = m\n⊢ m = 0\n[PROOFSTEP]\nhave : m / (n + 2) ≤ m / 2 := div_le_div_left (by simp) (by decide)\n[GOAL]\nm n✝ k l n : ℕ\na✝ : m / (n + 2) = m\n⊢ 2 ≤ n + 2\n[PROOFSTEP]\nsimp\n[GOAL]\nm n✝ k l n : ℕ\na✝ : m / (n + 2) = m\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h\nm n✝ k l n : ℕ\na✝ : m / (n + 2) = m\nthis : m / (n + 2) ≤ m / 2\n⊢ m = 0\n[PROOFSTEP]\nrefine eq_zero_of_le_half ?_\n[GOAL]\ncase h\nm n✝ k l n : ℕ\na✝ : m / (n + 2) = m\nthis : m / (n + 2) ≤ m / 2\n⊢ m ≤ m / 2\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase mpr\nm n k l : ℕ\n⊢ m = 0 ∨ n = 1 → m / n = m\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase mpr.inl\nn k l : ℕ\n⊢ 0 / n = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.inr\nm k l : ℕ\n⊢ m / 1 = m\n[PROOFSTEP]\nsimp\n[GOAL]\nm n k l : ℕ\n⊢ m / n = (m - m % n) / n\n[PROOFSTEP]\nby_cases n0 : n = 0\n[GOAL]\ncase pos\nm n k l : ℕ\nn0 : n = 0\n⊢ m / n = (m - m % n) / n\n[PROOFSTEP]\nrw [n0, Nat.div_zero, Nat.div_zero]\n[GOAL]\ncase neg\nm n k l : ℕ\nn0 : ¬n = 0\n⊢ m / n = (m - m % n) / n\n[PROOFSTEP]\nhave : m - m % n = n * (m / n) := by rw [tsub_eq_iff_eq_add_of_le (Nat.mod_le _ _), add_comm, mod_add_div]\n[GOAL]\nm n k l : ℕ\nn0 : ¬n = 0\n⊢ m - m % n = n * (m / n)\n[PROOFSTEP]\nrw [tsub_eq_iff_eq_add_of_le (Nat.mod_le _ _), add_comm, mod_add_div]\n[GOAL]\ncase neg\nm n k l : ℕ\nn0 : ¬n = 0\nthis : m - m % n = n * (m / n)\n⊢ m / n = (m - m % n) / n\n[PROOFSTEP]\nrw [this, mul_div_right _ (Nat.pos_of_ne_zero n0)]\n[GOAL]\nm n k l : ℕ\nh1 : n * k < m\nh2 : m < n * (k + 1)\n⊢ ¬n ∣ m\n[PROOFSTEP]\nrintro ⟨d, rfl⟩\n[GOAL]\ncase intro\nn k l d : ℕ\nh1 : n * k < n * d\nh2 : n * d < n * (k + 1)\n⊢ False\n[PROOFSTEP]\nexact Monotone.ne_of_lt_of_lt_nat (Covariant.monotone_of_const n) k h1 h2 d rfl\n[GOAL]\nm n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nh : ∃ n, p n\n⊢ 0 < Nat.find h ↔ ¬p 0\n[PROOFSTEP]\nrw [pos_iff_ne_zero, Ne, Nat.find_eq_zero]\n[GOAL]\nm n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\n⊢ Nat.find hₘ + n = Nat.find hₙ\n[PROOFSTEP]\nrefine ((le_find_iff _ _).2 fun m hm hpm => hm.not_le ?_).antisymm ?_\n[GOAL]\ncase refine_1\nm✝ n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\nm : ℕ\nhm : m < Nat.find hₘ + n\nhpm : p m\n⊢ Nat.find hₘ + n ≤ m\n[PROOFSTEP]\nhave hnm : n ≤ m := hn.trans (find_le hpm)\n[GOAL]\ncase refine_1\nm✝ n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\nm : ℕ\nhm : m < Nat.find hₘ + n\nhpm : p m\nhnm : n ≤ m\n⊢ Nat.find hₘ + n ≤ m\n[PROOFSTEP]\nrefine add_le_of_le_tsub_right_of_le hnm (find_le ?_)\n[GOAL]\ncase refine_1\nm✝ n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\nm : ℕ\nhm : m < Nat.find hₘ + n\nhpm : p m\nhnm : n ≤ m\n⊢ p (m - n + n)\n[PROOFSTEP]\nrwa [tsub_add_cancel_of_le hnm]\n[GOAL]\ncase refine_2\nm n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\n⊢ Nat.find hₙ ≤ Nat.find hₘ + n\n[PROOFSTEP]\nrw [← tsub_le_iff_right]\n[GOAL]\ncase refine_2\nm n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\n⊢ Nat.find hₙ - n ≤ Nat.find hₘ\n[PROOFSTEP]\nrefine (le_find_iff _ _).2 fun m hm hpm => hm.not_le ?_\n[GOAL]\ncase refine_2\nm✝ n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\nm : ℕ\nhm : m < Nat.find hₙ - n\nhpm : p (m + n)\n⊢ Nat.find hₙ - n ≤ m\n[PROOFSTEP]\nrw [tsub_le_iff_right]\n[GOAL]\ncase refine_2\nm✝ n k l : ℕ\np q : ℕ → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nhₘ : ∃ m, p (m + n)\nhₙ : ∃ n, p n\nhn : n ≤ Nat.find hₙ\nm : ℕ\nhm : m < Nat.find hₙ - n\nhpm : p (m + n)\n⊢ Nat.find hₙ ≤ m + n\n[PROOFSTEP]\nexact find_le hpm\n[GOAL]\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\n⊢ Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\n[PROOFSTEP]\ninduction' k with k ihk generalizing m\n[GOAL]\ncase zero\nm✝ n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nm : ℕ\n⊢ Nat.findGreatest P zero = m ↔ m ≤ zero ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ zero → ¬P n\n[PROOFSTEP]\nrw [eq_comm, Iff.comm]\n[GOAL]\ncase zero\nm✝ n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nm : ℕ\n⊢ (m ≤ zero ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ zero → ¬P n) ↔ m = Nat.findGreatest P zero\n[PROOFSTEP]\nsimp only [zero_eq, nonpos_iff_eq_zero, ne_eq, findGreatest_zero, and_iff_left_iff_imp]\n[GOAL]\ncase zero\nm✝ n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nm : ℕ\n⊢ m = 0 → (¬m = 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n = 0 → ¬P n\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase zero\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\n⊢ (¬0 = 0 → P 0) ∧ ∀ ⦃n : ℕ⦄, 0 < n → n = 0 → ¬P n\n[PROOFSTEP]\nexact ⟨fun h => (h rfl).elim, fun n hlt heq => (hlt.ne heq.symm).elim⟩\n[GOAL]\ncase succ\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\n⊢ Nat.findGreatest P (succ k) = m ↔ m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nby_cases hk : P (k + 1)\n[GOAL]\ncase pos\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : P (k + 1)\n⊢ Nat.findGreatest P (succ k) = m ↔ m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nrw [findGreatest_eq hk]\n[GOAL]\ncase pos\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : P (k + 1)\n⊢ k + 1 = m ↔ m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase pos.mp\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : P (k + 1)\n⊢ k + 1 = m → m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase pos.mp\nm n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nhk : P (k + 1)\n⊢ k + 1 ≤ succ k ∧ (k + 1 ≠ 0 → P (k + 1)) ∧ ∀ ⦃n : ℕ⦄, k + 1 < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nexact ⟨le_rfl, fun _ => hk, fun n hlt hle => (hlt.not_le hle).elim⟩\n[GOAL]\ncase pos.mpr\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : P (k + 1)\n⊢ (m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n) → k + 1 = m\n[PROOFSTEP]\nrintro ⟨hle, h0, hm⟩\n[GOAL]\ncase pos.mpr.intro.intro\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : P (k + 1)\nhle : m ≤ succ k\nh0 : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n⊢ k + 1 = m\n[PROOFSTEP]\nrcases Decidable.eq_or_lt_of_le hle with (rfl | hlt)\n[GOAL]\ncase pos.mpr.intro.intro.inl\nm n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nhk : P (k + 1)\nhle : succ k ≤ succ k\nh0 : succ k ≠ 0 → P (succ k)\nhm : ∀ ⦃n : ℕ⦄, succ k < n → n ≤ succ k → ¬P n\n⊢ k + 1 = succ k\ncase pos.mpr.intro.intro.inr\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : P (k + 1)\nhle : m ≤ succ k\nh0 : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\nhlt : m < succ k\n⊢ k + 1 = m\n[PROOFSTEP]\nexacts [rfl, (hm hlt le_rfl hk).elim]\n[GOAL]\ncase neg\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\n⊢ Nat.findGreatest P (succ k) = m ↔ m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nrw [findGreatest_of_not hk, ihk]\n[GOAL]\ncase neg\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\n⊢ (m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n) ↔\n m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.mp\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\n⊢ (m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n) →\n m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nrintro ⟨hle, hP, hm⟩\n[GOAL]\ncase neg.mp.intro.intro\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\nhle : m ≤ k\nhP : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\n⊢ m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n[PROOFSTEP]\nrefine ⟨hle.trans k.le_succ, hP, fun n hlt hle => ?_⟩\n[GOAL]\ncase neg.mp.intro.intro\nm✝ n✝ k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\nhle✝ : m ≤ k\nhP : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nn : ℕ\nhlt : m < n\nhle : n ≤ succ k\n⊢ ¬P n\n[PROOFSTEP]\nrcases Decidable.eq_or_lt_of_le hle with (rfl | hlt')\n[GOAL]\ncase neg.mp.intro.intro.inl\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\nhle✝ : m ≤ k\nhP : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nhlt : m < succ k\nhle : succ k ≤ succ k\n⊢ ¬P (succ k)\ncase neg.mp.intro.intro.inr\nm✝ n✝ k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\nhle✝ : m ≤ k\nhP : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nn : ℕ\nhlt : m < n\nhle : n ≤ succ k\nhlt' : n < succ k\n⊢ ¬P n\n[PROOFSTEP]\nexacts [hk, hm hlt <| lt_succ_iff.1 hlt']\n[GOAL]\ncase neg.mpr\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\n⊢ (m ≤ succ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n) →\n m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\n[PROOFSTEP]\nrintro ⟨hle, hP, hm⟩\n[GOAL]\ncase neg.mpr.intro.intro\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\nhle : m ≤ succ k\nhP : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n⊢ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\n[PROOFSTEP]\nrefine ⟨lt_succ_iff.1 (hle.lt_of_ne ?_), hP, fun n hlt hle => hm hlt (hle.trans k.le_succ)⟩\n[GOAL]\ncase neg.mpr.intro.intro\nm✝ n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nm : ℕ\nhk : ¬P (k + 1)\nhle : m ≤ succ k\nhP : m ≠ 0 → P m\nhm : ∀ ⦃n : ℕ⦄, m < n → n ≤ succ k → ¬P n\n⊢ m ≠ succ k\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.mpr.intro.intro\nm n k✝ l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nk : ℕ\nihk : ∀ {m : ℕ}, Nat.findGreatest P k = m ↔ m ≤ k ∧ (m ≠ 0 → P m) ∧ ∀ ⦃n : ℕ⦄, m < n → n ≤ k → ¬P n\nhk : ¬P (k + 1)\nhle : succ k ≤ succ k\nhP : succ k ≠ 0 → P (succ k)\nhm : ∀ ⦃n : ℕ⦄, succ k < n → n ≤ succ k → ¬P n\n⊢ False\n[PROOFSTEP]\nexact hk (hP k.succ_ne_zero)\n[GOAL]\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\n⊢ Nat.findGreatest P k = 0 ↔ ∀ ⦃n : ℕ⦄, 0 < n → n ≤ k → ¬P n\n[PROOFSTEP]\nsimp [findGreatest_eq_iff]\n[GOAL]\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nhmb : m ≤ n\nhm : P m\n⊢ P (Nat.findGreatest P n)\n[PROOFSTEP]\nby_cases h : Nat.findGreatest P n = 0\n[GOAL]\ncase pos\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nhmb : m ≤ n\nhm : P m\nh : Nat.findGreatest P n = 0\n⊢ P (Nat.findGreatest P n)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase pos.zero\nn k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nh : Nat.findGreatest P n = 0\nhmb : zero ≤ n\nhm : P zero\n⊢ P (Nat.findGreatest P n)\n[PROOFSTEP]\nrwa [h]\n[GOAL]\ncase pos.succ\nn k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nh : Nat.findGreatest P n = 0\nn✝ : ℕ\nhmb : succ n✝ ≤ n\nhm : P (succ n✝)\n⊢ P (Nat.findGreatest P n)\n[PROOFSTEP]\nexact ((findGreatest_eq_zero_iff.1 h) (zero_lt_succ _) hmb hm).elim\n[GOAL]\ncase neg\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝ : DecidablePred P\nhmb : m ≤ n\nhm : P m\nh : ¬Nat.findGreatest P n = 0\n⊢ P (Nat.findGreatest P n)\n[PROOFSTEP]\nexact (findGreatest_eq_iff.1 rfl).2.1 h\n[GOAL]\nm n k l : ℕ\nP✝ Q : ℕ → Prop\ninst✝¹ : DecidablePred P✝\nP : ℕ → Prop\ninst✝ : DecidablePred P\n⊢ Monotone (Nat.findGreatest P)\n[PROOFSTEP]\nrefine monotone_nat_of_le_succ fun n => ?_\n[GOAL]\nm n✝ k l : ℕ\nP✝ Q : ℕ → Prop\ninst✝¹ : DecidablePred P✝\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\n⊢ Nat.findGreatest P n ≤ Nat.findGreatest P (n + 1)\n[PROOFSTEP]\nrw [findGreatest_succ]\n[GOAL]\nm n✝ k l : ℕ\nP✝ Q : ℕ → Prop\ninst✝¹ : DecidablePred P✝\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\n⊢ Nat.findGreatest P n ≤ if P (n + 1) then n + 1 else Nat.findGreatest P n\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nm n✝ k l : ℕ\nP✝ Q : ℕ → Prop\ninst✝¹ : DecidablePred P✝\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh✝ : P (n + 1)\n⊢ Nat.findGreatest P n ≤ n + 1\n[PROOFSTEP]\nexact (findGreatest_le n).trans (le_succ _)\n[GOAL]\ncase neg\nm n✝ k l : ℕ\nP✝ Q : ℕ → Prop\ninst✝¹ : DecidablePred P✝\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh✝ : ¬P (n + 1)\n⊢ Nat.findGreatest P n ≤ Nat.findGreatest P n\n[PROOFSTEP]\nrfl\n[GOAL]\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝¹ : DecidablePred P\ninst✝ : DecidablePred Q\nhPQ : P ≤ Q\n⊢ Nat.findGreatest P ≤ Nat.findGreatest Q\n[PROOFSTEP]\nintro n\n[GOAL]\nm n✝ k l : ℕ\nP Q : ℕ → Prop\ninst✝¹ : DecidablePred P\ninst✝ : DecidablePred Q\nhPQ : P ≤ Q\nn : ℕ\n⊢ Nat.findGreatest P n ≤ Nat.findGreatest Q n\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nm n k l : ℕ\nP Q : ℕ → Prop\ninst✝¹ : DecidablePred P\ninst✝ : DecidablePred Q\nhPQ : P ≤ Q\n⊢ Nat.findGreatest P zero ≤ Nat.findGreatest Q zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nm n✝ k l : ℕ\nP Q : ℕ → Prop\ninst✝¹ : DecidablePred P\ninst✝ : DecidablePred Q\nhPQ : P ≤ Q\nn : ℕ\nhn : Nat.findGreatest P n ≤ Nat.findGreatest Q n\n⊢ Nat.findGreatest P (succ n) ≤ Nat.findGreatest Q (succ n)\n[PROOFSTEP]\nby_cases h : P (n + 1)\n[GOAL]\ncase pos\nm n✝ k l : ℕ\nP Q : ℕ → Prop\ninst✝¹ : DecidablePred P\ninst✝ : DecidablePred Q\nhPQ : P ≤ Q\nn : ℕ\nhn : Nat.findGreatest P n ≤ Nat.findGreatest Q n\nh : P (n + 1)\n⊢ Nat.findGreatest P (succ n) ≤ Nat.findGreatest Q (succ n)\n[PROOFSTEP]\nrw [findGreatest_eq h, findGreatest_eq (hPQ _ h)]\n[GOAL]\ncase neg\nm n✝ k l : ℕ\nP Q : ℕ → Prop\ninst✝¹ : DecidablePred P\ninst✝ : DecidablePred Q\nhPQ : P ≤ Q\nn : ℕ\nhn : Nat.findGreatest P n ≤ Nat.findGreatest Q n\nh : ¬P (n + 1)\n⊢ Nat.findGreatest P (succ n) ≤ Nat.findGreatest Q (succ n)\n[PROOFSTEP]\nrw [findGreatest_of_not h]\n[GOAL]\ncase neg\nm n✝ k l : ℕ\nP Q : ℕ → Prop\ninst✝¹ : DecidablePred P\ninst✝ : DecidablePred Q\nhPQ : P ≤ Q\nn : ℕ\nhn : Nat.findGreatest P n ≤ Nat.findGreatest Q n\nh : ¬P (n + 1)\n⊢ Nat.findGreatest P n ≤ Nat.findGreatest Q (succ n)\n[PROOFSTEP]\nexact hn.trans (Nat.findGreatest_mono_right _ <| le_succ _)\n[GOAL]\nm n k l : ℕ\nh : bit0 m ≤ bit1 n\n⊢ m ≤ n\n[PROOFSTEP]\nrwa [← Nat.lt_succ_iff, n.bit1_eq_succ_bit0, ← n.bit0_succ_eq, bit0_lt_bit0, Nat.lt_succ_iff] at h \n[GOAL]\nm n k l : ℕ\nh : bit1 m ≤ bit0 n\n⊢ m < n\n[PROOFSTEP]\nrwa [m.bit1_eq_succ_bit0, succ_le_iff, bit0_lt_bit0] at h \n[GOAL]\nm n k l lo hi : ℕ\nP : ℕ → Prop\nH : DecidablePred P\nal : ∀ (x : ℕ), x < hi - lo → P (lo + x)\nx : ℕ\nhl : lo ≤ x\nhh : x < hi\n⊢ P x\n[PROOFSTEP]\nhave := al (x - lo) ((tsub_lt_tsub_iff_right hl).mpr hh)\n[GOAL]\nm n k l lo hi : ℕ\nP : ℕ → Prop\nH : DecidablePred P\nal : ∀ (x : ℕ), x < hi - lo → P (lo + x)\nx : ℕ\nhl : lo ≤ x\nhh : x < hi\nthis : P (lo + (x - lo))\n⊢ P x\n[PROOFSTEP]\nrwa [add_tsub_cancel_of_le hl] at this \n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Order.Basic", "llama_tokens": 28885, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519527944504227, "lm_q2_score": 0.7154239897159439, "lm_q1q2_score": 0.6095074672553689}} {"text": "[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ x ∈ antidiagonal n ↔ x.fst + x.snd = n\n[PROOFSTEP]\nrw [antidiagonal, mem_def, Multiset.Nat.mem_antidiagonal]\n[GOAL]\nn : ℕ\n⊢ card (antidiagonal n) = n + 1\n[PROOFSTEP]\nsimp [antidiagonal]\n[GOAL]\nn : ℕ\n⊢ ¬(0, n + 1) ∈\n map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)) (antidiagonal n)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 1) =\n cons (0, n + 1)\n (map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)) (antidiagonal n))\n (_ :\n ¬(0, n + 1) ∈\n map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ))\n (antidiagonal n))\n[PROOFSTEP]\napply eq_of_veq\n[GOAL]\ncase a\nn : ℕ\n⊢ (antidiagonal (n + 1)).val =\n (cons (0, n + 1)\n (map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)) (antidiagonal n))\n (_ :\n ¬(0, n + 1) ∈\n map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ))\n (antidiagonal n))).val\n[PROOFSTEP]\nrw [cons_val, map_val]\n[GOAL]\ncase a\nn : ℕ\n⊢ (antidiagonal (n + 1)).val =\n (0, n + 1) ::ₘ\n Multiset.map (↑(Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)))\n (antidiagonal n).val\n[PROOFSTEP]\napply Multiset.Nat.antidiagonal_succ\n[GOAL]\nn : ℕ\n⊢ ¬(n + 1, 0) ∈\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective }) (antidiagonal n)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 1) =\n cons (n + 1, 0)\n (map (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective }) (antidiagonal n))\n (_ :\n ¬(n + 1, 0) ∈\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))\n[PROOFSTEP]\napply eq_of_veq\n[GOAL]\ncase a\nn : ℕ\n⊢ (antidiagonal (n + 1)).val =\n (cons (n + 1, 0)\n (map (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective }) (antidiagonal n))\n (_ :\n ¬(n + 1, 0) ∈\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))).val\n[PROOFSTEP]\nrw [cons_val, map_val]\n[GOAL]\ncase a\nn : ℕ\n⊢ (antidiagonal (n + 1)).val =\n (n + 1, 0) ::ₘ\n Multiset.map (↑(Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective }))\n (antidiagonal n).val\n[PROOFSTEP]\nexact Multiset.Nat.antidiagonal_succ'\n[GOAL]\nn : ℕ\n⊢ ¬(n + 2, 0) ∈\n map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ ¬(0, n + 2) ∈\n cons (n + 2, 0)\n (map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))\n (_ :\n ¬(n + 2, 0) ∈\n map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 2) =\n cons (0, n + 2)\n (cons (n + 2, 0)\n (map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))\n (_ :\n ¬(n + 2, 0) ∈\n map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n)))\n (_ :\n ¬(0, n + 2) ∈\n cons (n + 2, 0)\n (map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))\n (_ :\n ¬(n + 2, 0) ∈\n map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n)))\n[PROOFSTEP]\nsimp_rw [antidiagonal_succ (n + 1), antidiagonal_succ', Finset.map_cons, map_map]\n[GOAL]\nn : ℕ\n⊢ cons (0, n + 1 + 1)\n (cons (↑(Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)) (n + 1, 0))\n (map\n (Embedding.trans (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective })\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)))\n (antidiagonal n))\n (_ :\n ¬↑(Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)) (n + 1, 0) ∈\n map\n (Embedding.trans\n (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective })\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)))\n (antidiagonal n)))\n (_ :\n ¬(0, n + 1 + 1) ∈\n cons (↑(Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)) (n + 1, 0))\n (map\n (Embedding.trans\n (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective })\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)))\n (antidiagonal n))\n (_ :\n ¬↑(Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)) (n + 1, 0) ∈\n map\n (Embedding.trans\n (Embedding.prodMap (Embedding.refl ℕ) { toFun := Nat.succ, inj' := Nat.succ_injective })\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ)))\n (antidiagonal n))) =\n cons (0, n + 2)\n (cons (n + 2, 0)\n (map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))\n (_ :\n ¬(n + 2, 0) ∈\n map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n)))\n (_ :\n ¬(0, n + 2) ∈\n cons (n + 2, 0)\n (map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n))\n (_ :\n ¬(n + 2, 0) ∈\n map\n (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }\n { toFun := Nat.succ, inj' := Nat.succ_injective })\n (antidiagonal n)))\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ (map { toFun := Prod.swap, inj' := (_ : Injective Prod.swap) } (antidiagonal n)).val = (antidiagonal n).val\n[PROOFSTEP]\nsimp [antidiagonal, Multiset.Nat.map_swap_antidiagonal]\n[GOAL]\nn : ℕ\np q : ℕ × ℕ\nhp : p ∈ antidiagonal n\nhq : q ∈ antidiagonal n\n⊢ p = q ↔ p.fst = q.fst\n[PROOFSTEP]\nrefine' ⟨congr_arg Prod.fst, fun h ↦ Prod.ext h ((add_right_inj q.fst).mp _)⟩\n[GOAL]\nn : ℕ\np q : ℕ × ℕ\nhp : p ∈ antidiagonal n\nhq : q ∈ antidiagonal n\nh : p.fst = q.fst\n⊢ q.fst + p.snd = q.fst + q.snd\n[PROOFSTEP]\nrw [mem_antidiagonal] at hp hq \n[GOAL]\nn : ℕ\np q : ℕ × ℕ\nhp : p.fst + p.snd = n\nhq : q.fst + q.snd = n\nh : p.fst = q.fst\n⊢ q.fst + p.snd = q.fst + q.snd\n[PROOFSTEP]\nrw [hq, ← h, hp]\n[GOAL]\nn : ℕ\nkl : ℕ × ℕ\nhlk : kl ∈ antidiagonal n\n⊢ kl.fst ≤ n\n[PROOFSTEP]\nrw [le_iff_exists_add]\n[GOAL]\nn : ℕ\nkl : ℕ × ℕ\nhlk : kl ∈ antidiagonal n\n⊢ ∃ c, n = kl.fst + c\n[PROOFSTEP]\nuse kl.2\n[GOAL]\ncase h\nn : ℕ\nkl : ℕ × ℕ\nhlk : kl ∈ antidiagonal n\n⊢ n = kl.fst + kl.snd\n[PROOFSTEP]\nrwa [mem_antidiagonal, eq_comm] at hlk \n[GOAL]\nn : ℕ\nkl : ℕ × ℕ\nhlk : kl ∈ antidiagonal n\n⊢ kl.snd ≤ n\n[PROOFSTEP]\nrw [le_iff_exists_add]\n[GOAL]\nn : ℕ\nkl : ℕ × ℕ\nhlk : kl ∈ antidiagonal n\n⊢ ∃ c, n = kl.snd + c\n[PROOFSTEP]\nuse kl.1\n[GOAL]\ncase h\nn : ℕ\nkl : ℕ × ℕ\nhlk : kl ∈ antidiagonal n\n⊢ n = kl.snd + kl.fst\n[PROOFSTEP]\nrwa [mem_antidiagonal, eq_comm, add_comm] at hlk \n[GOAL]\nn m : ℕ\n⊢ filter (fun x => x.fst = m) (antidiagonal n) = if m ≤ n then {(m, n - m)} else ∅\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase a.mk\nn m x y : ℕ\n⊢ (x, y) ∈ filter (fun x => x.fst = m) (antidiagonal n) ↔ (x, y) ∈ if m ≤ n then {(m, n - m)} else ∅\n[PROOFSTEP]\nsimp only [mem_filter, Nat.mem_antidiagonal]\n[GOAL]\ncase a.mk\nn m x y : ℕ\n⊢ x + y = n ∧ x = m ↔ (x, y) ∈ if m ≤ n then {(m, n - m)} else ∅\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nn m x y : ℕ\nh : m ≤ n\n⊢ x + y = n ∧ x = m ↔ (x, y) ∈ {(m, n - m)}\n[PROOFSTEP]\nsimp (config := { contextual := true }) [and_comm, eq_tsub_iff_add_eq_of_le h, add_comm]\n[GOAL]\ncase neg\nn m x y : ℕ\nh : ¬m ≤ n\n⊢ x + y = n ∧ x = m ↔ (x, y) ∈ ∅\n[PROOFSTEP]\nrw [not_le] at h \n[GOAL]\ncase neg\nn m x y : ℕ\nh : n < m\n⊢ x + y = n ∧ x = m ↔ (x, y) ∈ ∅\n[PROOFSTEP]\nsimp only [not_mem_empty, iff_false_iff, not_and, decide_eq_true_eq]\n[GOAL]\ncase neg\nn m x y : ℕ\nh : n < m\n⊢ x + y = n → ¬x = m\n[PROOFSTEP]\nexact fun hn => ne_of_lt (lt_of_le_of_lt (le_self_add.trans hn.le) h)\n[GOAL]\nn m : ℕ\n⊢ filter (fun x => x.snd = m) (antidiagonal n) = if m ≤ n then {(n - m, m)} else ∅\n[PROOFSTEP]\nhave : (fun x : ℕ × ℕ ↦ (x.snd = m)) ∘ Prod.swap = fun x : ℕ × ℕ ↦ x.fst = m := by ext; simp\n[GOAL]\nn m : ℕ\n⊢ (fun x => x.snd = m) ∘ Prod.swap = fun x => x.fst = m\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nn m : ℕ\nx✝ : ℕ × ℕ\n⊢ ((fun x => x.snd = m) ∘ Prod.swap) x✝ ↔ x✝.fst = m\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\nthis : (fun x => x.snd = m) ∘ Prod.swap = fun x => x.fst = m\n⊢ filter (fun x => x.snd = m) (antidiagonal n) = if m ≤ n then {(n - m, m)} else ∅\n[PROOFSTEP]\nrw [← map_swap_antidiagonal, filter_map]\n[GOAL]\nn m : ℕ\nthis : (fun x => x.snd = m) ∘ Prod.swap = fun x => x.fst = m\n⊢ map { toFun := Prod.swap, inj' := (_ : Injective Prod.swap) }\n (filter ((fun x => x.snd = m) ∘ ↑{ toFun := Prod.swap, inj' := (_ : Injective Prod.swap) }) (antidiagonal n)) =\n if m ≤ n then {(n - m, m)} else ∅\n[PROOFSTEP]\nsimp [this, filter_fst_eq_antidiagonal, apply_ite (Finset.map _)]\n[GOAL]\nn k : ℕ\nh : k ≤ n\n⊢ filter (fun a => a.snd ≤ k) (antidiagonal n) =\n map\n (Embedding.prodMap { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) }\n (Embedding.refl ℕ))\n (antidiagonal k)\n[PROOFSTEP]\next ⟨i, j⟩\n[GOAL]\ncase a.mk\nn k : ℕ\nh : k ≤ n\ni j : ℕ\n⊢ (i, j) ∈ filter (fun a => a.snd ≤ k) (antidiagonal n) ↔\n (i, j) ∈\n map\n (Embedding.prodMap { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) }\n (Embedding.refl ℕ))\n (antidiagonal k)\n[PROOFSTEP]\nsuffices : i + j = n ∧ j ≤ k ↔ ∃ a, a + j = k ∧ a + (n - k) = i\n[GOAL]\ncase a.mk\nn k : ℕ\nh : k ≤ n\ni j : ℕ\nthis : i + j = n ∧ j ≤ k ↔ ∃ a, a + j = k ∧ a + (n - k) = i\n⊢ (i, j) ∈ filter (fun a => a.snd ≤ k) (antidiagonal n) ↔\n (i, j) ∈\n map\n (Embedding.prodMap { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) }\n (Embedding.refl ℕ))\n (antidiagonal k)\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase this\nn k : ℕ\nh : k ≤ n\ni j : ℕ\n⊢ i + j = n ∧ j ≤ k ↔ ∃ a, a + j = k ∧ a + (n - k) = i\n[PROOFSTEP]\nrefine' ⟨fun hi ↦ ⟨k - j, tsub_add_cancel_of_le hi.2, _⟩, _⟩\n[GOAL]\ncase this.refine'_1\nn k : ℕ\nh : k ≤ n\ni j : ℕ\nhi : i + j = n ∧ j ≤ k\n⊢ k - j + (n - k) = i\n[PROOFSTEP]\nrw [add_comm, tsub_add_eq_add_tsub h, ← hi.1, add_assoc, Nat.add_sub_of_le hi.2, add_tsub_cancel_right]\n[GOAL]\ncase this.refine'_2\nn k : ℕ\nh : k ≤ n\ni j : ℕ\n⊢ (∃ a, a + j = k ∧ a + (n - k) = i) → i + j = n ∧ j ≤ k\n[PROOFSTEP]\nrintro ⟨l, hl, rfl⟩\n[GOAL]\ncase this.refine'_2.intro.intro\nn k : ℕ\nh : k ≤ n\nj l : ℕ\nhl : l + j = k\n⊢ l + (n - k) + j = n ∧ j ≤ k\n[PROOFSTEP]\nrefine' ⟨_, hl ▸ Nat.le_add_left j l⟩\n[GOAL]\ncase this.refine'_2.intro.intro\nn k : ℕ\nh : k ≤ n\nj l : ℕ\nhl : l + j = k\n⊢ l + (n - k) + j = n\n[PROOFSTEP]\nrw [add_assoc, add_comm, add_assoc, add_comm j l, hl]\n[GOAL]\ncase this.refine'_2.intro.intro\nn k : ℕ\nh : k ≤ n\nj l : ℕ\nhl : l + j = k\n⊢ n - k + k = n\n[PROOFSTEP]\nexact Nat.sub_add_cancel h\n[GOAL]\nn k : ℕ\nh : k ≤ n\n⊢ filter (fun a => a.fst ≤ k) (antidiagonal n) =\n map\n (Embedding.prodMap (Embedding.refl ℕ)\n { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) })\n (antidiagonal k)\n[PROOFSTEP]\nhave aux₁ : (fun a ↦ a.fst ≤ k) = (fun a ↦ a.snd ≤ k) ∘ (Equiv.prodComm ℕ ℕ).symm := rfl\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\n⊢ filter (fun a => a.fst ≤ k) (antidiagonal n) =\n map\n (Embedding.prodMap (Embedding.refl ℕ)\n { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) })\n (antidiagonal k)\n[PROOFSTEP]\nhave aux₂ : ∀ i j, (∃ a b, a + b = k ∧ b = i ∧ a + (n - k) = j) ↔ ∃ a b, a + b = k ∧ a = i ∧ b + (n - k) = j :=\n fun i j ↦ by rw [exists_comm]; exact exists₂_congr (fun a b ↦ by rw [add_comm])\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\ni j : ℕ\n⊢ (∃ a b, a + b = k ∧ b = i ∧ a + (n - k) = j) ↔ ∃ a b, a + b = k ∧ a = i ∧ b + (n - k) = j\n[PROOFSTEP]\nrw [exists_comm]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\ni j : ℕ\n⊢ (∃ b a, a + b = k ∧ b = i ∧ a + (n - k) = j) ↔ ∃ a b, a + b = k ∧ a = i ∧ b + (n - k) = j\n[PROOFSTEP]\nexact exists₂_congr (fun a b ↦ by rw [add_comm])\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\ni j a b : ℕ\n⊢ b + a = k ∧ a = i ∧ b + (n - k) = j ↔ a + b = k ∧ a = i ∧ b + (n - k) = j\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = k ∧ b = i ∧ a + (n - k) = j) ↔ ∃ a b, a + b = k ∧ a = i ∧ b + (n - k) = j\n⊢ filter (fun a => a.fst ≤ k) (antidiagonal n) =\n map\n (Embedding.prodMap (Embedding.refl ℕ)\n { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) })\n (antidiagonal k)\n[PROOFSTEP]\nrw [← map_prodComm_antidiagonal]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = k ∧ b = i ∧ a + (n - k) = j) ↔ ∃ a b, a + b = k ∧ a = i ∧ b + (n - k) = j\n⊢ filter (fun a => a.fst ≤ k) (map (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)) (antidiagonal n)) =\n map\n (Embedding.prodMap (Embedding.refl ℕ)\n { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) })\n (antidiagonal k)\n[PROOFSTEP]\nsimp_rw [aux₁, ← map_filter, antidiagonal_filter_snd_le_of_le h, map_map]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = k ∧ b = i ∧ a + (n - k) = j) ↔ ∃ a b, a + b = k ∧ a = i ∧ b + (n - k) = j\n⊢ map\n (Embedding.trans\n (Embedding.prodMap { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) }\n (Embedding.refl ℕ))\n (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)))\n (antidiagonal k) =\n map\n (Embedding.prodMap (Embedding.refl ℕ)\n { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) })\n (antidiagonal k)\n[PROOFSTEP]\next ⟨i, j⟩\n[GOAL]\ncase a.mk\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => a.fst ≤ k) = (fun a => a.snd ≤ k) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = k ∧ b = i ∧ a + (n - k) = j) ↔ ∃ a b, a + b = k ∧ a = i ∧ b + (n - k) = j\ni j : ℕ\n⊢ (i, j) ∈\n map\n (Embedding.trans\n (Embedding.prodMap { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) }\n (Embedding.refl ℕ))\n (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)))\n (antidiagonal k) ↔\n (i, j) ∈\n map\n (Embedding.prodMap (Embedding.refl ℕ)\n { toFun := fun x => x + (n - k), inj' := (_ : Injective fun x => x + (n - k)) })\n (antidiagonal k)\n[PROOFSTEP]\nsimpa using aux₂ i j\n[GOAL]\nn k : ℕ\nh : k ≤ n\n⊢ filter (fun a => k ≤ a.fst) (antidiagonal n) =\n map (Embedding.prodMap { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) } (Embedding.refl ℕ))\n (antidiagonal (n - k))\n[PROOFSTEP]\next ⟨i, j⟩\n[GOAL]\ncase a.mk\nn k : ℕ\nh : k ≤ n\ni j : ℕ\n⊢ (i, j) ∈ filter (fun a => k ≤ a.fst) (antidiagonal n) ↔\n (i, j) ∈\n map (Embedding.prodMap { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) } (Embedding.refl ℕ))\n (antidiagonal (n - k))\n[PROOFSTEP]\nsuffices : i + j = n ∧ k ≤ i ↔ ∃ a, a + j = n - k ∧ a + k = i\n[GOAL]\ncase a.mk\nn k : ℕ\nh : k ≤ n\ni j : ℕ\nthis : i + j = n ∧ k ≤ i ↔ ∃ a, a + j = n - k ∧ a + k = i\n⊢ (i, j) ∈ filter (fun a => k ≤ a.fst) (antidiagonal n) ↔\n (i, j) ∈\n map (Embedding.prodMap { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) } (Embedding.refl ℕ))\n (antidiagonal (n - k))\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase this\nn k : ℕ\nh : k ≤ n\ni j : ℕ\n⊢ i + j = n ∧ k ≤ i ↔ ∃ a, a + j = n - k ∧ a + k = i\n[PROOFSTEP]\nrefine' ⟨fun hi ↦ ⟨i - k, _, tsub_add_cancel_of_le hi.2⟩, _⟩\n[GOAL]\ncase this.refine'_1\nn k : ℕ\nh : k ≤ n\ni j : ℕ\nhi : i + j = n ∧ k ≤ i\n⊢ i - k + j = n - k\n[PROOFSTEP]\nrw [← Nat.sub_add_comm hi.2, hi.1]\n[GOAL]\ncase this.refine'_2\nn k : ℕ\nh : k ≤ n\ni j : ℕ\n⊢ (∃ a, a + j = n - k ∧ a + k = i) → i + j = n ∧ k ≤ i\n[PROOFSTEP]\nrintro ⟨l, hl, rfl⟩\n[GOAL]\ncase this.refine'_2.intro.intro\nn k : ℕ\nh : k ≤ n\nj l : ℕ\nhl : l + j = n - k\n⊢ l + k + j = n ∧ k ≤ l + k\n[PROOFSTEP]\nrefine' ⟨_, Nat.le_add_left k l⟩\n[GOAL]\ncase this.refine'_2.intro.intro\nn k : ℕ\nh : k ≤ n\nj l : ℕ\nhl : l + j = n - k\n⊢ l + k + j = n\n[PROOFSTEP]\nrw [add_right_comm, hl]\n[GOAL]\ncase this.refine'_2.intro.intro\nn k : ℕ\nh : k ≤ n\nj l : ℕ\nhl : l + j = n - k\n⊢ n - k + k = n\n[PROOFSTEP]\nexact tsub_add_cancel_of_le h\n[GOAL]\nn k : ℕ\nh : k ≤ n\n⊢ filter (fun a => k ≤ a.snd) (antidiagonal n) =\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) })\n (antidiagonal (n - k))\n[PROOFSTEP]\nhave aux₁ : (fun a ↦ k ≤ a.snd) = (fun a ↦ k ≤ a.fst) ∘ (Equiv.prodComm ℕ ℕ).symm := rfl\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\n⊢ filter (fun a => k ≤ a.snd) (antidiagonal n) =\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) })\n (antidiagonal (n - k))\n[PROOFSTEP]\nhave aux₂ : ∀ i j, (∃ a b, a + b = n - k ∧ b = i ∧ a + k = j) ↔ ∃ a b, a + b = n - k ∧ a = i ∧ b + k = j := fun i j ↦ by\n rw [exists_comm]; exact exists₂_congr (fun a b ↦ by rw [add_comm])\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\ni j : ℕ\n⊢ (∃ a b, a + b = n - k ∧ b = i ∧ a + k = j) ↔ ∃ a b, a + b = n - k ∧ a = i ∧ b + k = j\n[PROOFSTEP]\nrw [exists_comm]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\ni j : ℕ\n⊢ (∃ b a, a + b = n - k ∧ b = i ∧ a + k = j) ↔ ∃ a b, a + b = n - k ∧ a = i ∧ b + k = j\n[PROOFSTEP]\nexact exists₂_congr (fun a b ↦ by rw [add_comm])\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\ni j a b : ℕ\n⊢ b + a = n - k ∧ a = i ∧ b + k = j ↔ a + b = n - k ∧ a = i ∧ b + k = j\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = n - k ∧ b = i ∧ a + k = j) ↔ ∃ a b, a + b = n - k ∧ a = i ∧ b + k = j\n⊢ filter (fun a => k ≤ a.snd) (antidiagonal n) =\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) })\n (antidiagonal (n - k))\n[PROOFSTEP]\nrw [← map_prodComm_antidiagonal]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = n - k ∧ b = i ∧ a + k = j) ↔ ∃ a b, a + b = n - k ∧ a = i ∧ b + k = j\n⊢ filter (fun a => k ≤ a.snd) (map (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)) (antidiagonal n)) =\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) })\n (antidiagonal (n - k))\n[PROOFSTEP]\nsimp_rw [aux₁, ← map_filter, antidiagonal_filter_le_fst_of_le h, map_map]\n[GOAL]\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = n - k ∧ b = i ∧ a + k = j) ↔ ∃ a b, a + b = n - k ∧ a = i ∧ b + k = j\n⊢ map\n (Embedding.trans\n (Embedding.prodMap { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) } (Embedding.refl ℕ))\n (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)))\n (antidiagonal (n - k)) =\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) })\n (antidiagonal (n - k))\n[PROOFSTEP]\next ⟨i, j⟩\n[GOAL]\ncase a.mk\nn k : ℕ\nh : k ≤ n\naux₁ : (fun a => k ≤ a.snd) = (fun a => k ≤ a.fst) ∘ ↑(Equiv.prodComm ℕ ℕ).symm\naux₂ : ∀ (i j : ℕ), (∃ a b, a + b = n - k ∧ b = i ∧ a + k = j) ↔ ∃ a b, a + b = n - k ∧ a = i ∧ b + k = j\ni j : ℕ\n⊢ (i, j) ∈\n map\n (Embedding.trans\n (Embedding.prodMap { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) } (Embedding.refl ℕ))\n (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)))\n (antidiagonal (n - k)) ↔\n (i, j) ∈\n map (Embedding.prodMap (Embedding.refl ℕ) { toFun := fun x => x + k, inj' := (_ : Injective fun x => x + k) })\n (antidiagonal (n - k))\n[PROOFSTEP]\nsimpa using aux₂ i j\n[GOAL]\n⊢ LeftInverse\n (fun x => { fst := x.fst + x.snd, snd := { val := x, property := (_ : x ∈ antidiagonal (x.fst + x.snd)) } })\n fun x => ↑x.snd\n[PROOFSTEP]\nrintro ⟨n, ⟨k, l⟩, h⟩\n[GOAL]\ncase mk.mk.mk\nn k l : ℕ\nh : (k, l) ∈ antidiagonal n\n⊢ (fun x => { fst := x.fst + x.snd, snd := { val := x, property := (_ : x ∈ antidiagonal (x.fst + x.snd)) } })\n ((fun x => ↑x.snd) { fst := n, snd := { val := (k, l), property := h } }) =\n { fst := n, snd := { val := (k, l), property := h } }\n[PROOFSTEP]\nrw [mem_antidiagonal] at h \n[GOAL]\ncase mk.mk.mk\nn k l : ℕ\nh✝ : (k, l) ∈ antidiagonal n\nh : (k, l).fst + (k, l).snd = n\n⊢ (fun x => { fst := x.fst + x.snd, snd := { val := x, property := (_ : x ∈ antidiagonal (x.fst + x.snd)) } })\n ((fun x => ↑x.snd) { fst := n, snd := { val := (k, l), property := h✝ } }) =\n { fst := n, snd := { val := (k, l), property := h✝ } }\n[PROOFSTEP]\nexact Sigma.subtype_ext h rfl\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.NatAntidiagonal", "llama_tokens": 11179, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9059898254600903, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.6091256728424468}} {"text": "[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nA✝ B✝ : C\nf : A✝ ⟶ B✝\ni : IsIso (F.map f)\n⊢ F.map (f ≫ F.preimage (inv (F.map f))) = F.map (𝟙 A✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nA✝ B✝ : C\nf : A✝ ⟶ B✝\ni : IsIso (F.map f)\n⊢ F.map (F.preimage (inv (F.map f)) ≫ f) = F.map (𝟙 B✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : ReflectsIsomorphisms F\ninst✝ : ReflectsIsomorphisms G\nA✝ B✝ : C\nf : A✝ ⟶ B✝\nhf : IsIso (G.map (F.map f))\n⊢ IsIso f\n[PROOFSTEP]\nhaveI := isIso_of_reflects_iso (F.map f) G\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : ReflectsIsomorphisms F\ninst✝ : ReflectsIsomorphisms G\nA✝ B✝ : C\nf : A✝ ⟶ B✝\nhf : IsIso (G.map (F.map f))\nthis : IsIso (F.map f)\n⊢ IsIso f\n[PROOFSTEP]\nexact isIso_of_reflects_iso f F\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝³ : Category.{v₃, u₃} E\ninst✝² : Balanced C\nF : C ⥤ D\ninst✝¹ : ReflectsMonomorphisms F\ninst✝ : ReflectsEpimorphisms F\nA✝ B✝ : C\nf : A✝ ⟶ B✝\nhf : IsIso (F.map f)\n⊢ IsIso f\n[PROOFSTEP]\nhaveI : Epi f := epi_of_epi_map F inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝³ : Category.{v₃, u₃} E\ninst✝² : Balanced C\nF : C ⥤ D\ninst✝¹ : ReflectsMonomorphisms F\ninst✝ : ReflectsEpimorphisms F\nA✝ B✝ : C\nf : A✝ ⟶ B✝\nhf : IsIso (F.map f)\nthis : Epi f\n⊢ IsIso f\n[PROOFSTEP]\nhaveI : Mono f := mono_of_mono_map F inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝³ : Category.{v₃, u₃} E\ninst✝² : Balanced C\nF : C ⥤ D\ninst✝¹ : ReflectsMonomorphisms F\ninst✝ : ReflectsEpimorphisms F\nA✝ B✝ : C\nf : A✝ ⟶ B✝\nhf : IsIso (F.map f)\nthis✝ : Epi f\nthis : Mono f\n⊢ IsIso f\n[PROOFSTEP]\nexact isIso_of_mono_of_epi f\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Functor.ReflectsIso", "llama_tokens": 1338, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891261650248, "lm_q2_score": 0.7401743563075446, "lm_q1q2_score": 0.6085633072222598}} {"text": "[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\n⊢ ‖cexp (↑π * I * ↑n ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ Int.natAbs n\n[PROOFSTEP]\nlet y := rexp (-π * z.im)\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\n⊢ ‖cexp (↑π * I * ↑n ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ Int.natAbs n\n[PROOFSTEP]\nhave h : y < 1 := exp_lt_one_iff.mpr (mul_neg_of_neg_of_pos (neg_lt_zero.mpr pi_pos) hz)\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ ‖cexp (↑π * I * ↑n ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ Int.natAbs n\n[PROOFSTEP]\nrefine' (le_of_eq _).trans (_ : y ^ n ^ 2 ≤ _)\n[GOAL]\ncase refine'_1\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ ‖cexp (↑π * I * ↑n ^ 2 * z)‖ = y ^ n ^ 2\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, Complex.abs_exp]\n[GOAL]\ncase refine'_1\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ rexp (↑π * I * ↑n ^ 2 * z).re = y ^ n ^ 2\n[PROOFSTEP]\nhave : (↑π * I * (n : ℂ) ^ 2 * z).re = -π * z.im * (n : ℝ) ^ 2 :=\n by\n rw [(by push_cast ; ring : ↑π * I * (n : ℂ) ^ 2 * z = ↑(π * (n : ℝ) ^ 2) * (z * I)), ofReal_mul_re, mul_I_re]\n ring\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ (↑π * I * ↑n ^ 2 * z).re = -π * z.im * ↑n ^ 2\n[PROOFSTEP]\nrw [(by push_cast ; ring : ↑π * I * (n : ℂ) ^ 2 * z = ↑(π * (n : ℝ) ^ 2) * (z * I)), ofReal_mul_re, mul_I_re]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ ↑π * I * ↑n ^ 2 * z = ↑(π * ↑n ^ 2) * (z * I)\n[PROOFSTEP]\npush_cast\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ ↑π * I * ↑n ^ 2 * z = ↑π * ↑n ^ 2 * (z * I)\n[PROOFSTEP]\nring\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ π * ↑n ^ 2 * -z.im = -π * z.im * ↑n ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase refine'_1\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\nthis : (↑π * I * ↑n ^ 2 * z).re = -π * z.im * ↑n ^ 2\n⊢ rexp (↑π * I * ↑n ^ 2 * z).re = y ^ n ^ 2\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := Int.eq_ofNat_of_zero_le (sq_nonneg n)\n[GOAL]\ncase refine'_1.intro\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\nthis : (↑π * I * ↑n ^ 2 * z).re = -π * z.im * ↑n ^ 2\nm : ℕ\nhm : n ^ 2 = ↑m\n⊢ rexp (↑π * I * ↑n ^ 2 * z).re = y ^ n ^ 2\n[PROOFSTEP]\nrw [this, exp_mul, ← Int.cast_pow, rpow_int_cast, hm, zpow_ofNat]\n[GOAL]\ncase refine'_2\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ y ^ n ^ 2 ≤ rexp (-π * z.im) ^ Int.natAbs n\n[PROOFSTEP]\nhave : n ^ 2 = ↑(n.natAbs ^ 2) := by rw [Nat.cast_pow, Int.natAbs_sq]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\n⊢ n ^ 2 = ↑(Int.natAbs n ^ 2)\n[PROOFSTEP]\nrw [Nat.cast_pow, Int.natAbs_sq]\n[GOAL]\ncase refine'_2\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\nthis : n ^ 2 = ↑(Int.natAbs n ^ 2)\n⊢ y ^ n ^ 2 ≤ rexp (-π * z.im) ^ Int.natAbs n\n[PROOFSTEP]\nrw [this, zpow_ofNat]\n[GOAL]\ncase refine'_2\nz : ℂ\nhz : 0 < z.im\nn : ℤ\ny : ℝ := rexp (-π * z.im)\nh : y < 1\nthis : n ^ 2 = ↑(Int.natAbs n ^ 2)\n⊢ y ^ Int.natAbs n ^ 2 ≤ rexp (-π * z.im) ^ Int.natAbs n\n[PROOFSTEP]\nexact pow_le_pow_of_le_one (exp_pos _).le h.le ((sq n.natAbs).symm ▸ n.natAbs.le_mul_self)\n[GOAL]\nR : ℝ\nhR : 0 < R\n⊢ ∃ bd, Summable bd ∧ ∀ {τ : ℂ}, R ≤ τ.im → ∀ (n : ℤ), ‖cexp (↑π * I * ↑n ^ 2 * τ)‖ ≤ bd n\n[PROOFSTEP]\nlet y := rexp (-π * R)\n[GOAL]\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\n⊢ ∃ bd, Summable bd ∧ ∀ {τ : ℂ}, R ≤ τ.im → ∀ (n : ℤ), ‖cexp (↑π * I * ↑n ^ 2 * τ)‖ ≤ bd n\n[PROOFSTEP]\nhave h : y < 1 := exp_lt_one_iff.mpr (mul_neg_of_neg_of_pos (neg_lt_zero.mpr pi_pos) hR)\n[GOAL]\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\n⊢ ∃ bd, Summable bd ∧ ∀ {τ : ℂ}, R ≤ τ.im → ∀ (n : ℤ), ‖cexp (↑π * I * ↑n ^ 2 * τ)‖ ≤ bd n\n[PROOFSTEP]\nrefine' ⟨fun n => y ^ n.natAbs, summable_int_of_summable_nat _ _, fun hτ n => _⟩\n[GOAL]\ncase refine'_1\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\n⊢ Summable fun n => y ^ Int.natAbs ↑n\ncase refine'_2\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\n⊢ Summable fun n => y ^ Int.natAbs (-↑n)\ncase refine'_3\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\nτ✝ : ℂ\nhτ : R ≤ τ✝.im\nn : ℤ\n⊢ ‖cexp (↑π * I * ↑n ^ 2 * τ✝)‖ ≤ (fun n => y ^ Int.natAbs n) n\n[PROOFSTEP]\npick_goal 3\n[GOAL]\ncase refine'_3\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\nτ✝ : ℂ\nhτ : R ≤ τ✝.im\nn : ℤ\n⊢ ‖cexp (↑π * I * ↑n ^ 2 * τ✝)‖ ≤ (fun n => y ^ Int.natAbs n) n\n[PROOFSTEP]\nrefine' (norm_exp_mul_sq_le (hR.trans_le hτ) n).trans _\n[GOAL]\ncase refine'_3\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\nτ✝ : ℂ\nhτ : R ≤ τ✝.im\nn : ℤ\n⊢ rexp (-π * τ✝.im) ^ Int.natAbs n ≤ (fun n => y ^ Int.natAbs n) n\n[PROOFSTEP]\nrefine' pow_le_pow_of_le_left (exp_pos _).le (Real.exp_le_exp.mpr _) _\n[GOAL]\ncase refine'_3\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\nτ✝ : ℂ\nhτ : R ≤ τ✝.im\nn : ℤ\n⊢ -π * τ✝.im ≤ -π * R\n[PROOFSTEP]\nrwa [mul_le_mul_left_of_neg (neg_lt_zero.mpr pi_pos)]\n[GOAL]\ncase refine'_1\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\n⊢ Summable fun n => y ^ Int.natAbs ↑n\ncase refine'_2 R : ℝ hR : 0 < R y : ℝ := rexp (-π * R) h : y < 1 ⊢ Summable fun n => y ^ Int.natAbs (-↑n)\n[PROOFSTEP]\nall_goals simpa only [Int.natAbs_neg, Int.natAbs_ofNat] using summable_geometric_of_lt_1 (Real.exp_pos _).le h\n[GOAL]\ncase refine'_1\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\n⊢ Summable fun n => y ^ Int.natAbs ↑n\n[PROOFSTEP]\nsimpa only [Int.natAbs_neg, Int.natAbs_ofNat] using summable_geometric_of_lt_1 (Real.exp_pos _).le h\n[GOAL]\ncase refine'_2\nR : ℝ\nhR : 0 < R\ny : ℝ := rexp (-π * R)\nh : y < 1\n⊢ Summable fun n => y ^ Int.natAbs (-↑n)\n[PROOFSTEP]\nsimpa only [Int.natAbs_neg, Int.natAbs_ofNat] using summable_geometric_of_lt_1 (Real.exp_pos _).le h\n[GOAL]\nz : ℂ\n⊢ jacobiTheta (2 + z) = jacobiTheta z\n[PROOFSTEP]\nrefine' tsum_congr fun n => _\n[GOAL]\nz : ℂ\nn : ℤ\n⊢ cexp (↑π * I * ↑n ^ 2 * (2 + z)) = cexp (↑π * I * ↑n ^ 2 * z)\n[PROOFSTEP]\nsuffices cexp (↑π * I * (n : ℂ) ^ 2 * 2) = 1 by rw [mul_add, Complex.exp_add, this, one_mul]\n[GOAL]\nz : ℂ\nn : ℤ\nthis : cexp (↑π * I * ↑n ^ 2 * 2) = 1\n⊢ cexp (↑π * I * ↑n ^ 2 * (2 + z)) = cexp (↑π * I * ↑n ^ 2 * z)\n[PROOFSTEP]\nrw [mul_add, Complex.exp_add, this, one_mul]\n[GOAL]\nz : ℂ\nn : ℤ\n⊢ cexp (↑π * I * ↑n ^ 2 * 2) = 1\n[PROOFSTEP]\nrw [(by push_cast ; ring : ↑π * I * ↑n ^ 2 * 2 = ↑(n ^ 2) * (2 * π * I)), Complex.exp_int_mul, Complex.exp_two_pi_mul_I,\n one_zpow]\n[GOAL]\nz : ℂ\nn : ℤ\n⊢ ↑π * I * ↑n ^ 2 * 2 = ↑(n ^ 2) * (2 * ↑π * I)\n[PROOFSTEP]\npush_cast\n[GOAL]\nz : ℂ\nn : ℤ\n⊢ ↑π * I * ↑n ^ 2 * 2 = ↑n ^ 2 * (2 * ↑π * I)\n[PROOFSTEP]\nring\n[GOAL]\nτ : ℍ\n⊢ jacobiTheta ↑(ModularGroup.T ^ 2 • τ) = jacobiTheta ↑τ\n[PROOFSTEP]\nsuffices ↑(ModularGroup.T ^ 2 • τ) = (2 : ℂ) + ↑τ by simp_rw [this, jacobiTheta_two_add]\n[GOAL]\nτ : ℍ\nthis : ↑(ModularGroup.T ^ 2 • τ) = 2 + ↑τ\n⊢ jacobiTheta ↑(ModularGroup.T ^ 2 • τ) = jacobiTheta ↑τ\n[PROOFSTEP]\nsimp_rw [this, jacobiTheta_two_add]\n[GOAL]\nτ : ℍ\n⊢ ↑(ModularGroup.T ^ 2 • τ) = 2 + ↑τ\n[PROOFSTEP]\nhave : ModularGroup.T ^ (2 : ℕ) = ModularGroup.T ^ (2 : ℤ) := by rfl\n[GOAL]\nτ : ℍ\n⊢ ModularGroup.T ^ 2 = ModularGroup.T ^ 2\n[PROOFSTEP]\nrfl\n[GOAL]\nτ : ℍ\nthis : ModularGroup.T ^ 2 = ModularGroup.T ^ 2\n⊢ ↑(ModularGroup.T ^ 2 • τ) = 2 + ↑τ\n[PROOFSTEP]\nsimp_rw [this, UpperHalfPlane.modular_T_zpow_smul, UpperHalfPlane.coe_vadd]\n[GOAL]\nτ : ℍ\nthis : ModularGroup.T ^ 2 = ModularGroup.T ^ 2\n⊢ ↑↑2 + ↑τ = 2 + ↑τ\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nτ : ℍ\n⊢ jacobiTheta ↑(ModularGroup.S • τ) = (-I * ↑τ) ^ (1 / 2) * jacobiTheta ↑τ\n[PROOFSTEP]\nunfold jacobiTheta\n[GOAL]\nτ : ℍ\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑(ModularGroup.S • τ)) =\n (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nrw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk]\n[GOAL]\nτ : ℍ\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nhave ha : 0 < (-I * τ).re :=\n by\n rw [neg_mul, neg_re, mul_re, I_re, I_im, zero_mul, one_mul, zero_sub, neg_neg]\n exact τ.im_pos\n[GOAL]\nτ : ℍ\n⊢ 0 < (-I * ↑τ).re\n[PROOFSTEP]\nrw [neg_mul, neg_re, mul_re, I_re, I_im, zero_mul, one_mul, zero_sub, neg_neg]\n[GOAL]\nτ : ℍ\n⊢ 0 < (↑τ).im\n[PROOFSTEP]\nexact τ.im_pos\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nhave ha' : (-I * τ) ^ (1 / 2 : ℂ) ≠ 0 := by\n rw [Ne.def, cpow_eq_zero_iff]\n contrapose! ha\n rw [ha.1, zero_re]\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\n⊢ (-I * ↑τ) ^ (1 / 2) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, cpow_eq_zero_iff]\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\n⊢ ¬(-I * ↑τ = 0 ∧ 1 / 2 ≠ 0)\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nτ : ℍ\nha : -I * ↑τ = 0 ∧ 1 / 2 ≠ 0\n⊢ (-I * ↑τ).re ≤ 0\n[PROOFSTEP]\nrw [ha.1, zero_re]\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nhave hτ : (τ : ℂ) ≠ 0 := τ.ne_zero\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nhave := Complex.tsum_exp_neg_mul_int_sq ha\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nthis :\n ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2) = 1 / (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / (-I * ↑τ) * ↑n ^ 2)\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nrw [mul_comm ((1 : ℂ) / _) _, mul_one_div, eq_div_iff ha', mul_comm _ (_ ^ _), eq_comm] at this \n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nthis : ∑' (n : ℤ), cexp (-↑π / (-I * ↑τ) * ↑n ^ 2) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nhave expo1 : ∀ n : ℤ, -↑π / (-I * ↑τ) * (n : ℂ) ^ 2 = ↑π * I * (n : ℂ) ^ 2 * (-↑τ)⁻¹ :=\n by\n intro n\n field_simp [hτ, I_ne_zero]\n ring_nf\n rw [I_sq, mul_neg, mul_one, neg_neg]\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nthis : ∑' (n : ℤ), cexp (-↑π / (-I * ↑τ) * ↑n ^ 2) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\n⊢ ∀ (n : ℤ), -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\n[PROOFSTEP]\nintro n\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nthis : ∑' (n : ℤ), cexp (-↑π / (-I * ↑τ) * ↑n ^ 2) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\nn : ℤ\n⊢ -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\n[PROOFSTEP]\nfield_simp [hτ, I_ne_zero]\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nthis : ∑' (n : ℤ), cexp (-↑π / (-I * ↑τ) * ↑n ^ 2) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\nn : ℤ\n⊢ ↑π * ↑n ^ 2 * ↑τ = -(↑π * I * ↑n ^ 2 * (I * ↑τ))\n[PROOFSTEP]\nring_nf\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nthis : ∑' (n : ℤ), cexp (-↑π / (-I * ↑τ) * ↑n ^ 2) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\nn : ℤ\n⊢ ↑π * ↑n ^ 2 * ↑τ = -(↑π * ↑n ^ 2 * ↑τ * I ^ 2)\n[PROOFSTEP]\nrw [I_sq, mul_neg, mul_one, neg_neg]\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nthis : ∑' (n : ℤ), cexp (-↑π / (-I * ↑τ) * ↑n ^ 2) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\nexpo1 : ∀ (n : ℤ), -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nsimp_rw [expo1] at this \n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nexpo1 : ∀ (n : ℤ), -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\nthis : ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nhave expo2 : ∀ n : ℤ, -↑π * (-I * ↑τ) * (n : ℂ) ^ 2 = ↑π * I * (n : ℂ) ^ 2 * ↑τ :=\n by\n intro n\n ring_nf\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nexpo1 : ∀ (n : ℤ), -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\nthis : ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\n⊢ ∀ (n : ℤ), -↑π * (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * ↑τ\n[PROOFSTEP]\nintro n\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nexpo1 : ∀ (n : ℤ), -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\nthis : ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\nn : ℤ\n⊢ -↑π * (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * ↑τ\n[PROOFSTEP]\nring_nf\n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nexpo1 : ∀ (n : ℤ), -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\nthis : ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π * (-I * ↑τ) * ↑n ^ 2)\nexpo2 : ∀ (n : ℤ), -↑π * (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * ↑τ\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nsimp_rw [expo2] at this \n[GOAL]\nτ : ℍ\nha : 0 < (-I * ↑τ).re\nha' : (-I * ↑τ) ^ (1 / 2) ≠ 0\nhτ : ↑τ ≠ 0\nexpo1 : ∀ (n : ℤ), -↑π / (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * (-↑τ)⁻¹\nexpo2 : ∀ (n : ℤ), -↑π * (-I * ↑τ) * ↑n ^ 2 = ↑π * I * ↑n ^ 2 * ↑τ\nthis : ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n⊢ ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * (-↑τ)⁻¹) = (-I * ↑τ) ^ (1 / 2) * ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * ↑τ)\n[PROOFSTEP]\nexact this\n[GOAL]\nz : ℂ\nhz : 0 < z.im\n⊢ HasSum (fun n => cexp (↑π * I * (↑n + 1) ^ 2 * z)) ((jacobiTheta z - 1) / 2)\n[PROOFSTEP]\nhave := (summable_exp_mul_sq hz).hasSum.sum_nat_of_sum_int\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis :\n HasSum (fun n => cexp (↑π * I * ↑↑n ^ 2 * z) + cexp (↑π * I * ↑(-↑n) ^ 2 * z))\n (∑' (b : ℤ), cexp (↑π * I * ↑b ^ 2 * z) + cexp (↑π * I * ↑0 ^ 2 * z))\n⊢ HasSum (fun n => cexp (↑π * I * (↑n + 1) ^ 2 * z)) ((jacobiTheta z - 1) / 2)\n[PROOFSTEP]\nrw [← @hasSum_nat_add_iff' ℂ _ _ _ _ 1] at this \n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis :\n HasSum (fun n => cexp (↑π * I * ↑↑(n + 1) ^ 2 * z) + cexp (↑π * I * ↑(-↑(n + 1)) ^ 2 * z))\n (∑' (b : ℤ), cexp (↑π * I * ↑b ^ 2 * z) + cexp (↑π * I * ↑0 ^ 2 * z) -\n ∑ i in Finset.range 1, (cexp (↑π * I * ↑↑i ^ 2 * z) + cexp (↑π * I * ↑(-↑i) ^ 2 * z)))\n⊢ HasSum (fun n => cexp (↑π * I * (↑n + 1) ^ 2 * z)) ((jacobiTheta z - 1) / 2)\n[PROOFSTEP]\nsimp_rw [Finset.sum_range_one, Int.cast_neg, Int.cast_ofNat, Nat.cast_zero, neg_zero, Int.cast_zero, sq (0 : ℂ),\n mul_zero, zero_mul, neg_sq, ← mul_two, Complex.exp_zero, add_sub_assoc, (by norm_num : (1 : ℂ) - 1 * 2 = -1), ←\n sub_eq_add_neg, Nat.cast_add, Nat.cast_one] at this \n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : HasSum (fun n => cexp (↑π * I * ↑(n + 1) ^ 2 * z) * 2) (∑' (b : ℤ), cexp (↑π * I * ↑b ^ 2 * z) + (1 - 1 * 2))\n⊢ 1 - 1 * 2 = -1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : HasSum (fun n => cexp (↑π * I * (↑n + 1) ^ 2 * z) * 2) (∑' (b : ℤ), cexp (↑π * I * ↑b ^ 2 * z) - 1)\n⊢ HasSum (fun n => cexp (↑π * I * (↑n + 1) ^ 2 * z)) ((jacobiTheta z - 1) / 2)\n[PROOFSTEP]\nconvert this.div_const 2 using 1\n[GOAL]\ncase h.e'_5\nz : ℂ\nhz : 0 < z.im\nthis : HasSum (fun n => cexp (↑π * I * (↑n + 1) ^ 2 * z) * 2) (∑' (b : ℤ), cexp (↑π * I * ↑b ^ 2 * z) - 1)\n⊢ (fun n => cexp (↑π * I * (↑n + 1) ^ 2 * z)) = fun i => cexp (↑π * I * (↑i + 1) ^ 2 * z) * 2 / 2\n[PROOFSTEP]\nsimp_rw [mul_div_cancel (G₀ := ℂ) _ two_ne_zero]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\n⊢ jacobiTheta z = 1 + 2 * ∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)\n[PROOFSTEP]\nrw [(hasSum_nat_jacobiTheta hz).tsum_eq, mul_div_cancel' _ (two_ne_zero' ℂ), ← add_sub_assoc, add_sub_cancel']\n[GOAL]\nz : ℂ\nhz : 0 < z.im\n⊢ ‖jacobiTheta z - 1‖ ≤ 2 / (1 - rexp (-π * z.im)) * rexp (-π * z.im)\n[PROOFSTEP]\nsuffices ‖∑' n : ℕ, cexp (π * I * ((n : ℂ) + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im)) by\n calc\n ‖jacobiTheta z - 1‖ = ↑2 * ‖∑' n : ℕ, cexp (π * I * ((n : ℂ) + 1) ^ 2 * z)‖ := by\n rw [sub_eq_iff_eq_add'.mpr (jacobiTheta_eq_tsum_nat hz), norm_mul, Complex.norm_eq_abs, Complex.abs_two]\n _ ≤ 2 * (rexp (-π * z.im) / (1 - rexp (-π * z.im))) := by rwa [mul_le_mul_left (zero_lt_two' ℝ)]\n _ = 2 / (1 - rexp (-π * z.im)) * rexp (-π * z.im) := by rw [div_mul_comm, mul_comm]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n⊢ ‖jacobiTheta z - 1‖ ≤ 2 / (1 - rexp (-π * z.im)) * rexp (-π * z.im)\n[PROOFSTEP]\ncalc\n ‖jacobiTheta z - 1‖ = ↑2 * ‖∑' n : ℕ, cexp (π * I * ((n : ℂ) + 1) ^ 2 * z)‖ := by\n rw [sub_eq_iff_eq_add'.mpr (jacobiTheta_eq_tsum_nat hz), norm_mul, Complex.norm_eq_abs, Complex.abs_two]\n _ ≤ 2 * (rexp (-π * z.im) / (1 - rexp (-π * z.im))) := by rwa [mul_le_mul_left (zero_lt_two' ℝ)]\n _ = 2 / (1 - rexp (-π * z.im)) * rexp (-π * z.im) := by rw [div_mul_comm, mul_comm]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n⊢ ‖jacobiTheta z - 1‖ = 2 * ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖\n[PROOFSTEP]\nrw [sub_eq_iff_eq_add'.mpr (jacobiTheta_eq_tsum_nat hz), norm_mul, Complex.norm_eq_abs, Complex.abs_two]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n⊢ 2 * ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ 2 * (rexp (-π * z.im) / (1 - rexp (-π * z.im)))\n[PROOFSTEP]\nrwa [mul_le_mul_left (zero_lt_two' ℝ)]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n⊢ 2 * (rexp (-π * z.im) / (1 - rexp (-π * z.im))) = 2 / (1 - rexp (-π * z.im)) * rexp (-π * z.im)\n[PROOFSTEP]\nrw [div_mul_comm, mul_comm]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\n⊢ ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n[PROOFSTEP]\nhave : ∀ n : ℕ, ‖cexp (π * I * ((n : ℂ) + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1) :=\n by\n intro n\n simpa only [Int.cast_add, Int.cast_one] using norm_exp_mul_sq_le hz (n + 1)\n[GOAL]\nz : ℂ\nhz : 0 < z.im\n⊢ ∀ (n : ℕ), ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1)\n[PROOFSTEP]\nintro n\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nn : ℕ\n⊢ ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1)\n[PROOFSTEP]\nsimpa only [Int.cast_add, Int.cast_one] using norm_exp_mul_sq_le hz (n + 1)\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ∀ (n : ℕ), ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1)\n⊢ ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n[PROOFSTEP]\nhave s : HasSum (fun n : ℕ => rexp (-π * z.im) ^ (n + 1)) (rexp (-π * z.im) / (1 - rexp (-π * z.im))) :=\n by\n simp_rw [pow_succ, div_eq_mul_inv, hasSum_mul_left_iff (Real.exp_ne_zero _)]\n exact\n hasSum_geometric_of_lt_1 (exp_pos (-π * z.im)).le\n (exp_lt_one_iff.mpr <| mul_neg_of_neg_of_pos (neg_lt_zero.mpr pi_pos) hz)\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ∀ (n : ℕ), ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1)\n⊢ HasSum (fun n => rexp (-π * z.im) ^ (n + 1)) (rexp (-π * z.im) / (1 - rexp (-π * z.im)))\n[PROOFSTEP]\nsimp_rw [pow_succ, div_eq_mul_inv, hasSum_mul_left_iff (Real.exp_ne_zero _)]\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ∀ (n : ℕ), ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1)\n⊢ HasSum (fun i => rexp (-π * z.im) ^ i) (1 - rexp (-π * z.im))⁻¹\n[PROOFSTEP]\nexact\n hasSum_geometric_of_lt_1 (exp_pos (-π * z.im)).le\n (exp_lt_one_iff.mpr <| mul_neg_of_neg_of_pos (neg_lt_zero.mpr pi_pos) hz)\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ∀ (n : ℕ), ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1)\ns : HasSum (fun n => rexp (-π * z.im) ^ (n + 1)) (rexp (-π * z.im) / (1 - rexp (-π * z.im)))\n⊢ ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n[PROOFSTEP]\nhave aux : Summable fun n : ℕ => ‖cexp (π * I * ((n : ℂ) + 1) ^ 2 * z)‖ :=\n summable_of_nonneg_of_le (fun n => norm_nonneg _) this s.summable\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ∀ (n : ℕ), ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) ^ (n + 1)\ns : HasSum (fun n => rexp (-π * z.im) ^ (n + 1)) (rexp (-π * z.im) / (1 - rexp (-π * z.im)))\naux : Summable fun n => ‖cexp (↑π * I * (↑n + 1) ^ 2 * z)‖\n⊢ ‖∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * z)‖ ≤ rexp (-π * z.im) / (1 - rexp (-π * z.im))\n[PROOFSTEP]\nexact (norm_tsum_le_tsum_norm aux).trans ((tsum_mono aux s.summable this).trans (le_of_eq s.tsum_eq))\n[GOAL]\n⊢ (fun τ => jacobiTheta τ - 1) =O[comap im atTop] fun τ => rexp (-π * τ.im)\n[PROOFSTEP]\nsimp_rw [IsBigO, IsBigOWith, Filter.eventually_comap, Filter.eventually_atTop]\n[GOAL]\n⊢ ∃ c a, ∀ (b : ℝ), b ≥ a → ∀ (a : ℂ), a.im = b → ‖jacobiTheta a - 1‖ ≤ c * ‖rexp (-π * a.im)‖\n[PROOFSTEP]\nrefine'\n ⟨2 / (1 - rexp (-π)), 1, fun y hy z hz =>\n (norm_jacobiTheta_sub_one_le (hz.symm ▸ zero_lt_one.trans_le hy : 0 < im z)).trans _⟩\n[GOAL]\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ 2 / (1 - rexp (-π * z.im)) * rexp (-π * z.im) ≤ 2 / (1 - rexp (-π)) * ‖rexp (-π * z.im)‖\n[PROOFSTEP]\nrw [Real.norm_eq_abs, Real.abs_exp]\n[GOAL]\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ 2 / (1 - rexp (-π * z.im)) * rexp (-π * z.im) ≤ 2 / (1 - rexp (-π)) * rexp (-π * z.im)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ (exp_pos _).le\n[GOAL]\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ 2 / (1 - rexp (-π * z.im)) ≤ 2 / (1 - rexp (-π))\n[PROOFSTEP]\nrw [div_le_div_left (zero_lt_two' ℝ), sub_le_sub_iff_left, exp_le_exp, neg_mul, neg_le_neg_iff]\n[GOAL]\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ π ≤ π * z.im\n[PROOFSTEP]\nexact le_mul_of_one_le_right pi_pos.le (hz.symm ▸ hy)\n[GOAL]\ncase hb\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ 0 < 1 - rexp (-π * z.im)\n[PROOFSTEP]\nrw [sub_pos, exp_lt_one_iff, neg_mul, neg_lt_zero]\n[GOAL]\ncase hb\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ 0 < π * z.im\n[PROOFSTEP]\nexact mul_pos pi_pos (hz.symm ▸ zero_lt_one.trans_le hy)\n[GOAL]\ncase hc\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ 0 < 1 - rexp (-π)\n[PROOFSTEP]\nrw [sub_pos, exp_lt_one_iff, neg_lt_zero]\n[GOAL]\ncase hc\ny : ℝ\nhy : y ≥ 1\nz : ℂ\nhz : z.im = y\n⊢ 0 < π\n[PROOFSTEP]\nexact pi_pos\n[GOAL]\nz : ℂ\nhz : 0 < z.im\n⊢ DifferentiableAt ℂ jacobiTheta z\n[PROOFSTEP]\nsuffices\n ∀ (y : ℝ) (_ : 0 < y), DifferentiableOn ℂ (fun z => ∑' n : ℤ, cexp (π * I * (n : ℂ) ^ 2 * z)) {w : ℂ | y < im w}\n by\n let ⟨y, hy, hy'⟩ := exists_between hz\n exact (this y hy).differentiableAt ((Complex.continuous_im.isOpen_preimage _ isOpen_Ioi).mem_nhds hy')\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ∀ (y : ℝ), 0 < y → DifferentiableOn ℂ (fun z => ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * z)) {w | y < w.im}\n⊢ DifferentiableAt ℂ jacobiTheta z\n[PROOFSTEP]\nlet ⟨y, hy, hy'⟩ := exists_between hz\n[GOAL]\nz : ℂ\nhz : 0 < z.im\nthis : ∀ (y : ℝ), 0 < y → DifferentiableOn ℂ (fun z => ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * z)) {w | y < w.im}\ny : ℝ\nhy : 0 < y\nhy' : y < z.im\n⊢ DifferentiableAt ℂ jacobiTheta z\n[PROOFSTEP]\nexact (this y hy).differentiableAt ((Complex.continuous_im.isOpen_preimage _ isOpen_Ioi).mem_nhds hy')\n[GOAL]\nz : ℂ\nhz : 0 < z.im\n⊢ ∀ (y : ℝ), 0 < y → DifferentiableOn ℂ (fun z => ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * z)) {w | y < w.im}\n[PROOFSTEP]\nintro y hy\n[GOAL]\nz : ℂ\nhz : 0 < z.im\ny : ℝ\nhy : 0 < y\n⊢ DifferentiableOn ℂ (fun z => ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * z)) {w | y < w.im}\n[PROOFSTEP]\nhave h1 :\n ∀ (n : ℤ) (w : ℂ) (_ : y < im w),\n DifferentiableWithinAt ℂ (fun v : ℂ => cexp (π * I * (n : ℂ) ^ 2 * v)) {z : ℂ | y < im z} w :=\n fun n w _ => (differentiableAt_id.const_mul _).cexp.differentiableWithinAt\n[GOAL]\nz : ℂ\nhz : 0 < z.im\ny : ℝ\nhy : 0 < y\nh1 : ∀ (n : ℤ) (w : ℂ), y < w.im → DifferentiableWithinAt ℂ (fun v => cexp (↑π * I * ↑n ^ 2 * v)) {z | y < z.im} w\n⊢ DifferentiableOn ℂ (fun z => ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * z)) {w | y < w.im}\n[PROOFSTEP]\nhave h2 : IsOpen {w : ℂ | y < im w} := continuous_im.isOpen_preimage _ isOpen_Ioi\n[GOAL]\nz : ℂ\nhz : 0 < z.im\ny : ℝ\nhy : 0 < y\nh1 : ∀ (n : ℤ) (w : ℂ), y < w.im → DifferentiableWithinAt ℂ (fun v => cexp (↑π * I * ↑n ^ 2 * v)) {z | y < z.im} w\nh2 : IsOpen {w | y < w.im}\n⊢ DifferentiableOn ℂ (fun z => ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * z)) {w | y < w.im}\n[PROOFSTEP]\nobtain ⟨bd, bd_s, le_bd⟩ := exists_summable_bound_exp_mul_sq hy\n[GOAL]\ncase intro.intro\nz : ℂ\nhz : 0 < z.im\ny : ℝ\nhy : 0 < y\nh1 : ∀ (n : ℤ) (w : ℂ), y < w.im → DifferentiableWithinAt ℂ (fun v => cexp (↑π * I * ↑n ^ 2 * v)) {z | y < z.im} w\nh2 : IsOpen {w | y < w.im}\nbd : ℤ → ℝ\nbd_s : Summable bd\nle_bd : ∀ {τ : ℂ}, y ≤ τ.im → ∀ (n : ℤ), ‖cexp (↑π * I * ↑n ^ 2 * τ)‖ ≤ bd n\n⊢ DifferentiableOn ℂ (fun z => ∑' (n : ℤ), cexp (↑π * I * ↑n ^ 2 * z)) {w | y < w.im}\n[PROOFSTEP]\nexact differentiableOn_tsum_of_summable_norm bd_s h1 h2 fun i w hw => le_bd (le_of_lt hw) i\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ModularForms.JacobiTheta.Basic", "llama_tokens": 14908, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711718571774, "lm_q2_score": 0.7154240079185319, "lm_q1q2_score": 0.6080897823852731}} {"text": "[GOAL]\nn : ℕ\n⊢ bernoulli n = ∑ i in range (n + 1), ↑(monomial i) (_root_.bernoulli (n - i) * ↑(Nat.choose n i))\n[PROOFSTEP]\nrw [← sum_range_reflect, add_succ_sub_one, add_zero, bernoulli]\n[GOAL]\nn : ℕ\n⊢ ∑ i in range (n + 1), ↑(monomial (n - i)) (_root_.bernoulli i * ↑(Nat.choose n i)) =\n ∑ j in range (n + 1), ↑(monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(Nat.choose n (n - j)))\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\nn : ℕ\n⊢ ∀ (x : ℕ),\n x ∈ range (n + 1) →\n ↑(monomial (n - x)) (_root_.bernoulli x * ↑(Nat.choose n x)) =\n ↑(monomial (n - x)) (_root_.bernoulli (n - (n - x)) * ↑(Nat.choose n (n - x)))\n[PROOFSTEP]\nrintro x hx\n[GOAL]\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ ↑(monomial (n - x)) (_root_.bernoulli x * ↑(Nat.choose n x)) =\n ↑(monomial (n - x)) (_root_.bernoulli (n - (n - x)) * ↑(Nat.choose n (n - x)))\n[PROOFSTEP]\nrw [mem_range_succ_iff] at hx \n[GOAL]\nn x : ℕ\nhx : x ≤ n\n⊢ ↑(monomial (n - x)) (_root_.bernoulli x * ↑(Nat.choose n x)) =\n ↑(monomial (n - x)) (_root_.bernoulli (n - (n - x)) * ↑(Nat.choose n (n - x)))\n[PROOFSTEP]\nrw [choose_symm hx, tsub_tsub_cancel_of_le hx]\n[GOAL]\n⊢ bernoulli 0 = 1\n[PROOFSTEP]\nsimp [bernoulli]\n[GOAL]\nn : ℕ\n⊢ eval 0 (bernoulli n) = _root_.bernoulli n\n[PROOFSTEP]\nrw [bernoulli, eval_finset_sum, sum_range_succ]\n[GOAL]\nn : ℕ\n⊢ ∑ x in range n, eval 0 (↑(monomial (n - x)) (_root_.bernoulli x * ↑(Nat.choose n x))) +\n eval 0 (↑(monomial (n - n)) (_root_.bernoulli n * ↑(Nat.choose n n))) =\n _root_.bernoulli n\n[PROOFSTEP]\nhave : (∑ x : ℕ in range n, _root_.bernoulli x * n.choose x * 0 ^ (n - x)) = 0 :=\n by\n apply sum_eq_zero <| fun x hx => _\n intros x hx\n have h : x < n := (mem_range.1 hx)\n simp [h]\n[GOAL]\nn : ℕ\n⊢ ∑ x in range n, _root_.bernoulli x * ↑(Nat.choose n x) * 0 ^ (n - x) = 0\n[PROOFSTEP]\napply sum_eq_zero <| fun x hx => _\n[GOAL]\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range n → _root_.bernoulli x * ↑(Nat.choose n x) * 0 ^ (n - x) = 0\n[PROOFSTEP]\nintros x hx\n[GOAL]\nn x : ℕ\nhx : x ∈ range n\n⊢ _root_.bernoulli x * ↑(Nat.choose n x) * 0 ^ (n - x) = 0\n[PROOFSTEP]\nhave h : x < n := (mem_range.1 hx)\n[GOAL]\nn x : ℕ\nhx : x ∈ range n\nh : x < n\n⊢ _root_.bernoulli x * ↑(Nat.choose n x) * 0 ^ (n - x) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nn : ℕ\nthis : ∑ x in range n, _root_.bernoulli x * ↑(Nat.choose n x) * 0 ^ (n - x) = 0\n⊢ ∑ x in range n, eval 0 (↑(monomial (n - x)) (_root_.bernoulli x * ↑(Nat.choose n x))) +\n eval 0 (↑(monomial (n - n)) (_root_.bernoulli n * ↑(Nat.choose n n))) =\n _root_.bernoulli n\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nn : ℕ\n⊢ eval 1 (bernoulli n) = bernoulli' n\n[PROOFSTEP]\nsimp only [bernoulli, eval_finset_sum]\n[GOAL]\nn : ℕ\n⊢ ∑ i in range (n + 1), eval 1 (↑(monomial (n - i)) (_root_.bernoulli i * ↑(Nat.choose n i))) = bernoulli' n\n[PROOFSTEP]\nsimp only [← succ_eq_add_one, sum_range_succ, mul_one, cast_one, choose_self, (_root_.bernoulli _).mul_comm,\n sum_bernoulli, one_pow, mul_one, eval_C, eval_monomial, one_mul]\n[GOAL]\nn : ℕ\n⊢ (if n = 1 then 1 else 0) + _root_.bernoulli n = bernoulli' n\n[PROOFSTEP]\nby_cases h : n = 1\n[GOAL]\ncase pos\nn : ℕ\nh : n = 1\n⊢ (if n = 1 then 1 else 0) + _root_.bernoulli n = bernoulli' n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nn : ℕ\nh : n = 1\n⊢ 1 + -1 / 2 = 2⁻¹\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nn : ℕ\nh : ¬n = 1\n⊢ (if n = 1 then 1 else 0) + _root_.bernoulli n = bernoulli' n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nn : ℕ\nh : ¬n = 1\n⊢ _root_.bernoulli n = bernoulli' n\n[PROOFSTEP]\nexact bernoulli_eq_bernoulli'_of_ne_one h\n[GOAL]\nk : ℕ\n⊢ ↑derivative (bernoulli (k + 1)) = (↑k + 1) * bernoulli k\n[PROOFSTEP]\nsimp_rw [bernoulli, derivative_sum, derivative_monomial, Nat.sub_sub, Nat.add_sub_add_right]\n -- LHS sum has an extra term, but the coefficient is zero:\n[GOAL]\nk : ℕ\n⊢ ∑ x in range (k + 1 + 1), ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose (k + 1) x) * ↑(k + 1 - x)) =\n (↑k + 1) * ∑ x in range (k + 1), ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose k x))\n[PROOFSTEP]\nrw [range_add_one, sum_insert not_mem_range_self, tsub_self, cast_zero, mul_zero, map_zero, zero_add, mul_sum]\n -- the rest of the sum is termwise equal:\n[GOAL]\nk : ℕ\n⊢ ∑ x in range (k + 1), ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose (k + 1) x) * ↑(k + 1 - x)) =\n ∑ x in range (k + 1), (↑k + 1) * ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose k x))\n[PROOFSTEP]\nrefine' sum_congr (by rfl) fun m _ => _\n[GOAL]\nk : ℕ\n⊢ range (k + 1) = range (k + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nk m : ℕ\nx✝ : m ∈ range (k + 1)\n⊢ ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose (k + 1) m) * ↑(k + 1 - m)) =\n (↑k + 1) * ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m))\n[PROOFSTEP]\nconv_rhs => rw [← Nat.cast_one, ← Nat.cast_add, ← C_eq_nat_cast, C_mul_monomial, mul_comm]\n[GOAL]\nk m : ℕ\nx✝ : m ∈ range (k + 1)\n| (↑k + 1) * ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m))\n[PROOFSTEP]\nrw [← Nat.cast_one, ← Nat.cast_add, ← C_eq_nat_cast, C_mul_monomial, mul_comm]\n[GOAL]\nk m : ℕ\nx✝ : m ∈ range (k + 1)\n| (↑k + 1) * ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m))\n[PROOFSTEP]\nrw [← Nat.cast_one, ← Nat.cast_add, ← C_eq_nat_cast, C_mul_monomial, mul_comm]\n[GOAL]\nk m : ℕ\nx✝ : m ∈ range (k + 1)\n| (↑k + 1) * ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m))\n[PROOFSTEP]\nrw [← Nat.cast_one, ← Nat.cast_add, ← C_eq_nat_cast, C_mul_monomial, mul_comm]\n[GOAL]\nk m : ℕ\nx✝ : m ∈ range (k + 1)\n⊢ ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose (k + 1) m) * ↑(k + 1 - m)) =\n ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m) * ↑(k + 1))\n[PROOFSTEP]\nrw [mul_assoc, mul_assoc, ← Nat.cast_mul, ← Nat.cast_mul]\n[GOAL]\nk m : ℕ\nx✝ : m ∈ range (k + 1)\n⊢ ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose (k + 1) m * (k + 1 - m))) =\n ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m * (k + 1)))\n[PROOFSTEP]\ncongr 3\n[GOAL]\ncase h.e_6.h.e_a.e_a\nk m : ℕ\nx✝ : m ∈ range (k + 1)\n⊢ Nat.choose (k + 1) m * (k + 1 - m) = Nat.choose k m * (k + 1)\n[PROOFSTEP]\nrw [(choose_mul_succ_eq k m).symm, mul_comm]\n[GOAL]\nk : ℕ\n⊢ ↑derivative (bernoulli k) = ↑k * bernoulli (k - 1)\n[PROOFSTEP]\ncases k with\n| zero => rw [Nat.cast_zero, zero_mul, bernoulli_zero, derivative_one]\n| succ k => exact_mod_cast derivative_bernoulli_add_one k\n[GOAL]\nk : ℕ\n⊢ ↑derivative (bernoulli k) = ↑k * bernoulli (k - 1)\n[PROOFSTEP]\ncases k with\n| zero => rw [Nat.cast_zero, zero_mul, bernoulli_zero, derivative_one]\n| succ k => exact_mod_cast derivative_bernoulli_add_one k\n[GOAL]\ncase zero\n⊢ ↑derivative (bernoulli Nat.zero) = ↑Nat.zero * bernoulli (Nat.zero - 1)\n[PROOFSTEP]\n\n| zero => rw [Nat.cast_zero, zero_mul, bernoulli_zero, derivative_one]\n[GOAL]\ncase zero\n⊢ ↑derivative (bernoulli Nat.zero) = ↑Nat.zero * bernoulli (Nat.zero - 1)\n[PROOFSTEP]\nrw [Nat.cast_zero, zero_mul, bernoulli_zero, derivative_one]\n[GOAL]\ncase succ\nk : ℕ\n⊢ ↑derivative (bernoulli (succ k)) = ↑(succ k) * bernoulli (succ k - 1)\n[PROOFSTEP]\n\n| succ k => exact_mod_cast derivative_bernoulli_add_one k\n[GOAL]\ncase succ\nk : ℕ\n⊢ ↑derivative (bernoulli (succ k)) = ↑(succ k) * bernoulli (succ k - 1)\n[PROOFSTEP]\nexact_mod_cast derivative_bernoulli_add_one k\n[GOAL]\nn : ℕ\n⊢ ∑ k in range (n + 1), ↑(Nat.choose (n + 1) k) • bernoulli k = ↑(monomial n) (↑n + 1)\n[PROOFSTEP]\nsimp_rw [bernoulli_def, Finset.smul_sum, Finset.range_eq_Ico, ← Finset.sum_Ico_Ico_comm, Finset.sum_Ico_eq_sum_range]\n[GOAL]\nn : ℕ\n⊢ ∑ k in range (n + 1 - 0),\n ∑ k_1 in range (n + 1 - (0 + k)),\n ↑(Nat.choose (n + 1) (0 + k + k_1)) •\n ↑(monomial (0 + k)) (_root_.bernoulli (0 + k + k_1 - (0 + k)) * ↑(Nat.choose (0 + k + k_1) (0 + k))) =\n ↑(monomial n) (↑n + 1)\n[PROOFSTEP]\nsimp only [add_tsub_cancel_left, tsub_zero, zero_add, map_add]\n[GOAL]\nn : ℕ\n⊢ ∑ x in range (n + 1),\n ∑ x_1 in range (n + 1 - x),\n ↑(Nat.choose (n + 1) (x + x_1)) • ↑(monomial x) (_root_.bernoulli x_1 * ↑(Nat.choose (x + x_1) x)) =\n ↑(monomial n) ↑n + ↑(monomial n) 1\n[PROOFSTEP]\nsimp_rw [smul_monomial, mul_comm (_root_.bernoulli _) _, smul_eq_mul, ← mul_assoc]\n[GOAL]\nn : ℕ\n⊢ ∑ x in range (n + 1),\n ∑ x_1 in range (n + 1 - x),\n ↑(monomial x) (↑(Nat.choose (n + 1) (x + x_1)) * ↑(Nat.choose (x + x_1) x) * _root_.bernoulli x_1) =\n ↑(monomial n) ↑n + ↑(monomial n) 1\n[PROOFSTEP]\nconv_lhs =>\n apply_congr\n ·skip\n ·conv =>\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption))\n (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\nn : ℕ\n| ∑ x in range (n + 1),\n ∑ x_1 in range (n + 1 - x),\n ↑(monomial x) (↑(Nat.choose (n + 1) (x + x_1)) * ↑(Nat.choose (x + x_1) x) * _root_.bernoulli x_1)\n[PROOFSTEP]\n apply_congr\n ·skip\n ·conv =>\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption))\n (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\nn : ℕ\n| ∑ x in range (n + 1),\n ∑ x_1 in range (n + 1 - x),\n ↑(monomial x) (↑(Nat.choose (n + 1) (x + x_1)) * ↑(Nat.choose (x + x_1) x) * _root_.bernoulli x_1)\n[PROOFSTEP]\n apply_congr\n ·skip\n ·conv =>\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption))\n (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\nn : ℕ\n| ∑ x in range (n + 1),\n ∑ x_1 in range (n + 1 - x),\n ↑(monomial x) (↑(Nat.choose (n + 1) (x + x_1)) * ↑(Nat.choose (x + x_1) x) * _root_.bernoulli x_1)\n[PROOFSTEP]\napply_congr\n[GOAL]\ncase h\nn : ℕ\n⊢ range (n + 1) = ?s₂\ncase a\nn x✝ : ℕ\na✝ : x✝ ∈ ?s₂\n⊢ ∑ x in range (n + 1 - x✝),\n ↑(monomial x✝) (↑(Nat.choose (n + 1) (x✝ + x)) * ↑(Nat.choose (x✝ + x) x✝) * _root_.bernoulli x) =\n ?g x✝\n[PROOFSTEP]\n·skip\n[GOAL]\ncase h\nn : ℕ\n⊢ range (n + 1) = ?s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase h\nn : ℕ\n⊢ range (n + 1) = ?s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase h\nn : ℕ\n⊢ range (n + 1) = ?s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ ∑ x in range (n + 1 - x✝),\n ↑(monomial x✝) (↑(Nat.choose (n + 1) (x✝ + x)) * ↑(Nat.choose (x✝ + x) x✝) * _root_.bernoulli x) =\n ?g x✝\n[PROOFSTEP]\n·conv =>\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption))\n (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\ncase a\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ ∑ x in range (n + 1 - x✝),\n ↑(monomial x✝) (↑(Nat.choose (n + 1) (x✝ + x)) * ↑(Nat.choose (x✝ + x) x✝) * _root_.bernoulli x) =\n ?g x✝\n[PROOFSTEP]\nconv =>\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption))\n (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\ncase a\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ ∑ x in range (n + 1 - x✝),\n ↑(monomial x✝) (↑(Nat.choose (n + 1) (x✝ + x)) * ↑(Nat.choose (x✝ + x) x✝) * _root_.bernoulli x) =\n ?g x✝\n[PROOFSTEP]\nconv =>\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption))\n (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\ncase a\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ ∑ x in range (n + 1 - x✝),\n ↑(monomial x✝) (↑(Nat.choose (n + 1) (x✝ + x)) * ↑(Nat.choose (x✝ + x) x✝) * _root_.bernoulli x) =\n ?g x✝\n[PROOFSTEP]\nconv =>\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption)) (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n| ∑ x in range (n + 1 - x✝),\n ↑(monomial x✝) (↑(Nat.choose (n + 1) (x✝ + x)) * ↑(Nat.choose (x✝ + x) x✝) * _root_.bernoulli x)\n[PROOFSTEP]\n apply_congr\n ·skip\n ·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption)) (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n| ∑ x in range (n + 1 - x✝),\n ↑(monomial x✝) (↑(Nat.choose (n + 1) (x✝ + x)) * ↑(Nat.choose (x✝ + x) x✝) * _root_.bernoulli x)\n[PROOFSTEP]\napply_congr\n[GOAL]\ncase h\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ range (n + 1 - x✝) = ?s₂\ncase a\nn x✝¹ : ℕ\na✝¹ : x✝¹ ∈ range (n + 1)\nx✝ : ℕ\na✝ : x✝ ∈ ?s₂\n⊢ ↑(monomial x✝¹) (↑(Nat.choose (n + 1) (x✝¹ + x✝)) * ↑(Nat.choose (x✝¹ + x✝) x✝¹) * _root_.bernoulli x✝) = ?g x✝\n[PROOFSTEP]\n·skip\n[GOAL]\ncase h\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ range (n + 1 - x✝) = ?s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase h\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ range (n + 1 - x✝) = ?s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase h\nn x✝ : ℕ\na✝ : x✝ ∈ range (n + 1)\n⊢ range (n + 1 - x✝) = ?s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn x✝¹ : ℕ\na✝¹ : x✝¹ ∈ range (n + 1)\nx✝ : ℕ\na✝ : x✝ ∈ range (n + 1 - x✝¹)\n⊢ ↑(monomial x✝¹) (↑(Nat.choose (n + 1) (x✝¹ + x✝)) * ↑(Nat.choose (x✝¹ + x✝) x✝¹) * _root_.bernoulli x✝) = ?g x✝\n[PROOFSTEP]\n·rw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption)) (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\ncase a\nn x✝¹ : ℕ\na✝¹ : x✝¹ ∈ range (n + 1)\nx✝ : ℕ\na✝ : x✝ ∈ range (n + 1 - x✝¹)\n⊢ ↑(monomial x✝¹) (↑(Nat.choose (n + 1) (x✝¹ + x✝)) * ↑(Nat.choose (x✝¹ + x✝) x✝¹) * _root_.bernoulli x✝) = ?g x✝\n[PROOFSTEP]\nrw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption)) (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\ncase a\nn x✝¹ : ℕ\na✝¹ : x✝¹ ∈ range (n + 1)\nx✝ : ℕ\na✝ : x✝ ∈ range (n + 1 - x✝¹)\n⊢ ↑(monomial x✝¹) (↑(Nat.choose (n + 1) (x✝¹ + x✝)) * ↑(Nat.choose (x✝¹ + x✝) x✝¹) * _root_.bernoulli x✝) = ?g x✝\n[PROOFSTEP]\nrw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption)) (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\ncase a\nn x✝¹ : ℕ\na✝¹ : x✝¹ ∈ range (n + 1)\nx✝ : ℕ\na✝ : x✝ ∈ range (n + 1 - x✝¹)\n⊢ ↑(monomial x✝¹) (↑(Nat.choose (n + 1) (x✝¹ + x✝)) * ↑(Nat.choose (x✝¹ + x✝) x✝¹) * _root_.bernoulli x✝) = ?g x✝\n[PROOFSTEP]\nrw [← Nat.cast_mul,\n choose_mul ((le_tsub_iff_left <| mem_range_le (by assumption)).1 <| mem_range_le (by assumption)) (le.intro rfl),\n Nat.cast_mul, add_tsub_cancel_left, mul_assoc, mul_comm, ← smul_eq_mul, ← smul_monomial]\n[GOAL]\nn x✝¹ : ℕ\na✝¹ : x✝¹ ∈ range (n + 1)\nx✝ : ℕ\na✝ : x✝ ∈ range (n + 1 - x✝¹)\n⊢ x✝¹ ∈ range (n + 1)\n[PROOFSTEP]\nassumption\n[GOAL]\nn x✝¹ : ℕ\na✝¹ : x✝¹ ∈ range (n + 1)\nx✝ : ℕ\na✝ : x✝ ∈ range (n + 1 - x✝¹)\n⊢ x✝ ∈ range (n + 1 - x✝¹)\n[PROOFSTEP]\nassumption\n[GOAL]\nn : ℕ\n⊢ ∑ x in range (n + 1),\n ∑ x_1 in range (n + 1 - x),\n (↑(Nat.choose (n + 1 - x) x_1) * _root_.bernoulli x_1) • ↑(monomial x) ↑(Nat.choose (n + 1) x) =\n ↑(monomial n) ↑n + ↑(monomial n) 1\n[PROOFSTEP]\nsimp_rw [← sum_smul]\n[GOAL]\nn : ℕ\n⊢ ∑ x in range (n + 1),\n (∑ i in range (n + 1 - x), ↑(Nat.choose (n + 1 - x) i) * _root_.bernoulli i) •\n ↑(monomial x) ↑(Nat.choose (n + 1) x) =\n ↑(monomial n) ↑n + ↑(monomial n) 1\n[PROOFSTEP]\nrw [sum_range_succ_comm]\n[GOAL]\nn : ℕ\n⊢ (∑ i in range (n + 1 - n), ↑(Nat.choose (n + 1 - n) i) * _root_.bernoulli i) • ↑(monomial n) ↑(Nat.choose (n + 1) n) +\n ∑ x in range n,\n (∑ i in range (n + 1 - x), ↑(Nat.choose (n + 1 - x) i) * _root_.bernoulli i) •\n ↑(monomial x) ↑(Nat.choose (n + 1) x) =\n ↑(monomial n) ↑n + ↑(monomial n) 1\n[PROOFSTEP]\nsimp only [add_right_eq_self, mul_one, cast_one, cast_add, add_tsub_cancel_left, choose_succ_self_right, one_smul,\n _root_.bernoulli_zero, sum_singleton, zero_add, map_add, range_one, bernoulli_zero, mul_one, one_mul, add_zero,\n choose_self]\n[GOAL]\nn : ℕ\n⊢ ∑ x in range n,\n (∑ i in range (n + 1 - x), ↑(Nat.choose (n + 1 - x) i) * _root_.bernoulli i) •\n ↑(monomial x) ↑(Nat.choose (n + 1) x) =\n 0\n[PROOFSTEP]\napply sum_eq_zero fun x hx => _\n[GOAL]\nn : ℕ\n⊢ ∀ (x : ℕ),\n x ∈ range n →\n (∑ i in range (n + 1 - x), ↑(Nat.choose (n + 1 - x) i) * _root_.bernoulli i) •\n ↑(monomial x) ↑(Nat.choose (n + 1) x) =\n 0\n[PROOFSTEP]\nhave f : ∀ x ∈ range n, ¬n + 1 - x = 1 := by\n rintro x H\n rw [mem_range] at H \n rw [eq_comm]\n exact _root_.ne_of_lt (Nat.lt_of_lt_of_le one_lt_two (le_tsub_of_add_le_left (succ_le_succ H)))\n[GOAL]\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\n[PROOFSTEP]\nrintro x H\n[GOAL]\nn x : ℕ\nH : x ∈ range n\n⊢ ¬n + 1 - x = 1\n[PROOFSTEP]\nrw [mem_range] at H \n[GOAL]\nn x : ℕ\nH : x < n\n⊢ ¬n + 1 - x = 1\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\nn x : ℕ\nH : x < n\n⊢ ¬1 = n + 1 - x\n[PROOFSTEP]\nexact _root_.ne_of_lt (Nat.lt_of_lt_of_le one_lt_two (le_tsub_of_add_le_left (succ_le_succ H)))\n[GOAL]\nn : ℕ\nf : ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\n⊢ ∀ (x : ℕ),\n x ∈ range n →\n (∑ i in range (n + 1 - x), ↑(Nat.choose (n + 1 - x) i) * _root_.bernoulli i) •\n ↑(monomial x) ↑(Nat.choose (n + 1) x) =\n 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\nn : ℕ\nf : ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\nx : ℕ\nhx : x ∈ range n\n⊢ (∑ i in range (n + 1 - x), ↑(Nat.choose (n + 1 - x) i) * _root_.bernoulli i) • ↑(monomial x) ↑(Nat.choose (n + 1) x) =\n 0\n[PROOFSTEP]\nrw [sum_bernoulli]\n[GOAL]\nn : ℕ\nf : ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\nx : ℕ\nhx : x ∈ range n\n⊢ (if n + 1 - x = 1 then 1 else 0) • ↑(monomial x) ↑(Nat.choose (n + 1) x) = 0\n[PROOFSTEP]\nhave g : ite (n + 1 - x = 1) (1 : ℚ) 0 = 0 :=\n by\n simp only [ite_eq_right_iff, one_ne_zero]\n intro h₁\n exact (f x hx) h₁\n[GOAL]\nn : ℕ\nf : ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\nx : ℕ\nhx : x ∈ range n\n⊢ (if n + 1 - x = 1 then 1 else 0) = 0\n[PROOFSTEP]\nsimp only [ite_eq_right_iff, one_ne_zero]\n[GOAL]\nn : ℕ\nf : ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\nx : ℕ\nhx : x ∈ range n\n⊢ n + 1 - x = 1 → False\n[PROOFSTEP]\nintro h₁\n[GOAL]\nn : ℕ\nf : ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\nx : ℕ\nhx : x ∈ range n\nh₁ : n + 1 - x = 1\n⊢ False\n[PROOFSTEP]\nexact (f x hx) h₁\n[GOAL]\nn : ℕ\nf : ∀ (x : ℕ), x ∈ range n → ¬n + 1 - x = 1\nx : ℕ\nhx : x ∈ range n\ng : (if n + 1 - x = 1 then 1 else 0) = 0\n⊢ (if n + 1 - x = 1 then 1 else 0) • ↑(monomial x) ↑(Nat.choose (n + 1) x) = 0\n[PROOFSTEP]\nrw [g, zero_smul]\n[GOAL]\nn : ℕ\n⊢ ↑(succ n) • bernoulli n = ↑(monomial n) ↑(succ n) - ∑ k in range n, ↑(Nat.choose (n + 1) k) • bernoulli k\n[PROOFSTEP]\nrw [Nat.cast_succ, ← sum_bernoulli n, sum_range_succ, add_sub_cancel', choose_succ_self_right, Nat.cast_succ]\n[GOAL]\nn p : ℕ\n⊢ (↑p + 1) * ∑ k in range n, ↑k ^ p = eval (↑n) (bernoulli (succ p)) - _root_.bernoulli (succ p)\n[PROOFSTEP]\nrw [sum_range_pow, bernoulli_def, eval_finset_sum, ← sum_div, mul_div_cancel' _ _]\n[GOAL]\nn p : ℕ\n⊢ ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) =\n ∑ i in range (succ p + 1), eval (↑n) (↑(monomial i) (_root_.bernoulli (succ p - i) * ↑(Nat.choose (succ p) i))) -\n _root_.bernoulli (succ p)\n[PROOFSTEP]\nsimp_rw [eval_monomial]\n[GOAL]\nn p : ℕ\n⊢ ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) =\n ∑ x in range (succ p + 1), _root_.bernoulli (succ p - x) * ↑(Nat.choose (succ p) x) * ↑n ^ x -\n _root_.bernoulli (succ p)\n[PROOFSTEP]\nsymm\n[GOAL]\nn p : ℕ\n⊢ ∑ x in range (succ p + 1), _root_.bernoulli (succ p - x) * ↑(Nat.choose (succ p) x) * ↑n ^ x -\n _root_.bernoulli (succ p) =\n ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)\n[PROOFSTEP]\nrw [← sum_flip _, sum_range_succ]\n[GOAL]\nn p : ℕ\n⊢ ∑ x in range (p + 1),\n _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) +\n _root_.bernoulli (succ p - (p + 1 - (p + 1))) * ↑(Nat.choose (succ p) (p + 1 - (p + 1))) *\n ↑n ^ (p + 1 - (p + 1)) -\n _root_.bernoulli (succ p) =\n ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)\n[PROOFSTEP]\nsimp only [tsub_self, tsub_zero, choose_zero_right, cast_one, mul_one, _root_.pow_zero, add_tsub_cancel_right]\n[GOAL]\nn p : ℕ\n⊢ ∑ x in range (p + 1),\n _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) =\n ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)\n[PROOFSTEP]\napply sum_congr rfl fun x hx => _\n[GOAL]\nn p : ℕ\n⊢ ∀ (x : ℕ),\n x ∈ range (p + 1) →\n _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) =\n _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nn p x : ℕ\nhx : x ∈ range (p + 1)\n⊢ _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) =\n _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)\n[PROOFSTEP]\napply congr_arg₂ _ (congr_arg₂ _ _ _) rfl\n[GOAL]\nn p x : ℕ\nhx : x ∈ range (p + 1)\n⊢ _root_.bernoulli (succ p - (p + 1 - x)) = _root_.bernoulli x\n[PROOFSTEP]\nrw [Nat.sub_sub_self (mem_range_le hx)]\n[GOAL]\nn p x : ℕ\nhx : x ∈ range (p + 1)\n⊢ ↑(Nat.choose (succ p) (p + 1 - x)) = ↑(Nat.choose (p + 1) x)\n[PROOFSTEP]\nrw [← choose_symm (mem_range_le hx)]\n[GOAL]\nn p : ℕ\n⊢ ↑p + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn p : ℕ\n⊢ ¬p + 1 = 0\n[PROOFSTEP]\napply succ_ne_zero _\n[GOAL]\nn p : ℕ\n⊢ eval (↑n) (bernoulli (succ p)) = _root_.bernoulli (succ p) + (↑p + 1) * ∑ k in range n, ↑k ^ p\n[PROOFSTEP]\napply eq_add_of_sub_eq'\n[GOAL]\ncase h\nn p : ℕ\n⊢ eval (↑n) (bernoulli (succ p)) - _root_.bernoulli (succ p) = (↑p + 1) * ∑ k in range n, ↑k ^ p\n[PROOFSTEP]\nrw [sum_range_pow_eq_bernoulli_sub]\n[GOAL]\nn : ℕ\nx : ℚ\n⊢ eval (1 + x) (bernoulli n) = eval x (bernoulli n) + ↑n * x ^ (n - 1)\n[PROOFSTEP]\nrefine' Nat.strong_induction_on n fun d hd => _\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\n⊢ eval (1 + x) (bernoulli d) = eval x (bernoulli d) + ↑d * x ^ (d - 1)\n[PROOFSTEP]\nhave nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by norm_cast\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\n⊢ ↑(succ d) ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ eval (1 + x) (bernoulli d) = eval x (bernoulli d) + ↑d * x ^ (d - 1)\n[PROOFSTEP]\napply (mul_right_inj' nz).1\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ ↑(succ d) * eval (1 + x) (bernoulli d) = ↑(succ d) * (eval x (bernoulli d) + ↑d * x ^ (d - 1))\n[PROOFSTEP]\nrw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum,\n eval_sub, eval_finset_sum]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ eval (1 + x) (↑(monomial d) ↑(succ d)) - ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i) =\n eval x (↑(monomial d) ↑(succ d) - ∑ k in range d, ↑(Nat.choose (d + 1) k) • bernoulli k) +\n ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\nconv_lhs =>\n congr\n ·skip\n · apply_congr\n ·skip\n ·rw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| eval (1 + x) (↑(monomial d) ↑(succ d)) - ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\n congr\n ·skip\n · apply_congr\n ·skip\n ·rw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| eval (1 + x) (↑(monomial d) ↑(succ d)) - ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\n congr\n ·skip\n · apply_congr\n ·skip\n ·rw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| eval (1 + x) (↑(monomial d) ↑(succ d)) - ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| eval (1 + x) (↑(monomial d) ↑(succ d))\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| eval (1 + x) (↑(monomial d) ↑(succ d))\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| eval (1 + x) (↑(monomial d) ↑(succ d))\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| eval (1 + x) (↑(monomial d) ↑(succ d))\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\n· apply_congr\n ·skip\n ·rw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\n apply_congr\n ·skip\n ·rw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\n apply_congr\n ·skip\n ·rw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)\n[PROOFSTEP]\napply_congr\n[GOAL]\ncase a.h\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ range d = ?a.s₂\ncase a.a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ ?a.s₂\n⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a.h\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ range d = ?a.s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.h\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ range d = ?a.s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.h\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ range d = ?a.s₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ range d\n⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝\n[PROOFSTEP]\n·rw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\ncase a.a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ range d\n⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝\n[PROOFSTEP]\nrw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\ncase a.a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ range d\n⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝\n[PROOFSTEP]\nrw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\ncase a.a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ range d\n⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝\n[PROOFSTEP]\nrw [eval_smul, hd _ (mem_range.1 (by assumption))]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ range d\n⊢ x✝ ∈ range d\n[PROOFSTEP]\nassumption\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ eval (1 + x) (↑(monomial d) ↑(succ d)) -\n ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (eval x (bernoulli x_1) + ↑x_1 * x ^ (x_1 - 1)) =\n eval x (↑(monomial d) ↑(succ d) - ∑ k in range d, ↑(Nat.choose (d + 1) k) • bernoulli k) +\n ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\nrw [eval_sub, eval_finset_sum]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ eval (1 + x) (↑(monomial d) ↑(succ d)) -\n ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (eval x (bernoulli x_1) + ↑x_1 * x ^ (x_1 - 1)) =\n eval x (↑(monomial d) ↑(succ d)) - ∑ i in range d, eval x (↑(Nat.choose (d + 1) i) • bernoulli i) +\n ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\nsimp_rw [eval_smul, smul_add]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ eval (1 + x) (↑(monomial d) ↑(succ d)) -\n ∑ x_1 in range d,\n (↑(Nat.choose (d + 1) x_1) • eval x (bernoulli x_1) + ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))) =\n eval x (↑(monomial d) ↑(succ d)) - ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • eval x (bernoulli x_1) +\n ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\nrw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ eval (1 + x) (↑(monomial d) ↑(succ d)) - eval x (↑(monomial d) ↑(succ d)) =\n ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\nconv_rhs =>\n congr\n ·skip\n · congr\n rw [succ_eq_add_one, ← choose_succ_self_right d]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\n congr\n ·skip\n · congr\n rw [succ_eq_add_one, ← choose_succ_self_right d]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\n congr\n ·skip\n · congr\n rw [succ_eq_add_one, ← choose_succ_self_right d]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\n· congr\n rw [succ_eq_add_one, ← choose_succ_self_right d]\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\n congr\n rw [succ_eq_add_one, ← choose_succ_self_right d]\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\n congr\n rw [succ_eq_add_one, ← choose_succ_self_right d]\n[GOAL]\ncase a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ↑(succ d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ↑(succ d)\ncase a.a\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n| ↑d * x ^ (d - 1)\n[PROOFSTEP]\nrw [succ_eq_add_one, ← choose_succ_self_right d]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ eval (1 + x) (↑(monomial d) ↑(succ d)) - eval x (↑(monomial d) ↑(succ d)) =\n ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(Nat.choose (d + 1) d) * (↑d * x ^ (d - 1))\n[PROOFSTEP]\nrw [Nat.cast_succ, ← smul_eq_mul, ← sum_range_succ _ d, eval_monomial_one_add_sub]\n[GOAL]\nn : ℕ\nx : ℚ\nd : ℕ\nhd : ∀ (m : ℕ), m < d → eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)\nnz : ↑(succ d) ≠ 0\n⊢ ∑ x_1 in range (d + 1), ↑(Nat.choose (d + 1) x_1) * (↑x_1 * x ^ (x_1 - 1)) =\n ∑ x_1 in range (d + 1), ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))\n[PROOFSTEP]\nsimp_rw [smul_eq_mul]\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\n⊢ (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) * (exp A - 1) = PowerSeries.X * ↑(rescale t) (exp A)\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\n⊢ ↑(PowerSeries.coeff A n) ((PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) * (exp A - 1)) =\n ↑(PowerSeries.coeff A n) (PowerSeries.X * ↑(rescale t) (exp A))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\n⊢ ↑(PowerSeries.coeff A Nat.zero) ((PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) * (exp A - 1)) =\n ↑(PowerSeries.coeff A Nat.zero) (PowerSeries.X * ↑(rescale t) (exp A))\n[PROOFSTEP]\nsimp\n -- n ≥ 1, the coefficients is a sum to n+2, so use `sum_range_succ` to write as\n -- last term plus sum to n+1\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\n⊢ ↑(PowerSeries.coeff A (succ n)) ((PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) * (exp A - 1)) =\n ↑(PowerSeries.coeff A (succ n)) (PowerSeries.X * ↑(rescale t) (exp A))\n[PROOFSTEP]\nrw [coeff_succ_X_mul, coeff_rescale, coeff_exp, PowerSeries.coeff_mul, Nat.sum_antidiagonal_eq_sum_range_succ_mk,\n sum_range_succ]\n -- last term is zero so kill with `add_zero`\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\n⊢ ∑ x in range (n + 1),\n ↑(PowerSeries.coeff A (x, succ n - x).fst) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (x, succ n - x).snd) (exp A - 1) +\n ↑(PowerSeries.coeff A (n + 1, succ n - (n + 1)).fst)\n (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (n + 1, succ n - (n + 1)).snd) (exp A - 1) =\n t ^ n * ↑(algebraMap ℚ A) (1 / ↑n !)\n[PROOFSTEP]\nsimp only [RingHom.map_sub, tsub_self, constantCoeff_one, constantCoeff_exp, coeff_zero_eq_constantCoeff, mul_zero,\n sub_self, add_zero]\n -- Let's multiply both sides by (n+1)! (OK because it's a unit)\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\n⊢ ∑ x in range (n + 1),\n ↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1) =\n t ^ n * ↑(algebraMap ℚ A) (1 / ↑n !)\n[PROOFSTEP]\nhave hnp1 : IsUnit ((n + 1)! : ℚ) := IsUnit.mk0 _ (by exact_mod_cast factorial_ne_zero (n + 1))\n[GOAL]\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\n⊢ ↑(n + 1)! ≠ 0\n[PROOFSTEP]\nexact_mod_cast factorial_ne_zero (n + 1)\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\n⊢ ∑ x in range (n + 1),\n ↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1) =\n t ^ n * ↑(algebraMap ℚ A) (1 / ↑n !)\n[PROOFSTEP]\nrw [← (hnp1.map (algebraMap ℚ A)).mul_right_inj]\n -- do trivial rearrangements to make RHS (n+1)*t^n\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\n⊢ ↑(algebraMap ℚ A) ↑(n + 1)! *\n ∑ x in range (n + 1),\n ↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1) =\n ↑(algebraMap ℚ A) ↑(n + 1)! * (t ^ n * ↑(algebraMap ℚ A) (1 / ↑n !))\n[PROOFSTEP]\nrw [mul_left_comm, ← RingHom.map_mul]\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\n⊢ ↑(algebraMap ℚ A) ↑(n + 1)! *\n ∑ x in range (n + 1),\n ↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1) =\n t ^ n * ↑(algebraMap ℚ A) (↑(n + 1)! * (1 / ↑n !))\n[PROOFSTEP]\nchange _ = t ^ n * algebraMap ℚ A (((n + 1) * n ! : ℕ) * (1 / n !))\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\n⊢ ↑(algebraMap ℚ A) ↑(n + 1)! *\n ∑ x in range (n + 1),\n ↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1) =\n t ^ n * ↑(algebraMap ℚ A) (↑((n + 1) * n !) * (1 / ↑n !))\n[PROOFSTEP]\nrw [cast_mul, mul_assoc, mul_one_div_cancel (show (n ! : ℚ) ≠ 0 from cast_ne_zero.2 (factorial_ne_zero n)), mul_one,\n mul_comm (t ^ n), ← aeval_monomial, cast_add, cast_one]\n -- But this is the RHS of `Polynomial.sum_bernoulli`\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\n⊢ ↑(algebraMap ℚ A) ↑(n + 1)! *\n ∑ x in range (n + 1),\n ↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1) =\n ↑(aeval t) (↑(monomial n) (↑n + 1))\n[PROOFSTEP]\nrw [← sum_bernoulli, Finset.mul_sum, AlgHom.map_sum]\n -- and now we have to prove a sum is a sum, but all the terms are equal.\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\n⊢ ∑ x in range (n + 1),\n ↑(algebraMap ℚ A) ↑(n + 1)! *\n (↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1)) =\n ∑ x in range (n + 1), ↑(aeval t) (↑(Nat.choose (n + 1) x) • bernoulli x)\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\n⊢ ∀ (x : ℕ),\n x ∈ range (n + 1) →\n ↑(algebraMap ℚ A) ↑(n + 1)! *\n (↑(PowerSeries.coeff A x) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - x)) (exp A - 1)) =\n ↑(aeval t) (↑(Nat.choose (n + 1) x) • bernoulli x)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\ni : ℕ\nhi : i ∈ range (n + 1)\n⊢ ↑(algebraMap ℚ A) ↑(n + 1)! *\n (↑(PowerSeries.coeff A i) (PowerSeries.mk fun n => ↑(aeval t) ((1 / ↑n !) • bernoulli n)) *\n ↑(PowerSeries.coeff A (succ n - i)) (exp A - 1)) =\n ↑(aeval t) (↑(Nat.choose (n + 1) i) • bernoulli i)\n[PROOFSTEP]\nsimp only [Nat.cast_choose ℚ (mem_range_le hi), coeff_mk, if_neg (mem_range_sub_ne_zero hi), one_div, AlgHom.map_smul,\n PowerSeries.coeff_one, coeff_exp, sub_zero, LinearMap.map_sub, Algebra.smul_mul_assoc, Algebra.smul_def,\n mul_right_comm _ ((aeval t) _), ← mul_assoc, ← RingHom.map_mul, succ_eq_add_one, ← Polynomial.C_eq_algebraMap,\n Polynomial.aeval_mul, Polynomial.aeval_C]\n -- finally cancel the Bernoulli polynomial and the algebra_map\n[GOAL]\ncase h.succ\nA : Type u_1\ninst✝¹ : CommRing A\ninst✝ : Algebra ℚ A\nt : A\nn : ℕ\nhnp1 : IsUnit ↑(n + 1)!\ni : ℕ\nhi : i ∈ range (n + 1)\n⊢ ↑(algebraMap ℚ A) (↑(n + 1)! * (↑i !)⁻¹ * (↑(n + 1 - i)!)⁻¹) * ↑(aeval t) (bernoulli i) =\n ↑(algebraMap ℚ A) (↑(n + 1)! / (↑i ! * ↑(n + 1 - i)!)) * ↑(aeval t) (bernoulli i)\n[PROOFSTEP]\nfield_simp\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.BernoulliPolynomials", "llama_tokens": 22955, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430562234877, "lm_q2_score": 0.731058584489497, "lm_q1q2_score": 0.6076142661910173}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : α → β → γ\nx : Vector α n\ny : Vector β n\n⊢ List.length (List.zipWith f ↑x ↑y) = n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : α → β → γ\nx : Vector α n\ny : Vector β n\ni : Fin n\n⊢ get (zipWith f x y) i = f (get x i) (get y i)\n[PROOFSTEP]\ndsimp only [Vector.zipWith, Vector.get]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : α → β → γ\nx : Vector α n\ny : Vector β n\ni : Fin n\n⊢ List.nthLe (List.zipWith f ↑x ↑y) ↑i (_ : ↑i < List.length (List.zipWith f ↑x ↑y)) =\n f\n (match x, i with\n | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))\n (match y, i with\n | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : α → β → γ\ny : Vector β n\ni : Fin n\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ List.nthLe (List.zipWith f ↑{ val := val✝, property := property✝ } ↑y) ↑i\n (_ : ↑i < List.length (List.zipWith f ↑{ val := val✝, property := property✝ } ↑y)) =\n f\n (match { val := val✝, property := property✝ }, i with\n | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))\n (match y, i with\n | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : α → β → γ\ni : Fin n\nval✝¹ : List α\nproperty✝¹ : List.length val✝¹ = n\nval✝ : List β\nproperty✝ : List.length val✝ = n\n⊢ List.nthLe (List.zipWith f ↑{ val := val✝¹, property := property✝¹ } ↑{ val := val✝, property := property✝ }) ↑i\n (_ :\n ↑i <\n List.length\n (List.zipWith f ↑{ val := val✝¹, property := property✝¹ } ↑{ val := val✝, property := property✝ })) =\n f\n (match { val := val✝¹, property := property✝¹ }, i with\n | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))\n (match { val := val✝, property := property✝ }, i with\n | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))\n[PROOFSTEP]\nsimp only [List.nthLe_zipWith]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : α → β → γ\nx : Vector α n\ny : Vector β n\n⊢ tail (zipWith f x y) = zipWith f (tail x) (tail y)\n[PROOFSTEP]\next\n[GOAL]\ncase x\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\nf : α → β → γ\nx : Vector α n\ny : Vector β n\nm✝ : Fin (n - 1)\n⊢ get (tail (zipWith f x y)) m✝ = get (zipWith f (tail x) (tail y)) m✝\n[PROOFSTEP]\nsimp [get_tail]\n", "meta": {"mathlib_filename": "Mathlib.Data.Vector.Zip", "llama_tokens": 1194, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867777396212, "lm_q2_score": 0.7606506581031359, "lm_q1q2_score": 0.6071412977768643}} {"text": "[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\n⊢ SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm) =ᵐ[μ] μ[f|m]\n[PROOFSTEP]\nrefine' ae_eq_condexp_of_forall_set_integral_eq hm hf _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\n⊢ ∀ (s : Set α),\n MeasurableSet s →\n ↑↑μ s < ⊤ →\n IntegrableOn (SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm)) s\n[PROOFSTEP]\nexact fun _ _ _ =>\n (integrable_of_integrable_trim hm\n (SignedMeasure.integrable_rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm))).integrableOn\n[GOAL]\ncase refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\n⊢ ∀ (s : Set α),\n MeasurableSet s →\n ↑↑μ s < ⊤ →\n ∫ (x : α) in s,\n SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm) x ∂μ =\n ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nintro s hs _\n[GOAL]\ncase refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\ns : Set α\nhs : MeasurableSet s\na✝ : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s, SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm) x ∂μ =\n ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nconv_rhs =>\n rw [← hf.withDensityᵥ_trim_eq_integral hm hs, ←\n SignedMeasure.withDensityᵥ_rnDeriv_eq ((μ.withDensityᵥ f).trim hm) (μ.trim hm)\n (hf.withDensityᵥ_trim_absolutelyContinuous hm)]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\ns : Set α\nhs : MeasurableSet s\na✝ : ↑↑μ s < ⊤\n| ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [← hf.withDensityᵥ_trim_eq_integral hm hs, ←\n SignedMeasure.withDensityᵥ_rnDeriv_eq ((μ.withDensityᵥ f).trim hm) (μ.trim hm)\n (hf.withDensityᵥ_trim_absolutelyContinuous hm)]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\ns : Set α\nhs : MeasurableSet s\na✝ : ↑↑μ s < ⊤\n| ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [← hf.withDensityᵥ_trim_eq_integral hm hs, ←\n SignedMeasure.withDensityᵥ_rnDeriv_eq ((μ.withDensityᵥ f).trim hm) (μ.trim hm)\n (hf.withDensityᵥ_trim_absolutelyContinuous hm)]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\ns : Set α\nhs : MeasurableSet s\na✝ : ↑↑μ s < ⊤\n| ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [← hf.withDensityᵥ_trim_eq_integral hm hs, ←\n SignedMeasure.withDensityᵥ_rnDeriv_eq ((μ.withDensityᵥ f).trim hm) (μ.trim hm)\n (hf.withDensityᵥ_trim_absolutelyContinuous hm)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\ns : Set α\nhs : MeasurableSet s\na✝ : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s, SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm) x ∂μ =\n ↑(Measure.withDensityᵥ (Measure.trim μ hm)\n (SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm)))\n s\n[PROOFSTEP]\nrw [withDensityᵥ_apply (SignedMeasure.integrable_rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm)) hs, ←\n set_integral_trim hm _ hs]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\ns : Set α\nhs : MeasurableSet s\na✝ : ↑↑μ s < ⊤\n⊢ StronglyMeasurable fun x =>\n SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm) x\n[PROOFSTEP]\nexact (SignedMeasure.measurable_rnDeriv _ _).stronglyMeasurable\n[GOAL]\ncase refine'_3\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\nf : α → ℝ\nhf : Integrable f\n⊢ AEStronglyMeasurable' m (SignedMeasure.rnDeriv (VectorMeasure.trim (Measure.withDensityᵥ μ f) hm) (Measure.trim μ hm))\n μ\n[PROOFSTEP]\nexact StronglyMeasurable.aeStronglyMeasurable' (SignedMeasure.measurable_rnDeriv _ _).stronglyMeasurable\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nby_cases hf : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : ¬Integrable f\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : ¬Integrable f\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nrw [condexp_undef hf, snorm_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : ¬Integrable f\n⊢ 0 ≤ snorm f 1 μ\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nby_cases hm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : ¬m ≤ m0\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : ¬m ≤ m0\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nrw [condexp_of_not_le hm, snorm_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : ¬m ≤ m0\n⊢ 0 ≤ snorm f 1 μ\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nby_cases hsig : SigmaFinite (μ.trim hm)\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : ¬SigmaFinite (Measure.trim μ hm)\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : ¬SigmaFinite (Measure.trim μ hm)\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\nrw [condexp_of_not_sigmaFinite hm hsig, snorm_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : ¬SigmaFinite (Measure.trim μ hm)\n⊢ 0 ≤ snorm f 1 μ\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm f 1 μ\n[PROOFSTEP]\ncalc\n snorm (μ[f|m]) 1 μ ≤ snorm (μ[(|f|)|m]) 1 μ := by\n refine' snorm_mono_ae _\n filter_upwards [@condexp_mono _ m m0 _ _ _ _ _ _ _ _ hf hf.abs\n (@ae_of_all _ m0 _ μ (fun x => le_abs_self (f x) : ∀ x, f x ≤ |f x|)),\n EventuallyLE.trans (condexp_neg f).symm.le\n (@condexp_mono _ m m0 _ _ _ _ _ _ _ _ hf.neg hf.abs\n (@ae_of_all _ m0 _ μ (fun x => neg_le_abs_self (f x) : ∀ x, -f x ≤ |f x|)))] with\n x hx₁ hx₂\n exact abs_le_abs hx₁ hx₂\n _ = snorm f 1 μ :=\n by\n rw [snorm_one_eq_lintegral_nnnorm, snorm_one_eq_lintegral_nnnorm, ←\n ENNReal.toReal_eq_toReal (ne_of_lt integrable_condexp.2) (ne_of_lt hf.2), ←\n integral_norm_eq_lintegral_nnnorm (stronglyMeasurable_condexp.mono hm).aestronglyMeasurable, ←\n integral_norm_eq_lintegral_nnnorm hf.1]\n simp_rw [Real.norm_eq_abs]\n rw [← @integral_condexp _ _ _ _ _ m m0 μ _ hm hsig hf.abs]\n refine' integral_congr_ae _\n have : 0 ≤ᵐ[μ] μ[(|f|)|m] := by\n rw [← @condexp_zero α ℝ _ _ _ m m0 μ]\n exact\n condexp_mono (integrable_zero _ _ _) hf.abs (@ae_of_all _ m0 _ μ (fun x => abs_nonneg (f x) : ∀ x, 0 ≤ |f x|))\n filter_upwards [this] with x hx\n exact abs_eq_self.2 hx\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ snorm (μ[f|m]) 1 μ ≤ snorm (μ[|f||m]) 1 μ\n[PROOFSTEP]\nrefine' snorm_mono_ae _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ ∀ᵐ (x : α) ∂μ, ‖(μ[f|m]) x‖ ≤ ‖(μ[|f||m]) x‖\n[PROOFSTEP]\nfilter_upwards [@condexp_mono _ m m0 _ _ _ _ _ _ _ _ hf hf.abs\n (@ae_of_all _ m0 _ μ (fun x => le_abs_self (f x) : ∀ x, f x ≤ |f x|)),\n EventuallyLE.trans (condexp_neg f).symm.le\n (@condexp_mono _ m m0 _ _ _ _ _ _ _ _ hf.neg hf.abs\n (@ae_of_all _ m0 _ μ (fun x => neg_le_abs_self (f x) : ∀ x, -f x ≤ |f x|)))] with\n x hx₁ hx₂\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\nx : α\nhx₁ : (μ[f|m]) x ≤ (μ[fun a => |f a||m]) x\nhx₂ : (-μ[f|m]) x ≤ (μ[fun a => |f a||m]) x\n⊢ ‖(μ[f|m]) x‖ ≤ ‖(μ[|f||m]) x‖\n[PROOFSTEP]\nexact abs_le_abs hx₁ hx₂\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ snorm (μ[|f||m]) 1 μ = snorm f 1 μ\n[PROOFSTEP]\nrw [snorm_one_eq_lintegral_nnnorm, snorm_one_eq_lintegral_nnnorm, ←\n ENNReal.toReal_eq_toReal (ne_of_lt integrable_condexp.2) (ne_of_lt hf.2), ←\n integral_norm_eq_lintegral_nnnorm (stronglyMeasurable_condexp.mono hm).aestronglyMeasurable, ←\n integral_norm_eq_lintegral_nnnorm hf.1]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ ∫ (x : α), ‖(μ[|f||m]) x‖ ∂μ = ∫ (x : α), ‖f x‖ ∂μ\n[PROOFSTEP]\nsimp_rw [Real.norm_eq_abs]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ ∫ (x : α), |(μ[|f||m]) x| ∂μ = ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nrw [← @integral_condexp _ _ _ _ _ m m0 μ _ hm hsig hf.abs]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ ∫ (x : α), |(μ[|f||m]) x| ∂μ = ∫ (x : α), (μ[fun a => |f a||m]) x ∂μ\n[PROOFSTEP]\nrefine' integral_congr_ae _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ (fun x => |(μ[|f||m]) x|) =ᵐ[μ] fun x => (μ[fun a => |f a||m]) x\n[PROOFSTEP]\nhave : 0 ≤ᵐ[μ] μ[(|f|)|m] := by\n rw [← @condexp_zero α ℝ _ _ _ m m0 μ]\n exact condexp_mono (integrable_zero _ _ _) hf.abs (@ae_of_all _ m0 _ μ (fun x => abs_nonneg (f x) : ∀ x, 0 ≤ |f x|))\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ 0 ≤ᵐ[μ] μ[|f||m]\n[PROOFSTEP]\nrw [← @condexp_zero α ℝ _ _ _ m m0 μ]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\n⊢ μ[0|m] ≤ᵐ[μ] μ[|f||m]\n[PROOFSTEP]\nexact condexp_mono (integrable_zero _ _ _) hf.abs (@ae_of_all _ m0 _ μ (fun x => abs_nonneg (f x) : ∀ x, 0 ≤ |f x|))\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\nthis : 0 ≤ᵐ[μ] μ[|f||m]\n⊢ (fun x => |(μ[|f||m]) x|) =ᵐ[μ] fun x => (μ[fun a => |f a||m]) x\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhf : Integrable f\nhm : m ≤ m0\nhsig : SigmaFinite (Measure.trim μ hm)\nthis : 0 ≤ᵐ[μ] μ[|f||m]\nx : α\nhx : OfNat.ofNat 0 x ≤ (μ[|f||m]) x\n⊢ |(μ[|f||m]) x| = (μ[fun a => |f a||m]) x\n[PROOFSTEP]\nexact abs_eq_self.2 hx\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nby_cases hm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : ¬m ≤ m0\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : ¬m ≤ m0\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nsimp_rw [condexp_of_not_le hm, Pi.zero_apply, abs_zero, integral_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : ¬m ≤ m0\n⊢ 0 ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => abs_nonneg _\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nby_cases hfint : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : ¬Integrable f\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : ¬Integrable f\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nsimp only [condexp_undef hfint, Pi.zero_apply, abs_zero, integral_const, Algebra.id.smul_eq_mul, mul_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : ¬Integrable f\n⊢ 0 ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => abs_nonneg _\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫ (x : α), |(μ[f|m]) x| ∂μ ≤ ∫ (x : α), |f x| ∂μ\n[PROOFSTEP]\nrw [integral_eq_lintegral_of_nonneg_ae, integral_eq_lintegral_of_nonneg_ae]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ENNReal.toReal (∫⁻ (a : α), ENNReal.ofReal |(μ[f|m]) a| ∂μ) ≤ ENNReal.toReal (∫⁻ (a : α), ENNReal.ofReal |f a| ∂μ)\n[PROOFSTEP]\nrw [ENNReal.toReal_le_toReal]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫⁻ (a : α), ENNReal.ofReal |(μ[f|m]) a| ∂μ ≤ ∫⁻ (a : α), ENNReal.ofReal |f a| ∂μ\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs, ofReal_norm_eq_coe_nnnorm]\n[GOAL]\ncase pos.ha\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫⁻ (a : α), ENNReal.ofReal |(μ[f|m]) a| ∂μ ≠ ⊤\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs, ofReal_norm_eq_coe_nnnorm]\n[GOAL]\ncase pos.hb\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫⁻ (a : α), ENNReal.ofReal |f a| ∂μ ≠ ⊤\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs, ofReal_norm_eq_coe_nnnorm]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫⁻ (a : α), ↑‖(μ[f|m]) a‖₊ ∂μ ≤ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ\n[PROOFSTEP]\nrw [← snorm_one_eq_lintegral_nnnorm, ← snorm_one_eq_lintegral_nnnorm]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ snorm (fun a => (μ[f|m]) a) 1 μ ≤ snorm (fun a => f a) 1 μ\n[PROOFSTEP]\nexact snorm_one_condexp_le_snorm _\n[GOAL]\ncase pos.ha\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫⁻ (a : α), ↑‖(μ[f|m]) a‖₊ ∂μ ≠ ⊤\n[PROOFSTEP]\nexact ne_of_lt integrable_condexp.2\n[GOAL]\ncase pos.hb\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ ≠ ⊤\n[PROOFSTEP]\nexact ne_of_lt hfint.2\n[GOAL]\ncase pos.hf\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ 0 ≤ᵐ[μ] fun x => |f x|\n[PROOFSTEP]\nexact eventually_of_forall fun x => abs_nonneg _\n[GOAL]\ncase pos.hfm\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ AEStronglyMeasurable (fun x => |f x|) μ\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs]\n[GOAL]\ncase pos.hfm\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ AEStronglyMeasurable (fun x => ‖f x‖) μ\n[PROOFSTEP]\nexact hfint.1.norm\n[GOAL]\ncase pos.hf\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ 0 ≤ᵐ[μ] fun x => |(μ[f|m]) x|\n[PROOFSTEP]\nexact eventually_of_forall fun x => abs_nonneg _\n[GOAL]\ncase pos.hfm\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ AEStronglyMeasurable (fun x => |(μ[f|m]) x|) μ\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs]\n[GOAL]\ncase pos.hfm\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\nhm : m ≤ m0\nhfint : Integrable f\n⊢ AEStronglyMeasurable (fun x => ‖(μ[f|m]) x‖) μ\n[PROOFSTEP]\nexact (stronglyMeasurable_condexp.mono hm).aestronglyMeasurable.norm\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nby_cases hnm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : ¬m ≤ m0\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : ¬m ≤ m0\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nsimp_rw [condexp_of_not_le hnm, Pi.zero_apply, abs_zero, integral_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : ¬m ≤ m0\n⊢ 0 ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => abs_nonneg _\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nby_cases hfint : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : ¬Integrable f\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : ¬Integrable f\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nsimp only [condexp_undef hfint, Pi.zero_apply, abs_zero, integral_const, Algebra.id.smul_eq_mul, mul_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : ¬Integrable f\n⊢ 0 ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => abs_nonneg _\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nhave : ∫ x in s, |(μ[f|m]) x| ∂μ = ∫ x, |(μ[s.indicator f|m]) x| ∂μ :=\n by\n rw [← integral_indicator]\n swap; · exact hnm _ hs\n refine' integral_congr_ae _\n have : (fun x => |(μ[s.indicator f|m]) x|) =ᵐ[μ] fun x => |s.indicator (μ[f|m]) x| :=\n EventuallyEq.fun_comp (condexp_indicator hfint hs) _\n refine' EventuallyEq.trans (eventually_of_forall fun x => _) this.symm\n rw [← Real.norm_eq_abs, norm_indicator_eq_indicator_norm]\n rfl\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\n[PROOFSTEP]\nrw [← integral_indicator]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ ∫ (x : α), Set.indicator s (fun x => |(μ[f|m]) x|) x ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ MeasurableSet s\n[PROOFSTEP]\nswap\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ MeasurableSet s\n[PROOFSTEP]\nexact hnm _ hs\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ ∫ (x : α), Set.indicator s (fun x => |(μ[f|m]) x|) x ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\n[PROOFSTEP]\nrefine' integral_congr_ae _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ (fun x => Set.indicator s (fun x => |(μ[f|m]) x|) x) =ᵐ[μ] fun x => |(μ[Set.indicator s f|m]) x|\n[PROOFSTEP]\nhave : (fun x => |(μ[s.indicator f|m]) x|) =ᵐ[μ] fun x => |s.indicator (μ[f|m]) x| :=\n EventuallyEq.fun_comp (condexp_indicator hfint hs) _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : (fun x => |(μ[Set.indicator s f|m]) x|) =ᵐ[μ] fun x => |Set.indicator s (μ[f|m]) x|\n⊢ (fun x => Set.indicator s (fun x => |(μ[f|m]) x|) x) =ᵐ[μ] fun x => |(μ[Set.indicator s f|m]) x|\n[PROOFSTEP]\nrefine' EventuallyEq.trans (eventually_of_forall fun x => _) this.symm\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : (fun x => |(μ[Set.indicator s f|m]) x|) =ᵐ[μ] fun x => |Set.indicator s (μ[f|m]) x|\nx : α\n⊢ (fun x => Set.indicator s (fun x => |(μ[f|m]) x|) x) x = |Set.indicator s (μ[f|m]) x|\n[PROOFSTEP]\nrw [← Real.norm_eq_abs, norm_indicator_eq_indicator_norm]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : (fun x => |(μ[Set.indicator s f|m]) x|) =ᵐ[μ] fun x => |Set.indicator s (μ[f|m]) x|\nx : α\n⊢ (fun x => Set.indicator s (fun x => |(μ[f|m]) x|) x) x = Set.indicator s (fun a => ‖(μ[f|m]) a‖) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : ∫ (x : α) in s, |(μ[f|m]) x| ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\n⊢ ∫ (x : α) in s, |(μ[f|m]) x| ∂μ ≤ ∫ (x : α) in s, |f x| ∂μ\n[PROOFSTEP]\nrw [this, ← integral_indicator]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : ∫ (x : α) in s, |(μ[f|m]) x| ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\n⊢ ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ ≤ ∫ (x : α), Set.indicator s (fun x => |f x|) x ∂μ\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : ∫ (x : α) in s, |(μ[f|m]) x| ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\n⊢ MeasurableSet s\n[PROOFSTEP]\nswap\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : ∫ (x : α) in s, |(μ[f|m]) x| ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\n⊢ MeasurableSet s\n[PROOFSTEP]\nexact hnm _ hs\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : ∫ (x : α) in s, |(μ[f|m]) x| ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\n⊢ ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ ≤ ∫ (x : α), Set.indicator s (fun x => |f x|) x ∂μ\n[PROOFSTEP]\nrefine' (integral_abs_condexp_le _).trans (le_of_eq <| integral_congr_ae <| eventually_of_forall fun x => _)\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : MeasurableSet s\nf : α → ℝ\nhnm : m ≤ m0\nhfint : Integrable f\nthis : ∫ (x : α) in s, |(μ[f|m]) x| ∂μ = ∫ (x : α), |(μ[Set.indicator s f|m]) x| ∂μ\nx : α\n⊢ (fun x => |Set.indicator s f x|) x = (fun x => Set.indicator s (fun x => |f x|) x) x\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs, norm_indicator_eq_indicator_norm]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n[PROOFSTEP]\nby_cases hnm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : ¬m ≤ m0\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : ¬m ≤ m0\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n[PROOFSTEP]\nsimp_rw [condexp_of_not_le hnm, Pi.zero_apply, abs_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : ¬m ≤ m0\n⊢ ∀ᵐ (x : α) ∂μ, 0 ≤ ↑R\n[PROOFSTEP]\nrefine' eventually_of_forall fun _ => R.coe_nonneg\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n[PROOFSTEP]\nby_cases hfint : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : ¬Integrable f\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : ¬Integrable f\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n[PROOFSTEP]\nsimp_rw [condexp_undef hfint]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : ¬Integrable f\n⊢ ∀ᵐ (x : α) ∂μ, |OfNat.ofNat 0 x| ≤ ↑R\n[PROOFSTEP]\nfilter_upwards [hbdd] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : ¬Integrable f\nx : α\nhx : |f x| ≤ ↑R\n⊢ |OfNat.ofNat 0 x| ≤ ↑R\n[PROOFSTEP]\nrw [Pi.zero_apply, abs_zero]\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : ¬Integrable f\nx : α\nhx : |f x| ≤ ↑R\n⊢ 0 ≤ ↑R\n[PROOFSTEP]\nexact (abs_nonneg _).trans hx\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\n⊢ ∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : ¬∀ᵐ (x : α) ∂μ, |(μ[f|m]) x| ≤ ↑R\n⊢ False\n[PROOFSTEP]\nchange μ _ ≠ 0 at h \n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : ↑↑μ {x | (fun x => |(μ[f|m]) x| ≤ ↑R) x}ᶜ ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp only [← zero_lt_iff, Set.compl_def, Set.mem_setOf_eq, not_le] at h \n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ False\n[PROOFSTEP]\nsuffices (μ {x | ↑R < |(μ[f|m]) x|}).toReal * ↑R < (μ {x | ↑R < |(μ[f|m]) x|}).toReal * ↑R by exact this.ne rfl\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\nthis : ENNReal.toReal (↑↑μ {x | ↑R < |(μ[f|m]) x|}) * ↑R < ENNReal.toReal (↑↑μ {x | ↑R < |(μ[f|m]) x|}) * ↑R\n⊢ False\n[PROOFSTEP]\nexact this.ne rfl\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ ENNReal.toReal (↑↑μ {x | ↑R < |(μ[f|m]) x|}) * ↑R < ENNReal.toReal (↑↑μ {x | ↑R < |(μ[f|m]) x|}) * ↑R\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (set_integral_gt_gt R.coe_nonneg _ _ h.ne.symm) _\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ Measurable fun x => |(μ[f|m]) x|\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs]\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ Measurable fun x => ‖(μ[f|m]) x‖\n[PROOFSTEP]\nexact (stronglyMeasurable_condexp.mono hnm).measurable.norm\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ IntegrableOn (fun x => |(μ[f|m]) x|) {x | ↑R < |(μ[f|m]) x|}\n[PROOFSTEP]\nexact integrable_condexp.abs.integrableOn\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ ∫ (x : α) in {x | ↑R < |(μ[f|m]) x|}, |(μ[f|m]) x| ∂μ ≤ ENNReal.toReal (↑↑μ {x | ↑R < |(μ[f|m]) x|}) * ↑R\n[PROOFSTEP]\nrefine' (set_integral_abs_condexp_le _ _).trans _\n[GOAL]\ncase pos.refine'_3.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ MeasurableSet {x | ↑R < |(μ[f|m]) x|}\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs]\n[GOAL]\ncase pos.refine'_3.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ MeasurableSet {x | ↑R < ‖(μ[f|m]) x‖}\n[PROOFSTEP]\nexact @measurableSet_lt _ _ _ _ _ m _ _ _ _ _ measurable_const stronglyMeasurable_condexp.norm.measurable\n[GOAL]\ncase pos.refine'_3.refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ ∫ (x : α) in {x | ↑R < |(μ[f|m]) x|}, |f x| ∂μ ≤ ENNReal.toReal (↑↑μ {x | ↑R < |(μ[f|m]) x|}) * ↑R\n[PROOFSTEP]\nsimp only [← smul_eq_mul, ← set_integral_const, NNReal.val_eq_coe, IsROrC.ofReal_real_eq_id, id.def]\n[GOAL]\ncase pos.refine'_3.refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ ∫ (x : α) in {x | ↑R < |(μ[f|m]) x|}, |f x| ∂μ ≤ ∫ (x : α) in {x | ↑R < |(μ[f|m]) x|}, ↑R ∂μ\n[PROOFSTEP]\nrefine' set_integral_mono_ae hfint.abs.integrableOn _ _\n[GOAL]\ncase pos.refine'_3.refine'_2.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ IntegrableOn (fun x => ↑R) {x | ↑R < |(μ[f|m]) x|}\n[PROOFSTEP]\nrefine'\n ⟨aestronglyMeasurable_const,\n lt_of_le_of_lt _ (integrable_condexp.integrableOn : IntegrableOn (μ[f|m]) {x | ↑R < |(μ[f|m]) x|} μ).2⟩\n[GOAL]\ncase pos.refine'_3.refine'_2.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ ∫⁻ (a : α) in {x | ↑R < |(μ[f|m]) x|}, ↑‖(fun x => ↑R) a‖₊ ∂μ ≤\n ∫⁻ (a : α) in {x | ↑R < |(μ[f|m]) x|}, ↑‖(μ[f|m]) a‖₊ ∂μ\n[PROOFSTEP]\nrefine'\n set_lintegral_mono (Measurable.nnnorm _).coe_nnreal_ennreal\n (stronglyMeasurable_condexp.mono hnm).measurable.nnnorm.coe_nnreal_ennreal fun x hx => _\n[GOAL]\ncase pos.refine'_3.refine'_2.refine'_1.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ Measurable fun a => (fun x => ↑R) a\n[PROOFSTEP]\nexact measurable_const\n[GOAL]\ncase pos.refine'_3.refine'_2.refine'_1.refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\nx : α\nhx : x ∈ {x | ↑R < |(μ[f|m]) x|}\n⊢ ↑‖(fun x => ↑R) x‖₊ ≤ ↑‖(μ[f|m]) x‖₊\n[PROOFSTEP]\nrw [ENNReal.coe_le_coe, Real.nnnorm_of_nonneg R.coe_nonneg]\n[GOAL]\ncase pos.refine'_3.refine'_2.refine'_1.refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\nx : α\nhx : x ∈ {x | ↑R < |(μ[f|m]) x|}\n⊢ { val := ↑R, property := (_ : 0 ≤ ↑R) } ≤ ‖(μ[f|m]) x‖₊\n[PROOFSTEP]\nexact Subtype.mk_le_mk.2 (le_of_lt hx)\n[GOAL]\ncase pos.refine'_3.refine'_2.refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nR : ℝ≥0\nf : α → ℝ\nhbdd : ∀ᵐ (x : α) ∂μ, |f x| ≤ ↑R\nhnm : m ≤ m0\nhfint : Integrable f\nh : 0 < ↑↑μ {x | ↑R < |(μ[f|m]) x|}\n⊢ (fun x => |f x|) ≤ᵐ[μ] fun x => ↑R\n[PROOFSTEP]\nexact hbdd\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\n⊢ UniformIntegrable (fun i => μ[g|ℱ i]) 1 μ\n[PROOFSTEP]\nhave hmeas : ∀ n, ∀ C, MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} := fun n C =>\n measurableSet_le measurable_const (stronglyMeasurable_condexp.mono (hℱ n)).measurable.nnnorm\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\n⊢ UniformIntegrable (fun i => μ[g|ℱ i]) 1 μ\n[PROOFSTEP]\nhave hg : Memℒp g 1 μ := memℒp_one_iff_integrable.2 hint\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\n⊢ UniformIntegrable (fun i => μ[g|ℱ i]) 1 μ\n[PROOFSTEP]\nrefine'\n uniformIntegrable_of le_rfl ENNReal.one_ne_top\n (fun n => (stronglyMeasurable_condexp.mono (hℱ n)).aestronglyMeasurable) fun ε hε => _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hne : snorm g 1 μ = 0\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : snorm g 1 μ = 0\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [snorm_eq_zero_iff hg.1 one_ne_zero] at hne \n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : g =ᵐ[μ] 0\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine'\n ⟨0, fun n =>\n (le_of_eq <|\n (snorm_eq_zero_iff ((stronglyMeasurable_condexp.mono (hℱ n)).aestronglyMeasurable.indicator (hmeas n 0))\n one_ne_zero).2\n _).trans\n (zero_le _)⟩\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : g =ᵐ[μ] 0\nn : ι\n⊢ Set.indicator {x | 0 ≤ ‖(μ[g|ℱ n]) x‖₊} (μ[g|ℱ n]) =ᵐ[μ] 0\n[PROOFSTEP]\nfilter_upwards [@condexp_congr_ae _ _ _ _ _ (ℱ n) m0 μ _ _ hne] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : g =ᵐ[μ] 0\nn : ι\nx : α\nhx : (μ[g|ℱ n]) x = (μ[0|ℱ n]) x\n⊢ Set.indicator {x | 0 ≤ ‖(μ[g|ℱ n]) x‖₊} (μ[g|ℱ n]) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp only [zero_le', Set.setOf_true, Set.indicator_univ, Pi.zero_apply, hx, condexp_zero]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδ, h⟩ := hg.snorm_indicator_le μ le_rfl ENNReal.one_ne_top hε\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nset C : ℝ≥0 := ⟨δ, hδ.le⟩⁻¹ * (snorm g 1 μ).toNNReal with hC\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hCpos : 0 < C := mul_pos (inv_pos.2 hδ) (ENNReal.toNNReal_pos hne hg.snorm_lt_top.ne)\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave : ∀ n, μ {x : α | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ :=\n by\n intro n\n have :=\n mul_meas_ge_le_pow_snorm' μ one_ne_zero ENNReal.one_ne_top\n ((@stronglyMeasurable_condexp _ _ _ _ _ (ℱ n) _ μ g).mono (hℱ n)).aestronglyMeasurable C\n rw [ENNReal.one_toReal, ENNReal.rpow_one, ENNReal.rpow_one, mul_comm, ←\n ENNReal.le_div_iff_mul_le (Or.inl (ENNReal.coe_ne_zero.2 hCpos.ne.symm)) (Or.inl ENNReal.coe_lt_top.ne)] at this \n simp_rw [ENNReal.coe_le_coe] at this \n refine' this.trans _\n rw [ENNReal.div_le_iff_le_mul (Or.inl (ENNReal.coe_ne_zero.2 hCpos.ne.symm)) (Or.inl ENNReal.coe_lt_top.ne), hC,\n Nonneg.inv_mk, ENNReal.coe_mul, ENNReal.coe_toNNReal hg.snorm_lt_top.ne, ← mul_assoc, ←\n ENNReal.ofReal_eq_coe_nnreal, ← ENNReal.ofReal_mul hδ.le, mul_inv_cancel hδ.ne.symm, ENNReal.ofReal_one, one_mul]\n exact snorm_one_condexp_le_snorm _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\n⊢ ∀ (n : ι), ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nn : ι\n⊢ ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\n[PROOFSTEP]\nhave :=\n mul_meas_ge_le_pow_snorm' μ one_ne_zero ENNReal.one_ne_top\n ((@stronglyMeasurable_condexp _ _ _ _ _ (ℱ n) _ μ g).mono (hℱ n)).aestronglyMeasurable C\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nn : ι\nthis : ↑C ^ ENNReal.toReal 1 * ↑↑μ {x | ↑C ≤ ↑‖(μ[g|ℱ n]) x‖₊} ≤ snorm (μ[g|ℱ n]) 1 μ ^ ENNReal.toReal 1\n⊢ ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\n[PROOFSTEP]\nrw [ENNReal.one_toReal, ENNReal.rpow_one, ENNReal.rpow_one, mul_comm, ←\n ENNReal.le_div_iff_mul_le (Or.inl (ENNReal.coe_ne_zero.2 hCpos.ne.symm)) (Or.inl ENNReal.coe_lt_top.ne)] at this \n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nn : ι\nthis : ↑↑μ {x | ↑C ≤ ↑‖(μ[g|ℱ n]) x‖₊} ≤ snorm (μ[g|ℱ n]) 1 μ / ↑C\n⊢ ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\n[PROOFSTEP]\nsimp_rw [ENNReal.coe_le_coe] at this \n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nn : ι\nthis :\n ↑↑μ {x | { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ) ≤ ‖(μ[g|ℱ n]) x‖₊} ≤\n snorm (μ[g|ℱ n]) 1 μ / ↑({ val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ))\n⊢ ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\n[PROOFSTEP]\nrefine' this.trans _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nn : ι\nthis :\n ↑↑μ {x | { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ) ≤ ‖(μ[g|ℱ n]) x‖₊} ≤\n snorm (μ[g|ℱ n]) 1 μ / ↑({ val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ))\n⊢ snorm (μ[g|ℱ n]) 1 μ / ↑({ val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)) ≤ ENNReal.ofReal δ\n[PROOFSTEP]\nrw [ENNReal.div_le_iff_le_mul (Or.inl (ENNReal.coe_ne_zero.2 hCpos.ne.symm)) (Or.inl ENNReal.coe_lt_top.ne), hC,\n Nonneg.inv_mk, ENNReal.coe_mul, ENNReal.coe_toNNReal hg.snorm_lt_top.ne, ← mul_assoc, ← ENNReal.ofReal_eq_coe_nnreal,\n ← ENNReal.ofReal_mul hδ.le, mul_inv_cancel hδ.ne.symm, ENNReal.ofReal_one, one_mul]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nn : ι\nthis :\n ↑↑μ {x | { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ) ≤ ‖(μ[g|ℱ n]) x‖₊} ≤\n snorm (μ[g|ℱ n]) 1 μ / ↑({ val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ))\n⊢ snorm (μ[g|ℱ n]) 1 μ ≤ snorm g 1 μ\n[PROOFSTEP]\nexact snorm_one_condexp_le_snorm _\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nthis : ∀ (n : ι), ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\n⊢ ∃ C, ∀ (i : ι), snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ i]) x‖₊} (μ[g|ℱ i])) 1 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨C, fun n => le_trans _ (h {x : α | C ≤ ‖(μ[g|ℱ n]) x‖₊} (hmeas n C) (this n))⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nthis : ∀ (n : ι), ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\nn : ι\n⊢ snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} (μ[g|ℱ n])) 1 μ ≤ snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} g) 1 μ\n[PROOFSTEP]\nhave hmeasℱ : MeasurableSet[ℱ n] {x : α | C ≤ ‖(μ[g|ℱ n]) x‖₊} :=\n @measurableSet_le _ _ _ _ _ (ℱ n) _ _ _ _ _ measurable_const\n (@Measurable.nnnorm _ _ _ _ _ (ℱ n) _ stronglyMeasurable_condexp.measurable)\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nthis : ∀ (n : ι), ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\nn : ι\nhmeasℱ : MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\n⊢ snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} (μ[g|ℱ n])) 1 μ ≤ snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} g) 1 μ\n[PROOFSTEP]\nrw [← snorm_congr_ae (condexp_indicator hint hmeasℱ)]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nι : Type u_2\ninst✝ : IsFiniteMeasure μ\ng : α → ℝ\nhint : Integrable g\nℱ : ι → MeasurableSpace α\nhℱ : ∀ (i : ι), ℱ i ≤ m0\nhmeas : ∀ (n : ι) (C : ℝ≥0), MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\nhg : Memℒp g 1\nε : ℝ\nhε : 0 < ε\nhne : ¬snorm g 1 μ = 0\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s g) 1 μ ≤ ENNReal.ofReal ε\nC : ℝ≥0 := { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhC : C = { val := δ, property := (_ : 0 ≤ δ) }⁻¹ * ENNReal.toNNReal (snorm g 1 μ)\nhCpos : 0 < C\nthis : ∀ (n : ι), ↑↑μ {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} ≤ ENNReal.ofReal δ\nn : ι\nhmeasℱ : MeasurableSet {x | C ≤ ‖(μ[g|ℱ n]) x‖₊}\n⊢ snorm (μ[Set.indicator {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} g|ℱ n]) 1 μ ≤ snorm (Set.indicator {x | C ≤ ‖(μ[g|ℱ n]) x‖₊} g) 1 μ\n[PROOFSTEP]\nexact snorm_one_condexp_le_snorm _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\n⊢ μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]\n[PROOFSTEP]\nhave : ∀ (s c) (f : α → ℝ), Set.indicator s (Function.const α c) * f = s.indicator (c • f) :=\n by\n intro s c f\n ext1 x\n by_cases hx : x ∈ s\n · simp only [hx, Pi.mul_apply, Set.indicator_of_mem, Pi.smul_apply, Algebra.id.smul_eq_mul]; rfl\n · simp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, zero_mul]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\n⊢ ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\n[PROOFSTEP]\nintro s c f\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf✝ : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\ns : Set α\nc : ℝ\nf : α → ℝ\n⊢ Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf✝ : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\ns : Set α\nc : ℝ\nf : α → ℝ\nx : α\n⊢ (Set.indicator s (Function.const α c) * f) x = Set.indicator s (c • f) x\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf✝ : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\ns : Set α\nc : ℝ\nf : α → ℝ\nx : α\nhx : x ∈ s\n⊢ (Set.indicator s (Function.const α c) * f) x = Set.indicator s (c • f) x\n[PROOFSTEP]\nsimp only [hx, Pi.mul_apply, Set.indicator_of_mem, Pi.smul_apply, Algebra.id.smul_eq_mul]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf✝ : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\ns : Set α\nc : ℝ\nf : α → ℝ\nx : α\nhx : x ∈ s\n⊢ Function.const α c x * f x = c * f x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf✝ : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\ns : Set α\nc : ℝ\nf : α → ℝ\nx : α\nhx : ¬x ∈ s\n⊢ (Set.indicator s (Function.const α c) * f) x = Set.indicator s (c • f) x\n[PROOFSTEP]\nsimp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, zero_mul]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\n⊢ μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]\n[PROOFSTEP]\napply @SimpleFunc.induction _ _ m _ (fun f => _) (fun c s hs => ?_) (fun g₁ g₂ _ h_eq₁ h_eq₂ => ?_) f\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\nc : ℝ\ns : Set α\nhs : MeasurableSet s\n⊢ μ[↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) * g|m] =ᵐ[μ]\n ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) * μ[g|m]\n[PROOFSTEP]\nclassical simp only [@SimpleFunc.const_zero _ _ m, @SimpleFunc.coe_piecewise _ _ m, @SimpleFunc.coe_const _ _ m,\n @SimpleFunc.coe_zero _ _ m, Set.piecewise_eq_indicator]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\nc : ℝ\ns : Set α\nhs : MeasurableSet s\n⊢ μ[↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) * g|m] =ᵐ[μ]\n ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) * μ[g|m]\n[PROOFSTEP]\nsimp only [@SimpleFunc.const_zero _ _ m, @SimpleFunc.coe_piecewise _ _ m, @SimpleFunc.coe_const _ _ m,\n @SimpleFunc.coe_zero _ _ m, Set.piecewise_eq_indicator]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\nc : ℝ\ns : Set α\nhs : MeasurableSet s\n⊢ μ[Set.indicator s (Function.const α c) * g|m] =ᵐ[μ] Set.indicator s (Function.const α c) * μ[g|m]\n[PROOFSTEP]\nrw [this, this]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\nc : ℝ\ns : Set α\nhs : MeasurableSet s\n⊢ μ[Set.indicator s (c • g)|m] =ᵐ[μ] Set.indicator s (c • μ[g|m])\n[PROOFSTEP]\nrefine' (condexp_indicator (hg.smul c) hs).trans _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\nc : ℝ\ns : Set α\nhs : MeasurableSet s\n⊢ Set.indicator s (μ[c • g|m]) =ᵐ[μ] Set.indicator s (c • μ[g|m])\n[PROOFSTEP]\nfilter_upwards [@condexp_smul α ℝ ℝ _ _ _ _ _ m m0 μ c g] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\nc : ℝ\ns : Set α\nhs : MeasurableSet s\nx : α\nhx : (μ[c • g|m]) x = (c • μ[g|m]) x\n⊢ Set.indicator s (μ[c • g|m]) x = Set.indicator s (c • μ[g|m]) x\n[PROOFSTEP]\nclassical simp_rw [Set.indicator_apply, hx]\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\nc : ℝ\ns : Set α\nhs : MeasurableSet s\nx : α\nhx : (μ[c • g|m]) x = (c • μ[g|m]) x\n⊢ Set.indicator s (μ[c • g|m]) x = Set.indicator s (c • μ[g|m]) x\n[PROOFSTEP]\nsimp_rw [Set.indicator_apply, hx]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\ng₁ g₂ : SimpleFunc α ℝ\nx✝ : Disjoint (Function.support ↑g₁) (Function.support ↑g₂)\nh_eq₁ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₁\nh_eq₂ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₂\n⊢ μ[↑(g₁ + g₂) * g|m] =ᵐ[μ] ↑(g₁ + g₂) * μ[g|m]\n[PROOFSTEP]\nhave h_add := @SimpleFunc.coe_add _ _ m _ g₁ g₂\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\ng₁ g₂ : SimpleFunc α ℝ\nx✝ : Disjoint (Function.support ↑g₁) (Function.support ↑g₂)\nh_eq₁ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₁\nh_eq₂ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₂\nh_add : ↑(g₁ + g₂) = ↑g₁ + ↑g₂\n⊢ μ[↑(g₁ + g₂) * g|m] =ᵐ[μ] ↑(g₁ + g₂) * μ[g|m]\n[PROOFSTEP]\ncalc\n μ[⇑(g₁ + g₂) * g|m] =ᵐ[μ] μ[(⇑g₁ + ⇑g₂) * g|m] := by refine' condexp_congr_ae (EventuallyEq.mul _ EventuallyEq.rfl);\n rw [h_add]\n _ =ᵐ[μ] μ[⇑g₁ * g|m] + μ[⇑g₂ * g|m] := by rw [add_mul];\n exact condexp_add (hg.simpleFunc_mul' hm _) (hg.simpleFunc_mul' hm _)\n _ =ᵐ[μ] ⇑g₁ * μ[g|m] + ⇑g₂ * μ[g|m] := (EventuallyEq.add h_eq₁ h_eq₂)\n _ =ᵐ[μ] ⇑(g₁ + g₂) * μ[g|m] := by rw [h_add, add_mul]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\ng₁ g₂ : SimpleFunc α ℝ\nx✝ : Disjoint (Function.support ↑g₁) (Function.support ↑g₂)\nh_eq₁ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₁\nh_eq₂ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₂\nh_add : ↑(g₁ + g₂) = ↑g₁ + ↑g₂\n⊢ μ[↑(g₁ + g₂) * g|m] =ᵐ[μ] μ[(↑g₁ + ↑g₂) * g|m]\n[PROOFSTEP]\nrefine' condexp_congr_ae (EventuallyEq.mul _ EventuallyEq.rfl)\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\ng₁ g₂ : SimpleFunc α ℝ\nx✝ : Disjoint (Function.support ↑g₁) (Function.support ↑g₂)\nh_eq₁ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₁\nh_eq₂ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₂\nh_add : ↑(g₁ + g₂) = ↑g₁ + ↑g₂\n⊢ (fun x => ↑(g₁ + g₂) x) =ᵐ[μ] fun x => (↑g₁ + ↑g₂) x\n[PROOFSTEP]\nrw [h_add]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\ng₁ g₂ : SimpleFunc α ℝ\nx✝ : Disjoint (Function.support ↑g₁) (Function.support ↑g₂)\nh_eq₁ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₁\nh_eq₂ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₂\nh_add : ↑(g₁ + g₂) = ↑g₁ + ↑g₂\n⊢ μ[(↑g₁ + ↑g₂) * g|m] =ᵐ[μ] μ[↑g₁ * g|m] + μ[↑g₂ * g|m]\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\ng₁ g₂ : SimpleFunc α ℝ\nx✝ : Disjoint (Function.support ↑g₁) (Function.support ↑g₂)\nh_eq₁ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₁\nh_eq₂ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₂\nh_add : ↑(g₁ + g₂) = ↑g₁ + ↑g₂\n⊢ μ[↑g₁ * g + ↑g₂ * g|m] =ᵐ[μ] μ[↑g₁ * g|m] + μ[↑g₂ * g|m]\n[PROOFSTEP]\nexact condexp_add (hg.simpleFunc_mul' hm _) (hg.simpleFunc_mul' hm _)\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : SimpleFunc α ℝ\ng : α → ℝ\nhg : Integrable g\nthis : ∀ (s : Set α) (c : ℝ) (f : α → ℝ), Set.indicator s (Function.const α c) * f = Set.indicator s (c • f)\ng₁ g₂ : SimpleFunc α ℝ\nx✝ : Disjoint (Function.support ↑g₁) (Function.support ↑g₂)\nh_eq₁ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₁\nh_eq₂ : (fun f => μ[↑f * g|m] =ᵐ[μ] ↑f * μ[g|m]) g₂\nh_add : ↑(g₁ + g₂) = ↑g₁ + ↑g₂\n⊢ ↑g₁ * μ[g|m] + ↑g₂ * μ[g|m] =ᵐ[μ] ↑(g₁ + g₂) * μ[g|m]\n[PROOFSTEP]\nrw [h_add, add_mul]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nlet fs := hf.approxBounded c\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave hfs_tendsto : ∀ᵐ x ∂μ, Tendsto (fun n => fs n x) atTop (𝓝 (f x)) := hf.tendsto_approxBounded_ae hf_bound\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nby_cases hμ : μ = 0\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : μ = 0\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nsimp only [hμ, ae_zero]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : μ = 0\n⊢ 0[f * g|m] =ᶠ[⊥] f * 0[g|m]\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave : μ.ae.NeBot := by simp only [hμ, ae_neBot, Ne.def, not_false_iff]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\n⊢ NeBot (Measure.ae μ)\n[PROOFSTEP]\nsimp only [hμ, ae_neBot, Ne.def, not_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis : NeBot (Measure.ae μ)\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave hc : 0 ≤ c :=\n haveI h_exists : ∃ x, ‖f x‖ ≤ c := Eventually.exists hf_bound\n (norm_nonneg _).trans h_exists.choose_spec\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis : NeBot (Measure.ae μ)\nhc : 0 ≤ c\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave hfs_bound : ∀ n x, ‖fs n x‖ ≤ c := hf.norm_approxBounded_le hc\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave : μ[f * μ[g|m]|m] = f * μ[g|m] :=\n by\n refine' condexp_of_stronglyMeasurable hm (hf.mul stronglyMeasurable_condexp) _\n exact integrable_condexp.bdd_mul' (hf.mono hm).aestronglyMeasurable hf_bound\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\n⊢ μ[f * μ[g|m]|m] = f * μ[g|m]\n[PROOFSTEP]\nrefine' condexp_of_stronglyMeasurable hm (hf.mul stronglyMeasurable_condexp) _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\n⊢ Integrable (f * μ[g|m])\n[PROOFSTEP]\nexact integrable_condexp.bdd_mul' (hf.mono hm).aestronglyMeasurable hf_bound\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ μ[f * g|m] =ᵐ[μ] μ[f * μ[g|m]|m]\n[PROOFSTEP]\nrefine'\n tendsto_condexp_unique (fun n x => fs n x * g x) (fun n x => fs n x * (μ[g|m]) x) (f * g) (f * μ[g|m]) _ _ _ _\n (fun x => c * ‖g x‖) _ (fun x => c * ‖(μ[g|m]) x‖) _ _ _ _\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ ∀ (n : ℕ), Integrable ((fun n x => ↑(fs n) x * g x) n)\n[PROOFSTEP]\nexact fun n =>\n hg.bdd_mul' ((SimpleFunc.stronglyMeasurable (fs n)).mono hm).aestronglyMeasurable (eventually_of_forall (hfs_bound n))\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ ∀ (n : ℕ), Integrable ((fun n x => ↑(fs n) x * (μ[g|m]) x) n)\n[PROOFSTEP]\nexact fun n =>\n integrable_condexp.bdd_mul' ((SimpleFunc.stronglyMeasurable (fs n)).mono hm).aestronglyMeasurable\n (eventually_of_forall (hfs_bound n))\n[GOAL]\ncase neg.refine'_3\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun n => (fun n x => ↑(fs n) x * g x) n x) atTop (𝓝 ((f * g) x))\n[PROOFSTEP]\nfilter_upwards [hfs_tendsto] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nx : α\nhx : Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x) atTop (𝓝 (f x))\n⊢ Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x * g x) atTop (𝓝 ((f * g) x))\n[PROOFSTEP]\nrw [Pi.mul_apply]\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nx : α\nhx : Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x) atTop (𝓝 (f x))\n⊢ Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x * g x) atTop (𝓝 (f x * g x))\n[PROOFSTEP]\nexact Tendsto.mul hx tendsto_const_nhds\n[GOAL]\ncase neg.refine'_4\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun n => (fun n x => ↑(fs n) x * (μ[g|m]) x) n x) atTop (𝓝 ((f * μ[g|m]) x))\n[PROOFSTEP]\nfilter_upwards [hfs_tendsto] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nx : α\nhx : Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x) atTop (𝓝 (f x))\n⊢ Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x * (μ[g|m]) x) atTop (𝓝 ((f * μ[g|m]) x))\n[PROOFSTEP]\nrw [Pi.mul_apply]\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nx : α\nhx : Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x) atTop (𝓝 (f x))\n⊢ Tendsto (fun n => ↑(StronglyMeasurable.approxBounded hf c n) x * (μ[g|m]) x) atTop (𝓝 (f x * (μ[g|m]) x))\n[PROOFSTEP]\nexact Tendsto.mul hx tendsto_const_nhds\n[GOAL]\ncase neg.refine'_5\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ Integrable fun x => c * ‖g x‖\n[PROOFSTEP]\nexact hg.norm.const_mul c\n[GOAL]\ncase neg.refine'_6\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ Integrable fun x => c * ‖(μ[g|m]) x‖\n[PROOFSTEP]\nexact integrable_condexp.norm.const_mul c\n[GOAL]\ncase neg.refine'_7\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, ‖(fun n x => ↑(fs n) x * g x) n x‖ ≤ (fun x => c * ‖g x‖) x\n[PROOFSTEP]\nrefine' fun n => eventually_of_forall fun x => _\n[GOAL]\ncase neg.refine'_7\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nn : ℕ\nx : α\n⊢ ‖(fun n x => ↑(fs n) x * g x) n x‖ ≤ (fun x => c * ‖g x‖) x\n[PROOFSTEP]\nexact (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (hfs_bound n x) (norm_nonneg _))\n[GOAL]\ncase neg.refine'_8\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, ‖(fun n x => ↑(fs n) x * (μ[g|m]) x) n x‖ ≤ (fun x => c * ‖(μ[g|m]) x‖) x\n[PROOFSTEP]\nrefine' fun n => eventually_of_forall fun x => _\n[GOAL]\ncase neg.refine'_8\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nn : ℕ\nx : α\n⊢ ‖(fun n x => ↑(fs n) x * (μ[g|m]) x) n x‖ ≤ (fun x => c * ‖(μ[g|m]) x‖) x\n[PROOFSTEP]\nexact (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (hfs_bound n x) (norm_nonneg _))\n[GOAL]\ncase neg.refine'_9\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\n⊢ ∀ (n : ℕ), μ[(fun n x => ↑(fs n) x * g x) n|m] =ᵐ[μ] μ[(fun n x => ↑(fs n) x * (μ[g|m]) x) n|m]\n[PROOFSTEP]\nintro n\n[GOAL]\ncase neg.refine'_9\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nn : ℕ\n⊢ μ[(fun n x => ↑(fs n) x * g x) n|m] =ᵐ[μ] μ[(fun n x => ↑(fs n) x * (μ[g|m]) x) n|m]\n[PROOFSTEP]\nsimp_rw [← Pi.mul_apply]\n[GOAL]\ncase neg.refine'_9\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nn : ℕ\n⊢ μ[fun x => (↑(StronglyMeasurable.approxBounded hf c n) * g) x|m] =ᵐ[μ]\n μ[fun x => (↑(StronglyMeasurable.approxBounded hf c n) * μ[g|m]) x|m]\n[PROOFSTEP]\nrefine' (condexp_stronglyMeasurable_simpleFunc_mul hm _ hg).trans _\n[GOAL]\ncase neg.refine'_9\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nn : ℕ\n⊢ ↑(StronglyMeasurable.approxBounded hf c n) * μ[g|m] =ᵐ[μ]\n μ[fun x => (↑(StronglyMeasurable.approxBounded hf c n) * μ[g|m]) x|m]\n[PROOFSTEP]\nrw [condexp_of_stronglyMeasurable hm ((SimpleFunc.stronglyMeasurable _).mul stronglyMeasurable_condexp) _]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : StronglyMeasurable f\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nfs : ℕ → SimpleFunc α ℝ := StronglyMeasurable.approxBounded hf c\nhfs_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nhμ : ¬μ = 0\nthis✝ : NeBot (Measure.ae μ)\nhc : 0 ≤ c\nhfs_bound : ∀ (n : ℕ) (x : α), ‖↑(fs n) x‖ ≤ c\nthis : μ[f * μ[g|m]|m] = f * μ[g|m]\nn : ℕ\n⊢ Integrable (↑(StronglyMeasurable.approxBounded hf c n) * μ[g|m])\n[PROOFSTEP]\nexact\n integrable_condexp.bdd_mul' ((SimpleFunc.stronglyMeasurable (fs n)).mono hm).aestronglyMeasurable\n (eventually_of_forall (hfs_bound n))\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave : μ[f * g|m] =ᵐ[μ] μ[hf.mk f * g|m] := condexp_congr_ae (EventuallyEq.mul hf.ae_eq_mk EventuallyEq.rfl)\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nthis : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nrefine' this.trans _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nthis : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\n⊢ μ[AEStronglyMeasurable'.mk f hf * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave : f * μ[g|m] =ᵐ[μ] hf.mk f * μ[g|m] := EventuallyEq.mul hf.ae_eq_mk EventuallyEq.rfl\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n⊢ μ[AEStronglyMeasurable'.mk f hf * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ this.symm\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n⊢ μ[AEStronglyMeasurable'.mk f hf * g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n[PROOFSTEP]\nrefine' condexp_stronglyMeasurable_mul_of_bound hm hf.stronglyMeasurable_mk hg c _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n⊢ ∀ᵐ (x : α) ∂μ, ‖AEStronglyMeasurable'.mk f hf x‖ ≤ c\n[PROOFSTEP]\nfilter_upwards [hf_bound, hf.ae_eq_mk] with x hxc hx_eq\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\nx : α\nhxc : ‖f x‖ ≤ c\nhx_eq : f x = AEStronglyMeasurable'.mk f hf x\n⊢ ‖AEStronglyMeasurable'.mk f hf x‖ ≤ c\n[PROOFSTEP]\nrw [← hx_eq]\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : IsFiniteMeasure μ\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhg : Integrable g\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\nx : α\nhxc : ‖f x‖ ≤ c\nhx_eq : f x = AEStronglyMeasurable'.mk f hf x\n⊢ ‖f x‖ ≤ c\n[PROOFSTEP]\nexact hxc\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nby_cases hm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : ¬m ≤ m0\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : ¬m ≤ m0\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nsimp_rw [condexp_of_not_le hm]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : ¬m ≤ m0\n⊢ 0 =ᵐ[μ] f * 0\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nby_cases hμm : SigmaFinite (μ.trim hm)\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nsimp_rw [condexp_of_not_sigmaFinite hm hμm]\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ 0 =ᵐ[μ] f * 0\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhaveI : SigmaFinite (μ.trim hm) := hμm\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nobtain ⟨sets, sets_prop, h_univ⟩ := hf.exists_spanning_measurableSet_norm_le hm μ\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nsets_prop : ∀ (n : ℕ), MeasurableSet (sets n) ∧ ↑↑μ (sets n) < ⊤ ∧ ∀ (x : α), x ∈ sets n → ‖f x‖ ≤ ↑n\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nsimp_rw [forall_and] at sets_prop \n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nsets_prop :\n (∀ (x : ℕ), MeasurableSet (sets x)) ∧ (∀ (x : ℕ), ↑↑μ (sets x) < ⊤) ∧ ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nobtain ⟨h_meas, h_finite, h_norm⟩ := sets_prop\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nsuffices ∀ n, ∀ᵐ x ∂μ, x ∈ sets n → (μ[f * g|m]) x = f x * (μ[g|m]) x\n by\n rw [← ae_all_iff] at this \n filter_upwards [this] with x hx\n rw [Pi.mul_apply]\n obtain ⟨i, hi⟩ : ∃ i, x ∈ sets i :=\n by\n have h_mem : x ∈ ⋃ i, sets i := by rw [h_univ]; exact Set.mem_univ _\n simpa using h_mem\n exact hx i hi\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, x ∈ sets n → (μ[f * g|m]) x = f x * (μ[g|m]) x\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nrw [← ae_all_iff] at this \n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\nx : α\nhx : ∀ (i : ℕ), x ∈ sets i → (μ[f * g|m]) x = f x * (μ[g|m]) x\n⊢ (μ[f * g|m]) x = (f * μ[g|m]) x\n[PROOFSTEP]\nrw [Pi.mul_apply]\n[GOAL]\ncase h\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\nx : α\nhx : ∀ (i : ℕ), x ∈ sets i → (μ[f * g|m]) x = f x * (μ[g|m]) x\n⊢ (μ[f * g|m]) x = f x * (μ[g|m]) x\n[PROOFSTEP]\nobtain ⟨i, hi⟩ : ∃ i, x ∈ sets i :=\n by\n have h_mem : x ∈ ⋃ i, sets i := by rw [h_univ]; exact Set.mem_univ _\n simpa using h_mem\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\nx : α\nhx : ∀ (i : ℕ), x ∈ sets i → (μ[f * g|m]) x = f x * (μ[g|m]) x\n⊢ ∃ i, x ∈ sets i\n[PROOFSTEP]\nhave h_mem : x ∈ ⋃ i, sets i := by rw [h_univ]; exact Set.mem_univ _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\nx : α\nhx : ∀ (i : ℕ), x ∈ sets i → (μ[f * g|m]) x = f x * (μ[g|m]) x\n⊢ x ∈ ⋃ (i : ℕ), sets i\n[PROOFSTEP]\nrw [h_univ]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\nx : α\nhx : ∀ (i : ℕ), x ∈ sets i → (μ[f * g|m]) x = f x * (μ[g|m]) x\n⊢ x ∈ Set.univ\n[PROOFSTEP]\nexact Set.mem_univ _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\nx : α\nhx : ∀ (i : ℕ), x ∈ sets i → (μ[f * g|m]) x = f x * (μ[g|m]) x\nh_mem : x ∈ ⋃ (i : ℕ), sets i\n⊢ ∃ i, x ∈ sets i\n[PROOFSTEP]\nsimpa using h_mem\n[GOAL]\ncase h.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nthis : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), a ∈ sets i → (μ[f * g|m]) a = f a * (μ[g|m]) a\nx : α\nhx : ∀ (i : ℕ), x ∈ sets i → (μ[f * g|m]) x = f x * (μ[g|m]) x\ni : ℕ\nhi : x ∈ sets i\n⊢ (μ[f * g|m]) x = f x * (μ[g|m]) x\n[PROOFSTEP]\nexact hx i hi\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\n⊢ ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, x ∈ sets n → (μ[f * g|m]) x = f x * (μ[g|m]) x\n[PROOFSTEP]\nrefine' fun n => ae_imp_of_ae_restrict _\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ (sets n), (μ[f * g|m]) x = f x * (μ[g|m]) x\n[PROOFSTEP]\nsuffices (μ.restrict (sets n))[f * g|m] =ᵐ[μ.restrict (sets n)] f * (μ.restrict (sets n))[g|m]\n by\n simp_rw [← Pi.mul_apply]\n refine' (condexp_restrict_ae_eq_restrict hm (h_meas n) hfg).symm.trans _\n exact this.trans (EventuallyEq.rfl.mul (condexp_restrict_ae_eq_restrict hm (h_meas n) hg))\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : Measure.restrict μ (sets n)[f * g|m] =ᵐ[Measure.restrict μ (sets n)] f * Measure.restrict μ (sets n)[g|m]\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ (sets n), (μ[f * g|m]) x = f x * (μ[g|m]) x\n[PROOFSTEP]\nsimp_rw [← Pi.mul_apply]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : Measure.restrict μ (sets n)[f * g|m] =ᵐ[Measure.restrict μ (sets n)] f * Measure.restrict μ (sets n)[g|m]\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ (sets n), (μ[f * g|m]) x = (f * μ[g|m]) x\n[PROOFSTEP]\nrefine' (condexp_restrict_ae_eq_restrict hm (h_meas n) hfg).symm.trans _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : Measure.restrict μ (sets n)[f * g|m] =ᵐ[Measure.restrict μ (sets n)] f * Measure.restrict μ (sets n)[g|m]\n⊢ Measure.restrict μ (sets n)[f * g|m] =ᵐ[Measure.restrict μ (sets n)] fun x => (f * μ[g|m]) x\n[PROOFSTEP]\nexact this.trans (EventuallyEq.rfl.mul (condexp_restrict_ae_eq_restrict hm (h_meas n) hg))\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\n⊢ Measure.restrict μ (sets n)[f * g|m] =ᵐ[Measure.restrict μ (sets n)] f * Measure.restrict μ (sets n)[g|m]\n[PROOFSTEP]\nsuffices\n (μ.restrict (sets n))[(sets n).indicator f * g|m] =ᵐ[μ.restrict (sets n)]\n (sets n).indicator f * (μ.restrict (sets n))[g|m]\n by\n refine' EventuallyEq.trans _ (this.trans _)\n · exact condexp_congr_ae ((indicator_ae_eq_restrict (hm _ (h_meas n))).symm.mul EventuallyEq.rfl)\n · exact (indicator_ae_eq_restrict (hm _ (h_meas n))).mul EventuallyEq.rfl\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis :\n Measure.restrict μ (sets n)[Set.indicator (sets n) f * g|m] =ᵐ[Measure.restrict μ (sets n)]\n Set.indicator (sets n) f * Measure.restrict μ (sets n)[g|m]\n⊢ Measure.restrict μ (sets n)[f * g|m] =ᵐ[Measure.restrict μ (sets n)] f * Measure.restrict μ (sets n)[g|m]\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (this.trans _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis :\n Measure.restrict μ (sets n)[Set.indicator (sets n) f * g|m] =ᵐ[Measure.restrict μ (sets n)]\n Set.indicator (sets n) f * Measure.restrict μ (sets n)[g|m]\n⊢ Measure.restrict μ (sets n)[f * g|m] =ᵐ[Measure.restrict μ (sets n)]\n Measure.restrict μ (sets n)[Set.indicator (sets n) f * g|m]\n[PROOFSTEP]\nexact condexp_congr_ae ((indicator_ae_eq_restrict (hm _ (h_meas n))).symm.mul EventuallyEq.rfl)\n[GOAL]\ncase refine'_2\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis :\n Measure.restrict μ (sets n)[Set.indicator (sets n) f * g|m] =ᵐ[Measure.restrict μ (sets n)]\n Set.indicator (sets n) f * Measure.restrict μ (sets n)[g|m]\n⊢ Set.indicator (sets n) f * Measure.restrict μ (sets n)[g|m] =ᵐ[Measure.restrict μ (sets n)]\n f * Measure.restrict μ (sets n)[g|m]\n[PROOFSTEP]\nexact (indicator_ae_eq_restrict (hm _ (h_meas n))).mul EventuallyEq.rfl\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\n⊢ Measure.restrict μ (sets n)[Set.indicator (sets n) f * g|m] =ᵐ[Measure.restrict μ (sets n)]\n Set.indicator (sets n) f * Measure.restrict μ (sets n)[g|m]\n[PROOFSTEP]\nhave : IsFiniteMeasure (μ.restrict (sets n)) := by\n constructor\n rw [Measure.restrict_apply_univ]\n exact h_finite n\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\n⊢ IsFiniteMeasure (Measure.restrict μ (sets n))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase measure_univ_lt_top\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\n⊢ ↑↑(Measure.restrict μ (sets n)) Set.univ < ⊤\n[PROOFSTEP]\nrw [Measure.restrict_apply_univ]\n[GOAL]\ncase measure_univ_lt_top\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\n⊢ ↑↑μ (sets n) < ⊤\n[PROOFSTEP]\nexact h_finite n\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : IsFiniteMeasure (Measure.restrict μ (sets n))\n⊢ Measure.restrict μ (sets n)[Set.indicator (sets n) f * g|m] =ᵐ[Measure.restrict μ (sets n)]\n Set.indicator (sets n) f * Measure.restrict μ (sets n)[g|m]\n[PROOFSTEP]\nrefine' condexp_stronglyMeasurable_mul_of_bound hm (hf.indicator (h_meas n)) hg.integrableOn n _\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : IsFiniteMeasure (Measure.restrict μ (sets n))\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ (sets n), ‖Set.indicator (sets n) f x‖ ≤ ↑n\n[PROOFSTEP]\nrefine' eventually_of_forall fun x => _\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : IsFiniteMeasure (Measure.restrict μ (sets n))\nx : α\n⊢ ‖Set.indicator (sets n) f x‖ ≤ ↑n\n[PROOFSTEP]\nby_cases hxs : x ∈ sets n\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : IsFiniteMeasure (Measure.restrict μ (sets n))\nx : α\nhxs : x ∈ sets n\n⊢ ‖Set.indicator (sets n) f x‖ ≤ ↑n\n[PROOFSTEP]\nsimp only [hxs, Set.indicator_of_mem]\n[GOAL]\ncase pos\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : IsFiniteMeasure (Measure.restrict μ (sets n))\nx : α\nhxs : x ∈ sets n\n⊢ ‖f x‖ ≤ ↑n\n[PROOFSTEP]\nexact h_norm n x hxs\n[GOAL]\ncase neg\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfg : Integrable (f * g)\nhg : Integrable g\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nsets : ℕ → Set α\nh_univ : ⋃ (i : ℕ), sets i = Set.univ\nh_meas : ∀ (x : ℕ), MeasurableSet (sets x)\nh_finite : ∀ (x : ℕ), ↑↑μ (sets x) < ⊤\nh_norm : ∀ (x : ℕ) (x_1 : α), x_1 ∈ sets x → ‖f x_1‖ ≤ ↑x\nn : ℕ\nthis : IsFiniteMeasure (Measure.restrict μ (sets n))\nx : α\nhxs : ¬x ∈ sets n\n⊢ ‖Set.indicator (sets n) f x‖ ≤ ↑n\n[PROOFSTEP]\nsimp only [hxs, Set.indicator_of_not_mem, not_false_iff, _root_.norm_zero, Nat.cast_nonneg]\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhfg : Integrable (f * g)\nhg : Integrable g\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave : μ[f * g|m] =ᵐ[μ] μ[hf.mk f * g|m] := condexp_congr_ae (EventuallyEq.mul hf.ae_eq_mk EventuallyEq.rfl)\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhfg : Integrable (f * g)\nhg : Integrable g\nthis : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\n⊢ μ[f * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nrefine' this.trans _\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhfg : Integrable (f * g)\nhg : Integrable g\nthis : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\n⊢ μ[AEStronglyMeasurable'.mk f hf * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nhave : f * μ[g|m] =ᵐ[μ] hf.mk f * μ[g|m] := EventuallyEq.mul hf.ae_eq_mk EventuallyEq.rfl\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhfg : Integrable (f * g)\nhg : Integrable g\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n⊢ μ[AEStronglyMeasurable'.mk f hf * g|m] =ᵐ[μ] f * μ[g|m]\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ this.symm\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhfg : Integrable (f * g)\nhg : Integrable g\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n⊢ μ[AEStronglyMeasurable'.mk f hf * g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n[PROOFSTEP]\nrefine' condexp_stronglyMeasurable_mul hf.stronglyMeasurable_mk _ hg\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhfg : Integrable (f * g)\nhg : Integrable g\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n⊢ Integrable (AEStronglyMeasurable'.mk f hf * g)\n[PROOFSTEP]\nrefine' (integrable_congr _).mp hfg\n[GOAL]\nα : Type u_1\nm m0 : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\nhf : AEStronglyMeasurable' m f μ\nhfg : Integrable (f * g)\nhg : Integrable g\nthis✝ : μ[f * g|m] =ᵐ[μ] μ[AEStronglyMeasurable'.mk f hf * g|m]\nthis : f * μ[g|m] =ᵐ[μ] AEStronglyMeasurable'.mk f hf * μ[g|m]\n⊢ f * g =ᵐ[μ] AEStronglyMeasurable'.mk f hf * g\n[PROOFSTEP]\nexact EventuallyEq.mul hf.ae_eq_mk EventuallyEq.rfl\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.ConditionalExpectation.Real", "llama_tokens": 61208, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245994514084, "lm_q2_score": 0.7279754489059775, "lm_q1q2_score": 0.6066398493700329}} {"text": "[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\n⊢ prod (map (fun r => X + ↑C r) s) = ∑ j in Finset.range (↑card s + 1), ↑C (esymm s j) * X ^ (↑card s - j)\n[PROOFSTEP]\nclassical\nrw [prod_map_add, antidiagonal_eq_map_powerset, map_map, ← bind_powerset_len, map_bind, sum_bind,\n Finset.sum_eq_multiset_sum, Finset.range_val, map_congr (Eq.refl _)]\nintro _ _\nrw [esymm, ← sum_hom', ← sum_map_mul_right, map_congr (Eq.refl _)]\nintro s ht\nrw [mem_powersetLen] at ht \ndsimp\nrw [prod_hom' s (Polynomial.C : R →+* R[X])]\nsimp [ht, map_const, prod_replicate, prod_hom', map_id', card_sub]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\n⊢ prod (map (fun r => X + ↑C r) s) = ∑ j in Finset.range (↑card s + 1), ↑C (esymm s j) * X ^ (↑card s - j)\n[PROOFSTEP]\nrw [prod_map_add, antidiagonal_eq_map_powerset, map_map, ← bind_powerset_len, map_bind, sum_bind,\n Finset.sum_eq_multiset_sum, Finset.range_val, map_congr (Eq.refl _)]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\n⊢ ∀ (x : ℕ),\n x ∈ range (↑card s + 1) →\n sum\n (map ((fun p => prod (map (fun r => X) p.fst) * prod (map (fun r => ↑C r) p.snd)) ∘ fun t => (s - t, t))\n (powersetLen x s)) =\n ↑C (esymm s x) * X ^ (↑card s - x)\n[PROOFSTEP]\nintro _ _\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nx✝ : ℕ\na✝ : x✝ ∈ range (↑card s + 1)\n⊢ sum\n (map ((fun p => prod (map (fun r => X) p.fst) * prod (map (fun r => ↑C r) p.snd)) ∘ fun t => (s - t, t))\n (powersetLen x✝ s)) =\n ↑C (esymm s x✝) * X ^ (↑card s - x✝)\n[PROOFSTEP]\nrw [esymm, ← sum_hom', ← sum_map_mul_right, map_congr (Eq.refl _)]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nx✝ : ℕ\na✝ : x✝ ∈ range (↑card s + 1)\n⊢ ∀ (x : Multiset R),\n x ∈ powersetLen x✝ s →\n ((fun p => prod (map (fun r => X) p.fst) * prod (map (fun r => ↑C r) p.snd)) ∘ fun t => (s - t, t)) x =\n ↑C (prod x) * X ^ (↑card s - x✝)\n[PROOFSTEP]\nintro s ht\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns✝ : Multiset R\nx✝ : ℕ\na✝ : x✝ ∈ range (↑card s✝ + 1)\ns : Multiset R\nht : s ∈ powersetLen x✝ s✝\n⊢ ((fun p => prod (map (fun r => X) p.fst) * prod (map (fun r => ↑C r) p.snd)) ∘ fun t => (s✝ - t, t)) s =\n ↑C (prod s) * X ^ (↑card s✝ - x✝)\n[PROOFSTEP]\nrw [mem_powersetLen] at ht \n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns✝ : Multiset R\nx✝ : ℕ\na✝ : x✝ ∈ range (↑card s✝ + 1)\ns : Multiset R\nht : s ≤ s✝ ∧ ↑card s = x✝\n⊢ ((fun p => prod (map (fun r => X) p.fst) * prod (map (fun r => ↑C r) p.snd)) ∘ fun t => (s✝ - t, t)) s =\n ↑C (prod s) * X ^ (↑card s✝ - x✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns✝ : Multiset R\nx✝ : ℕ\na✝ : x✝ ∈ range (↑card s✝ + 1)\ns : Multiset R\nht : s ≤ s✝ ∧ ↑card s = x✝\n⊢ prod (map (fun r => X) (s✝ - s)) * prod (map (fun r => ↑C r) s) = ↑C (prod s) * X ^ (↑card s✝ - x✝)\n[PROOFSTEP]\nrw [prod_hom' s (Polynomial.C : R →+* R[X])]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns✝ : Multiset R\nx✝ : ℕ\na✝ : x✝ ∈ range (↑card s✝ + 1)\ns : Multiset R\nht : s ≤ s✝ ∧ ↑card s = x✝\n⊢ prod (map (fun r => X) (s✝ - s)) * ↑C (prod (map (fun r => r) s)) = ↑C (prod s) * X ^ (↑card s✝ - x✝)\n[PROOFSTEP]\nsimp [ht, map_const, prod_replicate, prod_hom', map_id', card_sub]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ coeff (prod (map (fun r => X + ↑C r) s)) k = esymm s (↑card s - k)\n[PROOFSTEP]\nconvert Polynomial.ext_iff.mp (prod_X_add_C_eq_sum_esymm s) k using 1\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ esymm s (↑card s - k) = coeff (∑ j in Finset.range (↑card s + 1), ↑C (esymm s j) * X ^ (↑card s - j)) k\n[PROOFSTEP]\nsimp_rw [finset_sum_coeff, coeff_C_mul_X_pow]\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ esymm s (↑card s - k) = ∑ x in Finset.range (↑card s + 1), if k = ↑card s - x then esymm s x else 0\n[PROOFSTEP]\nrw [Finset.sum_eq_single_of_mem (Multiset.card s - k) _]\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ esymm s (↑card s - k) = if k = ↑card s - (↑card s - k) then esymm s (↑card s - k) else 0\n[PROOFSTEP]\nrw [if_pos (Nat.sub_sub_self h).symm]\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ ∀ (b : (fun x => ℕ) s),\n b ∈ Finset.range (↑card s + 1) → b ≠ ↑card s - k → (if k = ↑card s - b then esymm s b else 0) = 0\n[PROOFSTEP]\nintro j hj1 hj2\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\nj : ℕ\nhj1 : j ∈ Finset.range (↑card s + 1)\nhj2 : j ≠ ↑card s - k\n⊢ (if k = ↑card s - j then esymm s j else 0) = 0\n[PROOFSTEP]\nsuffices k ≠ card s - j by rw [if_neg this]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\nj : ℕ\nhj1 : j ∈ Finset.range (↑card s + 1)\nhj2 : j ≠ ↑card s - k\nthis : k ≠ ↑card s - j\n⊢ (if k = ↑card s - j then esymm s j else 0) = 0\n[PROOFSTEP]\nrw [if_neg this]\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\nj : ℕ\nhj1 : j ∈ Finset.range (↑card s + 1)\nhj2 : j ≠ ↑card s - k\n⊢ k ≠ ↑card s - j\n[PROOFSTEP]\nintro hn\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\nj : ℕ\nhj1 : j ∈ Finset.range (↑card s + 1)\nhj2 : j ≠ ↑card s - k\nhn : k = ↑card s - j\n⊢ False\n[PROOFSTEP]\nrw [hn, Nat.sub_sub_self (Nat.lt_succ_iff.mp (Finset.mem_range.mp hj1))] at hj2 \n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\nj : ℕ\nhj1 : j ∈ Finset.range (↑card s + 1)\nhj2 : j ≠ j\nhn : k = ↑card s - j\n⊢ False\n[PROOFSTEP]\nexact Ne.irrefl hj2\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ ↑card s - k ∈ Finset.range (↑card s + 1)\n[PROOFSTEP]\nrw [Finset.mem_range]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ ↑card s - k < ↑card s + 1\n[PROOFSTEP]\nexact Nat.sub_lt_succ (Multiset.card s) k\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\nσ : Type u_2\ns : Multiset σ\nr : σ → R\nk : ℕ\nh : k ≤ ↑card s\n⊢ coeff (prod (map (fun i => X + ↑C (r i)) s)) k = esymm (map r s) (↑card s - k)\n[PROOFSTEP]\nerw [← map_map (fun r => X + C r) r, prod_X_add_C_coeff]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\nσ : Type u_2\ns : Multiset σ\nr : σ → R\nk : ℕ\nh : k ≤ ↑card s\n⊢ esymm (map r s) (↑card (map r s) - k) = esymm (map r s) (↑card s - k)\n[PROOFSTEP]\nrw [s.card_map r]\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommSemiring R\nσ : Type u_2\ns : Multiset σ\nr : σ → R\nk : ℕ\nh : k ≤ ↑card s\n⊢ k ≤ ↑card (map r s)\n[PROOFSTEP]\nrw [s.card_map r]\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommSemiring R\nσ : Type u_2\ns : Multiset σ\nr : σ → R\nk : ℕ\nh : k ≤ ↑card s\n⊢ k ≤ ↑card s\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\nσ : Type u_2\ns : Finset σ\nr : σ → R\nk : ℕ\nh : k ≤ Finset.card s\n⊢ coeff (∏ i in s, (X + ↑C (r i))) k = ∑ t in Finset.powersetLen (Finset.card s - k) s, ∏ i in t, r i\n[PROOFSTEP]\nrw [Finset.prod, prod_X_add_C_coeff' _ r h, Finset.esymm_map_val]\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\nσ : Type u_2\ns : Finset σ\nr : σ → R\nk : ℕ\nh : k ≤ Finset.card s\n⊢ ∑ t in Finset.powersetLen (↑card s.val - k) s, Finset.prod t r =\n ∑ t in Finset.powersetLen (Finset.card s - k) s, ∏ i in t, r i\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\n⊢ esymm (map Neg.neg s) k = (-1) ^ k * esymm s k\n[PROOFSTEP]\nrw [esymm, esymm, ← Multiset.sum_map_mul_left, Multiset.powersetLen_map, Multiset.map_map, map_congr (Eq.refl _)]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\n⊢ ∀ (x : Multiset R), x ∈ powersetLen k s → (prod ∘ map Neg.neg) x = (-1) ^ k * prod x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nx : Multiset R\nhx : x ∈ powersetLen k s\n⊢ (prod ∘ map Neg.neg) x = (-1) ^ k * prod x\n[PROOFSTEP]\nrw [(mem_powersetLen.mp hx).right.symm, ← prod_replicate, ← Multiset.map_const]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nx : Multiset R\nhx : x ∈ powersetLen k s\n⊢ (prod ∘ map Neg.neg) x = prod (map (Function.const R (-1)) x) * prod x\n[PROOFSTEP]\nnth_rw 3 [← map_id' x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nx : Multiset R\nhx : x ∈ powersetLen k s\n⊢ (prod ∘ map Neg.neg) x = prod (map (Function.const R (-1)) x) * prod (map (fun x => x) x)\n[PROOFSTEP]\nrw [← prod_map_mul, map_congr (Eq.refl _)]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nx : Multiset R\nhx : x ∈ powersetLen k s\n⊢ (prod ∘ map Neg.neg) x = prod (map ?m.852287 x)\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nx : Multiset R\nhx : x ∈ powersetLen k s\n⊢ ∀ (x_1 : R), x_1 ∈ x → Function.const R (-1) x_1 * x_1 = ?m.852287 x_1\nR : Type u_1 inst✝ : CommRing R s : Multiset R k : ℕ x : Multiset R hx : x ∈ powersetLen k s ⊢ R → R\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nx : Multiset R\nhx : x ∈ powersetLen k s\n⊢ ∀ (x_1 : R), x_1 ∈ x → Function.const R (-1) x_1 * x_1 = -x_1\n[PROOFSTEP]\nexact fun z _ => neg_one_mul z\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n⊢ prod (map (fun t => X - ↑C t) s) = ∑ j in Finset.range (↑card s + 1), (-1) ^ j * (↑C (esymm s j) * X ^ (↑card s - j))\n[PROOFSTEP]\nconv_lhs =>\n congr\n congr\n ext x\n rw [sub_eq_add_neg]\n rw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n| prod (map (fun t => X - ↑C t) s)\n[PROOFSTEP]\n congr\n congr\n ext x\n rw [sub_eq_add_neg]\n rw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n| prod (map (fun t => X - ↑C t) s)\n[PROOFSTEP]\n congr\n congr\n ext x\n rw [sub_eq_add_neg]\n rw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n| prod (map (fun t => X - ↑C t) s)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n| map (fun t => X - ↑C t) s\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.f\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n| fun t => X - ↑C t\ncase a.s R : Type u_1 inst✝ : CommRing R s : Multiset R | s\n[PROOFSTEP]\next x\n[GOAL]\ncase a.f.h\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nx : R\n| X - ↑C x\ncase a.s R : Type u_1 inst✝ : CommRing R s : Multiset R | s\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\ncase a.f.h\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nx : R\n| X + -↑C x\ncase a.s R : Type u_1 inst✝ : CommRing R s : Multiset R | s\n[PROOFSTEP]\nrw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n⊢ prod (map (fun x => X + ↑C (-x)) s) =\n ∑ j in Finset.range (↑card s + 1), (-1) ^ j * (↑C (esymm s j) * X ^ (↑card s - j))\n[PROOFSTEP]\nconvert prod_X_add_C_eq_sum_esymm (map (fun t => -t) s) using 1\n[GOAL]\ncase h.e'_2\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n⊢ prod (map (fun x => X + ↑C (-x)) s) = prod (map (fun r => X + ↑C r) (map (fun t => -t) s))\n[PROOFSTEP]\nrw [map_map]\n[GOAL]\ncase h.e'_2\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n⊢ prod (map (fun x => X + ↑C (-x)) s) = prod (map ((fun r => X + ↑C r) ∘ fun t => -t) s)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\n⊢ ∑ j in Finset.range (↑card s + 1), (-1) ^ j * (↑C (esymm s j) * X ^ (↑card s - j)) =\n ∑ j in Finset.range (↑card (map (fun t => -t) s) + 1),\n ↑C (esymm (map (fun t => -t) s) j) * X ^ (↑card (map (fun t => -t) s) - j)\n[PROOFSTEP]\nsimp only [esymm_neg, card_map, mul_assoc, map_mul, map_pow, map_neg, map_one]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ coeff (prod (map (fun t => X - ↑C t) s)) k = (-1) ^ (↑card s - k) * esymm s (↑card s - k)\n[PROOFSTEP]\nconv_lhs =>\n congr\n congr\n congr\n ext x\n rw [sub_eq_add_neg]\n rw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| coeff (prod (map (fun t => X - ↑C t) s)) k\n[PROOFSTEP]\n congr\n congr\n congr\n ext x\n rw [sub_eq_add_neg]\n rw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| coeff (prod (map (fun t => X - ↑C t) s)) k\n[PROOFSTEP]\n congr\n congr\n congr\n ext x\n rw [sub_eq_add_neg]\n rw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| coeff (prod (map (fun t => X - ↑C t) s)) k\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| prod (map (fun t => X - ↑C t) s)\ncase a R : Type u_1 inst✝ : CommRing R s : Multiset R k : ℕ h : k ≤ ↑card s | k\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| map (fun t => X - ↑C t) s\ncase a R : Type u_1 inst✝ : CommRing R s : Multiset R k : ℕ h : k ≤ ↑card s | k\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a.f\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| fun t => X - ↑C t\ncase a.a.s\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| s\ncase a R : Type u_1 inst✝ : CommRing R s : Multiset R k : ℕ h : k ≤ ↑card s | k\n[PROOFSTEP]\next x\n[GOAL]\ncase a.a.f.h\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\nx : R\n| X - ↑C x\ncase a.a.s\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| s\ncase a R : Type u_1 inst✝ : CommRing R s : Multiset R k : ℕ h : k ≤ ↑card s | k\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\ncase a.a.f.h\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\nx : R\n| X + -↑C x\ncase a.a.s\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n| s\ncase a R : Type u_1 inst✝ : CommRing R s : Multiset R k : ℕ h : k ≤ ↑card s | k\n[PROOFSTEP]\nrw [← map_neg C x]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ coeff (prod (map (fun x => X + ↑C (-x)) s)) k = (-1) ^ (↑card s - k) * esymm s (↑card s - k)\n[PROOFSTEP]\nconvert prod_X_add_C_coeff (map (fun t => -t) s) _ using 1\n[GOAL]\ncase h.e'_2\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ coeff (prod (map (fun x => X + ↑C (-x)) s)) k =\n coeff (prod (map (fun r => X + ↑C r) (map (fun t => -t) s))) ?convert_1\n[PROOFSTEP]\nrw [map_map]\n[GOAL]\ncase h.e'_2\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ coeff (prod (map (fun x => X + ↑C (-x)) s)) k = coeff (prod (map ((fun r => X + ↑C r) ∘ fun t => -t) s)) ?convert_1\ncase convert_1 R : Type u_1 inst✝ : CommRing R s : Multiset R k : ℕ h : k ≤ ↑card s ⊢ ℕ\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ (-1) ^ (↑card s - k) * esymm s (↑card s - k) = esymm (map (fun t => -t) s) (↑card (map (fun t => -t) s) - k)\n[PROOFSTEP]\nrw [esymm_neg, card_map]\n[GOAL]\ncase convert_2\nR : Type u_1\ninst✝ : CommRing R\ns : Multiset R\nk : ℕ\nh : k ≤ ↑card s\n⊢ k ≤ ↑card (map (fun t => -t) s)\n[PROOFSTEP]\nrwa [card_map]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n⊢ coeff p k = leadingCoeff p * (-1) ^ (natDegree p - k) * esymm (roots p) (natDegree p - k)\n[PROOFSTEP]\nconv_lhs => rw [← C_leadingCoeff_mul_prod_multiset_X_sub_C hroots]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n| coeff p k\n[PROOFSTEP]\nrw [← C_leadingCoeff_mul_prod_multiset_X_sub_C hroots]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n| coeff p k\n[PROOFSTEP]\nrw [← C_leadingCoeff_mul_prod_multiset_X_sub_C hroots]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n| coeff p k\n[PROOFSTEP]\nrw [← C_leadingCoeff_mul_prod_multiset_X_sub_C hroots]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n⊢ coeff (↑C (leadingCoeff p) * prod (map (fun a => X - ↑C a) (roots p))) k =\n leadingCoeff p * (-1) ^ (natDegree p - k) * esymm (roots p) (natDegree p - k)\n[PROOFSTEP]\nrw [coeff_C_mul, mul_assoc]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n⊢ leadingCoeff p * coeff (prod (map (fun a => X - ↑C a) (roots p))) k =\n leadingCoeff p * ((-1) ^ (natDegree p - k) * esymm (roots p) (natDegree p - k))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n⊢ coeff (prod (map (fun a => X - ↑C a) (roots p))) k = (-1) ^ (natDegree p - k) * esymm (roots p) (natDegree p - k)\n[PROOFSTEP]\nhave : k ≤ card (roots p) := by rw [hroots]; exact h\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n⊢ k ≤ ↑card (roots p)\n[PROOFSTEP]\nrw [hroots]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\n⊢ k ≤ natDegree p\n[PROOFSTEP]\nexact h\n[GOAL]\ncase e_a\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\nthis : k ≤ ↑card (roots p)\n⊢ coeff (prod (map (fun a => X - ↑C a) (roots p))) k = (-1) ^ (natDegree p - k) * esymm (roots p) (natDegree p - k)\n[PROOFSTEP]\nconvert p.roots.prod_X_sub_C_coeff this using 3\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_6\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\nthis : k ≤ ↑card (roots p)\n⊢ natDegree p - k = ↑card (roots p) - k\n[PROOFSTEP]\nrw [hroots]\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_4\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhroots : ↑card (roots p) = natDegree p\nk : ℕ\nh : k ≤ natDegree p\nthis : k ≤ ↑card (roots p)\n⊢ natDegree p - k = ↑card (roots p) - k\n[PROOFSTEP]\nrw [hroots]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\n⊢ ∏ i : σ, (Polynomial.X + ↑Polynomial.C (X i)) =\n ∑ j in range (Fintype.card σ + 1), ↑Polynomial.C (esymm σ R j) * Polynomial.X ^ (Fintype.card σ - j)\n[PROOFSTEP]\nlet s := Finset.univ.val.map fun i : σ => (MvPolynomial.X i : MvPolynomial σ R)\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\n⊢ ∏ i : σ, (Polynomial.X + ↑Polynomial.C (X i)) =\n ∑ j in range (Fintype.card σ + 1), ↑Polynomial.C (esymm σ R j) * Polynomial.X ^ (Fintype.card σ - j)\n[PROOFSTEP]\nhave : Fintype.card σ = Multiset.card s := by rw [Multiset.card_map, ← Finset.card_univ, Finset.card_def]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\n⊢ Fintype.card σ = ↑Multiset.card s\n[PROOFSTEP]\nrw [Multiset.card_map, ← Finset.card_univ, Finset.card_def]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ ∏ i : σ, (Polynomial.X + ↑Polynomial.C (X i)) =\n ∑ j in range (Fintype.card σ + 1), ↑Polynomial.C (esymm σ R j) * Polynomial.X ^ (Fintype.card σ - j)\n[PROOFSTEP]\nsimp_rw [this, MvPolynomial.esymm_eq_multiset_esymm σ R, Finset.prod_eq_multiset_prod]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ Multiset.prod (Multiset.map (fun x => Polynomial.X + ↑Polynomial.C (X x)) univ.val) =\n ∑ x in range (↑Multiset.card (Multiset.map (fun i => X i) univ.val) + 1),\n ↑Polynomial.C (Multiset.esymm (Multiset.map X univ.val) x) *\n Polynomial.X ^ (↑Multiset.card (Multiset.map (fun i => X i) univ.val) - x)\n[PROOFSTEP]\nconvert Multiset.prod_X_add_C_eq_sum_esymm s\n[GOAL]\ncase h.e'_2.h.e'_3\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ Multiset.map (fun x => Polynomial.X + ↑Polynomial.C (X x)) univ.val =\n Multiset.map (fun r => Polynomial.X + ↑Polynomial.C r) s\n[PROOFSTEP]\nsimp_rw [Multiset.map_map, Function.comp_apply]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\nh : k ≤ Fintype.card σ\n⊢ Polynomial.coeff (∏ i : σ, (Polynomial.X + ↑Polynomial.C (X i))) k = esymm σ R (Fintype.card σ - k)\n[PROOFSTEP]\nlet s := Finset.univ.val.map fun i => (MvPolynomial.X i : MvPolynomial σ R)\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\nh : k ≤ Fintype.card σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\n⊢ Polynomial.coeff (∏ i : σ, (Polynomial.X + ↑Polynomial.C (X i))) k = esymm σ R (Fintype.card σ - k)\n[PROOFSTEP]\nhave : Fintype.card σ = Multiset.card s := by rw [Multiset.card_map, ← Finset.card_univ, Finset.card_def]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\nh : k ≤ Fintype.card σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\n⊢ Fintype.card σ = ↑Multiset.card s\n[PROOFSTEP]\nrw [Multiset.card_map, ← Finset.card_univ, Finset.card_def]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\nh : k ≤ Fintype.card σ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ Polynomial.coeff (∏ i : σ, (Polynomial.X + ↑Polynomial.C (X i))) k = esymm σ R (Fintype.card σ - k)\n[PROOFSTEP]\nrw [this] at h ⊢\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nh : k ≤ ↑Multiset.card s\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ Polynomial.coeff (∏ i : σ, (Polynomial.X + ↑Polynomial.C (X i))) k = esymm σ R (↑Multiset.card s - k)\n[PROOFSTEP]\nrw [MvPolynomial.esymm_eq_multiset_esymm σ R, Finset.prod_eq_multiset_prod]\n[GOAL]\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nh : k ≤ ↑Multiset.card s\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ Polynomial.coeff (Multiset.prod (Multiset.map (fun i => Polynomial.X + ↑Polynomial.C (X i)) univ.val)) k =\n Multiset.esymm (Multiset.map X univ.val) (↑Multiset.card s - k)\n[PROOFSTEP]\nconvert Multiset.prod_X_add_C_coeff s h\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_3\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nh : k ≤ ↑Multiset.card s\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ Multiset.map (fun i => Polynomial.X + ↑Polynomial.C (X i)) univ.val =\n Multiset.map (fun r => Polynomial.X + ↑Polynomial.C r) s\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_3\nR : Type u_1\nσ : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Fintype σ\nk : ℕ\ns : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val\nh : k ≤ ↑Multiset.card s\nthis : Fintype.card σ = ↑Multiset.card s\n⊢ Multiset.map (fun i => Polynomial.X + ↑Polynomial.C (X i)) univ.val =\n Multiset.map (fun r => Polynomial.X + ↑Polynomial.C r) (Multiset.map (fun i => X i) univ.val)\n[PROOFSTEP]\nsimp_rw [Multiset.map_map, Function.comp_apply]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Vieta", "llama_tokens": 12079, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245911726382, "lm_q2_score": 0.7279754371026368, "lm_q1q2_score": 0.6066398335072775}} {"text": "[GOAL]\n⊢ ∀ ⦃x : ℂ⦄, x ∈ {z | z.im ∈ Ioo (-π) π} → exp x ∈ {z | 0 < z.re} ∪ {z | z.im ≠ 0}\n[PROOFSTEP]\nrintro ⟨x, y⟩ ⟨h₁ : -π < y, h₂ : y < π⟩\n[GOAL]\ncase mk.intro\nx y : ℝ\nh₁ : -π < y\nh₂ : y < π\n⊢ exp { re := x, im := y } ∈ {z | 0 < z.re} ∪ {z | z.im ≠ 0}\n[PROOFSTEP]\nrefine' (not_or_of_imp fun hz => _).symm\n[GOAL]\ncase mk.intro\nx y : ℝ\nh₁ : -π < y\nh₂ : y < π\nhz : (exp { re := x, im := y }).im = 0\n⊢ exp { re := x, im := y } ∈ {z | 0 < z.re}\n[PROOFSTEP]\nobtain rfl : y = 0 := by\n rw [exp_im] at hz \n simpa [(Real.exp_pos _).ne', Real.sin_eq_zero_iff_of_lt_of_lt h₁ h₂] using hz\n[GOAL]\nx y : ℝ\nh₁ : -π < y\nh₂ : y < π\nhz : (exp { re := x, im := y }).im = 0\n⊢ y = 0\n[PROOFSTEP]\nrw [exp_im] at hz \n[GOAL]\nx y : ℝ\nh₁ : -π < y\nh₂ : y < π\nhz : Real.exp { re := x, im := y }.re * Real.sin { re := x, im := y }.im = 0\n⊢ y = 0\n[PROOFSTEP]\nsimpa [(Real.exp_pos _).ne', Real.sin_eq_zero_iff_of_lt_of_lt h₁ h₂] using hz\n[GOAL]\ncase mk.intro\nx : ℝ\nh₁ : -π < 0\nh₂ : 0 < π\nhz : (exp { re := x, im := 0 }).im = 0\n⊢ exp { re := x, im := 0 } ∈ {z | 0 < z.re}\n[PROOFSTEP]\nrw [mem_setOf_eq, ← ofReal_def, exp_ofReal_re]\n[GOAL]\ncase mk.intro\nx : ℝ\nh₁ : -π < 0\nh₂ : 0 < π\nhz : (exp { re := x, im := 0 }).im = 0\n⊢ 0 < Real.exp x\n[PROOFSTEP]\nexact Real.exp_pos x\n[GOAL]\nz : ℂ\nh : z ∈ {z | 0 < z.re} ∪ {z | z.im ≠ 0}\n⊢ log z ∈ {z | z.im ∈ Ioo (-π) π}\n[PROOFSTEP]\nsimp only [mem_setOf, log_im, mem_Ioo, neg_pi_lt_arg, arg_lt_pi_iff, true_and]\n[GOAL]\nz : ℂ\nh : z ∈ {z | 0 < z.re} ∪ {z | z.im ≠ 0}\n⊢ 0 ≤ z.re ∨ z.im ≠ 0\n[PROOFSTEP]\nexact h.imp_left le_of_lt\n[GOAL]\nx : ℂ\nhx : x ∈ {z | 0 < z.re} ∪ {z | z.im ≠ 0}\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nhx : 0 ∈ {z | 0 < z.re} ∪ {z | z.im ≠ 0}\n⊢ False\n[PROOFSTEP]\nsimp [lt_irrefl] at hx \n[GOAL]\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nh : 0 < 0.re ∨ 0.im ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp [lt_irrefl] at h \n[GOAL]\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\nh0 : x ≠ 0\n⊢ HasStrictDerivAt (↑expLocalHomeomorph) x (↑(LocalHomeomorph.symm expLocalHomeomorph) x)\n[PROOFSTEP]\nsimpa [exp_log h0] using hasStrictDerivAt_exp (log x)\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\nh₁ : HasStrictDerivAt f f' x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasStrictDerivAt (fun t => log (f t)) (f' / f x) x\n[PROOFSTEP]\nrw [div_eq_inv_mul]\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\nh₁ : HasStrictDerivAt f f' x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasStrictDerivAt (fun t => log (f t)) ((f x)⁻¹ * f') x\n[PROOFSTEP]\nexact (hasStrictDerivAt_log h₂).comp x h₁\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → ℂ\nx : ℝ\nf' : ℂ\nh₁ : HasStrictDerivAt f f' x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasStrictDerivAt (fun t => log (f t)) (f' / f x) x\n[PROOFSTEP]\nsimpa only [div_eq_inv_mul] using (hasStrictFDerivAt_log_real h₂).comp_hasStrictDerivAt x h₁\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\nh₁ : HasDerivAt f f' x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasDerivAt (fun t => log (f t)) (f' / f x) x\n[PROOFSTEP]\nrw [div_eq_inv_mul]\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\nh₁ : HasDerivAt f f' x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasDerivAt (fun t => log (f t)) ((f x)⁻¹ * f') x\n[PROOFSTEP]\nexact (hasStrictDerivAt_log h₂).hasDerivAt.comp x h₁\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → ℂ\nx : ℝ\nf' : ℂ\nh₁ : HasDerivAt f f' x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasDerivAt (fun t => log (f t)) (f' / f x) x\n[PROOFSTEP]\nsimpa only [div_eq_inv_mul] using (hasStrictFDerivAt_log_real h₂).hasFDerivAt.comp_hasDerivAt x h₁\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\ns : Set ℂ\nh₁ : HasDerivWithinAt f f' s x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasDerivWithinAt (fun t => log (f t)) (f' / f x) s x\n[PROOFSTEP]\nrw [div_eq_inv_mul]\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\ns : Set ℂ\nh₁ : HasDerivWithinAt f f' s x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasDerivWithinAt (fun t => log (f t)) ((f x)⁻¹ * f') s x\n[PROOFSTEP]\nexact (hasStrictDerivAt_log h₂).hasDerivAt.comp_hasDerivWithinAt x h₁\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → ℂ\ns : Set ℝ\nx : ℝ\nf' : ℂ\nh₁ : HasDerivWithinAt f f' s x\nh₂ : 0 < (f x).re ∨ (f x).im ≠ 0\n⊢ HasDerivWithinAt (fun t => log (f t)) (f' / f x) s x\n[PROOFSTEP]\nsimpa only [div_eq_inv_mul] using (hasStrictFDerivAt_log_real h₂).hasFDerivAt.comp_hasDerivWithinAt x h₁\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv", "llama_tokens": 2727, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438951025545426, "lm_q2_score": 0.7185943805178139, "lm_q1q2_score": 0.6064182784421985}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionRing K\na b : K\nA : Type u_4\ninst✝ : DivisionRing A\nm : ℚ\n⊢ m • 1 = ↑m\n[PROOFSTEP]\nrw [Rat.smul_def, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Semiring R\nh : IsField R\nsrc✝ : Semiring R := inst✝\na : R\nha : a ≠ 0\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\nconvert Classical.choose_spec (IsField.mul_inv_cancel h ha)\n[GOAL]\ncase h.e'_2.h.e'_6\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Semiring R\nh : IsField R\nsrc✝ : Semiring R := inst✝\na : R\nha : a ≠ 0\n⊢ a⁻¹ = choose (_ : ∃ b, a * b = 1)\n[PROOFSTEP]\nexact dif_neg ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\n⊢ ∀ (x : R), x ≠ 0 → ∃! y, x * y = 1\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\nx : R\nhx : x ≠ 0\n⊢ ∃! y, x * y = 1\n[PROOFSTEP]\napply exists_unique_of_exists_of_unique\n[GOAL]\ncase hex\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\nx : R\nhx : x ≠ 0\n⊢ ∃ x_1, x * x_1 = 1\n[PROOFSTEP]\nexact hf.mul_inv_cancel hx\n[GOAL]\ncase hunique\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\nx : R\nhx : x ≠ 0\n⊢ ∀ (y₁ y₂ : R), x * y₁ = 1 → x * y₂ = 1 → y₁ = y₂\n[PROOFSTEP]\nintro y z hxy hxz\n[GOAL]\ncase hunique\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\nx : R\nhx : x ≠ 0\ny z : R\nhxy : x * y = 1\nhxz : x * z = 1\n⊢ y = z\n[PROOFSTEP]\ncalc\n y = y * (x * z) := by rw [hxz, mul_one]\n _ = x * y * z := by rw [← mul_assoc, hf.mul_comm y x]\n _ = z := by rw [hxy, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\nx : R\nhx : x ≠ 0\ny z : R\nhxy : x * y = 1\nhxz : x * z = 1\n⊢ y = y * (x * z)\n[PROOFSTEP]\nrw [hxz, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\nx : R\nhx : x ≠ 0\ny z : R\nhxy : x * y = 1\nhxz : x * z = 1\n⊢ y * (x * z) = x * y * z\n[PROOFSTEP]\nrw [← mul_assoc, hf.mul_comm y x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\nR : Type u\ninst✝ : Ring R\nhf : IsField R\nx : R\nhx : x ≠ 0\ny z : R\nhxy : x * y = 1\nhxz : x * z = 1\n⊢ x * y * z = z\n[PROOFSTEP]\nrw [hxy, one_mul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Field.Defs", "llama_tokens": 1231, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289387914176259, "lm_q2_score": 0.7310585669110203, "lm_q1q2_score": 0.6060028049107228}} {"text": "[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\nn : ℕ\nl : List α\n⊢ countp.go p l n = n + countp.go p l 0\n[PROOFSTEP]\ninduction' l with head tail ih generalizing n\n[GOAL]\ncase nil\nα : Type u_1\nl : List α\np q : α → Bool\nn✝ n : ℕ\n⊢ countp.go p [] n = n + countp.go p [] 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nl : List α\np q : α → Bool\nn✝ : ℕ\nhead : α\ntail : List α\nih : ∀ {n : ℕ}, countp.go p tail n = n + countp.go p tail 0\nn : ℕ\n⊢ countp.go p (head :: tail) n = n + countp.go p (head :: tail) 0\n[PROOFSTEP]\nunfold countp.go\n[GOAL]\ncase cons\nα : Type u_1\nl : List α\np q : α → Bool\nn✝ : ℕ\nhead : α\ntail : List α\nih : ∀ {n : ℕ}, countp.go p tail n = n + countp.go p tail 0\nn : ℕ\n⊢ (bif p head then countp.go p tail (n + 1) else countp.go p tail n) =\n n + bif p head then countp.go p tail (0 + 1) else countp.go p tail 0\n[PROOFSTEP]\nrw [ih (n := n + 1), ih (n := n), ih (n := 1)]\n[GOAL]\ncase cons\nα : Type u_1\nl : List α\np q : α → Bool\nn✝ : ℕ\nhead : α\ntail : List α\nih : ∀ {n : ℕ}, countp.go p tail n = n + countp.go p tail 0\nn : ℕ\n⊢ (bif p head then n + 1 + countp.go p tail 0 else n + countp.go p tail 0) =\n n + bif p head then 1 + countp.go p tail 0 else countp.go p tail 0\n[PROOFSTEP]\nby_cases h : p head\n[GOAL]\ncase pos\nα : Type u_1\nl : List α\np q : α → Bool\nn✝ : ℕ\nhead : α\ntail : List α\nih : ∀ {n : ℕ}, countp.go p tail n = n + countp.go p tail 0\nn : ℕ\nh : p head = true\n⊢ (bif p head then n + 1 + countp.go p tail 0 else n + countp.go p tail 0) =\n n + bif p head then 1 + countp.go p tail 0 else countp.go p tail 0\n[PROOFSTEP]\nsimp [h, add_assoc]\n[GOAL]\ncase neg\nα : Type u_1\nl : List α\np q : α → Bool\nn✝ : ℕ\nhead : α\ntail : List α\nih : ∀ {n : ℕ}, countp.go p tail n = n + countp.go p tail 0\nn : ℕ\nh : ¬p head = true\n⊢ (bif p head then n + 1 + countp.go p tail 0 else n + countp.go p tail 0) =\n n + bif p head then 1 + countp.go p tail 0 else countp.go p tail 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : p a = true\n⊢ countp p (a :: l) = countp p l + 1\n[PROOFSTEP]\nhave : countp.go p (a :: l) 0 = countp.go p l 1\n[GOAL]\ncase this\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : p a = true\n⊢ countp.go p (a :: l) 0 = countp.go p l 1\n[PROOFSTEP]\nchange (bif _ then _ else _) = countp.go _ _ _\n[GOAL]\ncase this\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : p a = true\n⊢ (bif p a then countp.go p l (0 + 1) else countp.go p l 0) = countp.go p l 1\n[PROOFSTEP]\nrw [pa]\n[GOAL]\ncase this\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : p a = true\n⊢ (bif true then countp.go p l (0 + 1) else countp.go p l 0) = countp.go p l 1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : p a = true\nthis : countp.go p (a :: l) 0 = countp.go p l 1\n⊢ countp p (a :: l) = countp p l + 1\n[PROOFSTEP]\nunfold countp\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : p a = true\nthis : countp.go p (a :: l) 0 = countp.go p l 1\n⊢ countp.go p (a :: l) 0 = countp.go p l 0 + 1\n[PROOFSTEP]\nrw [this, add_comm, List.countp_go_eq_add]\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : ¬p a = true\n⊢ countp p (a :: l) = countp p l\n[PROOFSTEP]\nchange (bif _ then _ else _) = countp.go _ _ _\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : ¬p a = true\n⊢ (bif p a then countp.go p l (0 + 1) else countp.go p l 0) = countp.go p l 0\n[PROOFSTEP]\nrw [Bool.of_not_eq_true pa]\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\npa : ¬p a = true\n⊢ (bif false then countp.go p l (0 + 1) else countp.go p l 0) = countp.go p l 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\n⊢ countp p (a :: l) = countp p l + if p a = true then 1 else 0\n[PROOFSTEP]\nby_cases h : p a\n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\nh : p a = true\n⊢ countp p (a :: l) = countp p l + if p a = true then 1 else 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : α\nl : List α\nh : ¬p a = true\n⊢ countp p (a :: l) = countp p l + if p a = true then 1 else 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\nl : List α\n⊢ length l = countp p l + countp (fun a => decide ¬p a = true) l\n[PROOFSTEP]\ninduction' l with x h ih\n[GOAL]\ncase nil\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ length [] = countp p [] + countp (fun a => decide ¬p a = true) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nl : List α\np q : α → Bool\nx : α\nh : List α\nih : length h = countp p h + countp (fun a => decide ¬p a = true) h\n⊢ length (x :: h) = countp p (x :: h) + countp (fun a => decide ¬p a = true) (x :: h)\n[PROOFSTEP]\nby_cases h : p x\n[GOAL]\ncase pos\nα : Type u_1\nl : List α\np q : α → Bool\nx : α\nh✝ : List α\nih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝\nh : p x = true\n⊢ length (x :: h✝) = countp p (x :: h✝) + countp (fun a => decide ¬p a = true) (x :: h✝)\n[PROOFSTEP]\nrw [countp_cons_of_pos _ _ h, countp_cons_of_neg _ _ _, length, ih]\n[GOAL]\ncase pos\nα : Type u_1\nl : List α\np q : α → Bool\nx : α\nh✝ : List α\nih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝\nh : p x = true\n⊢ countp p h✝ + countp (fun a => decide ¬p a = true) h✝ + 1 = countp p h✝ + 1 + countp (fun a => decide ¬p a = true) h✝\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\nx : α\nh✝ : List α\nih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝\nh : p x = true\n⊢ ¬(decide ¬p x = true) = true\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase neg\nα : Type u_1\nl : List α\np q : α → Bool\nx : α\nh✝ : List α\nih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝\nh : ¬p x = true\n⊢ length (x :: h✝) = countp p (x :: h✝) + countp (fun a => decide ¬p a = true) (x :: h✝)\n[PROOFSTEP]\nrw [countp_cons_of_pos (fun a => ¬p a) _ _, countp_cons_of_neg _ _ h, length, ih]\n[GOAL]\ncase neg\nα : Type u_1\nl : List α\np q : α → Bool\nx : α\nh✝ : List α\nih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝\nh : ¬p x = true\n⊢ countp p h✝ + countp (fun a => decide ¬p a = true) h✝ + 1 =\n countp p h✝ + (countp (fun a => decide ¬p a = true) h✝ + 1)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\nx : α\nh✝ : List α\nih : length h✝ = countp p h✝ + countp (fun a => decide ¬p a = true) h✝\nh : ¬p x = true\n⊢ (fun a => decide ¬p a = true) x = true\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\nl : List α\n⊢ countp p l = length (filter p l)\n[PROOFSTEP]\ninduction' l with x l ih\n[GOAL]\ncase nil\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ countp p [] = length (filter p [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nl✝ : List α\np q : α → Bool\nx : α\nl : List α\nih : countp p l = length (filter p l)\n⊢ countp p (x :: l) = length (filter p (x :: l))\n[PROOFSTEP]\nby_cases h : p x\n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\np q : α → Bool\nx : α\nl : List α\nih : countp p l = length (filter p l)\nh : p x = true\n⊢ countp p (x :: l) = length (filter p (x :: l))\n[PROOFSTEP]\nrw [countp_cons_of_pos p l h, ih, filter_cons_of_pos l h, length]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\np q : α → Bool\nx : α\nl : List α\nih : countp p l = length (filter p l)\nh : ¬p x = true\n⊢ countp p (x :: l) = length (filter p (x :: l))\n[PROOFSTEP]\nrw [countp_cons_of_neg p l h, ih, filter_cons_of_neg l h]\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ countp p l ≤ length l\n[PROOFSTEP]\nsimpa only [countp_eq_length_filter] using length_filter_le _ _\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\nl₁ l₂ : List α\n⊢ countp p (l₁ ++ l₂) = countp p l₁ + countp p l₂\n[PROOFSTEP]\nsimp only [countp_eq_length_filter, filter_append, length_append]\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\na : List α\nl : List (List α)\n⊢ countp p (join (a :: l)) = sum (map (countp p) (a :: l))\n[PROOFSTEP]\nrw [join, countp_append, map_cons, sum_cons, countp_join l]\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ 0 < countp p l ↔ ∃ a, a ∈ l ∧ p a = true\n[PROOFSTEP]\nsimp only [countp_eq_length_filter, length_pos_iff_exists_mem, mem_filter, exists_prop]\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ countp p l = 0 ↔ ∀ (a : α), a ∈ l → ¬p a = true\n[PROOFSTEP]\nrw [← not_iff_not, ← Ne.def, ← pos_iff_ne_zero, countp_pos]\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ (∃ a, a ∈ l ∧ p a = true) ↔ ¬∀ (a : α), a ∈ l → ¬p a = true\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ countp p l = length l ↔ ∀ (a : α), a ∈ l → p a = true\n[PROOFSTEP]\nrw [countp_eq_length_filter, filter_length_eq_length]\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\nl : List α\n⊢ length (filter p l) < length l ↔ ∃ x, x ∈ l ∧ ¬p x = true\n[PROOFSTEP]\nsimpa [length_eq_countp_add_countp p l, countp_eq_length_filter] using countp_pos (fun x => ¬p x) (l := l)\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\nl₁ l₂ : List α\ns : l₁ <+ l₂\n⊢ countp p l₁ ≤ countp p l₂\n[PROOFSTEP]\nsimpa only [countp_eq_length_filter] using length_le_of_sublist (s.filter p)\n[GOAL]\nα : Type u_1\nl✝ : List α\np q : α → Bool\nl : List α\n⊢ countp p (filter q l) = countp (fun a => decide (p a = true ∧ q a = true)) l\n[PROOFSTEP]\nsimp only [countp_eq_length_filter, filter_filter]\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ countp (fun x => true) l = length l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\n⊢ countp (fun x => false) l = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_2\nl✝ : List α\np✝ q : α → Bool\nβ : Type u_1\np : β → Bool\nf : α → β\na : α\nl : List α\n⊢ countp p (map f (a :: l)) = countp (p ∘ f) (a :: l)\n[PROOFSTEP]\nrw [map_cons, countp_cons, countp_cons, countp_map p f l]\n[GOAL]\nα : Type u_2\nl✝ : List α\np✝ q : α → Bool\nβ : Type u_1\np : β → Bool\nf : α → β\na : α\nl : List α\n⊢ (countp (p ∘ f) l + if p (f a) = true then 1 else 0) = countp (p ∘ f) l + if (p ∘ f) a = true then 1 else 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l → p x = true → q x = true\n⊢ countp p l ≤ countp q l\n[PROOFSTEP]\ninduction' l with a l ihl\n[GOAL]\ncase nil\nα : Type u_1\nl : List α\np q : α → Bool\nh✝ : ∀ (x : α), x ∈ l → p x = true → q x = true\nh : ∀ (x : α), x ∈ [] → p x = true → q x = true\n⊢ countp p [] ≤ countp q []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh✝ : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nh : ∀ (x : α), x ∈ a :: l → p x = true → q x = true\n⊢ countp p (a :: l) ≤ countp q (a :: l)\n[PROOFSTEP]\nrw [forall_mem_cons] at h \n[GOAL]\ncase cons\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh✝ : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nh : (p a = true → q a = true) ∧ ∀ (x : α), x ∈ l → p x = true → q x = true\n⊢ countp p (a :: l) ≤ countp q (a :: l)\n[PROOFSTEP]\ncases' h with ha hl\n[GOAL]\ncase cons.intro\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\n⊢ countp p (a :: l) ≤ countp q (a :: l)\n[PROOFSTEP]\nrw [countp_cons, countp_cons]\n[GOAL]\ncase cons.intro\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\n⊢ (countp p l + if p a = true then 1 else 0) ≤ countp q l + if q a = true then 1 else 0\n[PROOFSTEP]\nrefine' _root_.add_le_add (ihl hl) _\n[GOAL]\ncase cons.intro\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\n⊢ (if p a = true then 1 else 0) ≤ if q a = true then 1 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\nh✝¹ : p a = true\nh✝ : q a = true\n⊢ 1 ≤ 1\n[PROOFSTEP]\nsimp only [le_rfl, _root_.zero_le]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\nh✝¹ : p a = true\nh✝ : ¬q a = true\n⊢ 1 ≤ 0\n[PROOFSTEP]\nsimp only [le_rfl, _root_.zero_le]\n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\nh✝¹ : ¬p a = true\nh✝ : q a = true\n⊢ 0 ≤ 1\n[PROOFSTEP]\nsimp only [le_rfl, _root_.zero_le]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\nh✝¹ : ¬p a = true\nh✝ : ¬q a = true\n⊢ 0 ≤ 0\n[PROOFSTEP]\nsimp only [le_rfl, _root_.zero_le]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\np q : α → Bool\nh : ∀ (x : α), x ∈ l✝ → p x = true → q x = true\na : α\nl : List α\nihl : (∀ (x : α), x ∈ l → p x = true → q x = true) → countp p l ≤ countp q l\nha : p a = true → q a = true\nhl : ∀ (x : α), x ∈ l → p x = true → q x = true\nh✝¹ : p a = true\nh✝ : ¬q a = true\n⊢ False\n[PROOFSTEP]\nexact absurd (ha ‹_›) ‹_›\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n⊢ count a (b :: l) = count a l + if a = b then 1 else 0\n[PROOFSTEP]\nconv =>\n simp [count, countp_cons]\n lhs\n simp only [eq_comm]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n| count a (b :: l) = count a l + if a = b then 1 else 0\n[PROOFSTEP]\n simp [count, countp_cons]\n lhs\n simp only [eq_comm]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n| count a (b :: l) = count a l + if a = b then 1 else 0\n[PROOFSTEP]\n simp [count, countp_cons]\n lhs\n simp only [eq_comm]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n| count a (b :: l) = count a l + if a = b then 1 else 0\n[PROOFSTEP]\nsimp [count, countp_cons]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n| (if b = a then 1 else 0) = if a = b then 1 else 0\n[PROOFSTEP]\nlhs\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n| if b = a then 1 else 0\n[PROOFSTEP]\nsimp only [eq_comm]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n⊢ count a (b :: l) = if a = b then succ (count a l) else count a l\n[PROOFSTEP]\nsimp [count_cons']\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n⊢ (count a l + if a = b then 1 else 0) = if a = b then succ (count a l) else count a l\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh✝ : a = b\n⊢ count a l + 1 = succ (count a l)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh✝ : ¬a = b\n⊢ count a l + 0 = count a l\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ count a (a :: l) = count a l + 1\n[PROOFSTEP]\nsimp [count_cons']\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nh : a ≠ b\nl : List α\n⊢ count a (b :: l) = count a l\n[PROOFSTEP]\nsimp [count_cons']\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nh : a ≠ b\nl : List α\n⊢ a = b → False\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\n⊢ count a (List.tail (head :: tail)) =\n count a (head :: tail) - if a = get (head :: tail) { val := 0, isLt := h } then 1 else 0\n[PROOFSTEP]\nrw [count_cons']\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\n⊢ count a (List.tail (head :: tail)) =\n (count a tail + if a = head then 1 else 0) - if a = get (head :: tail) { val := 0, isLt := h } then 1 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\nh✝¹ : a = head\nh✝ : a = get (head :: tail) { val := 0, isLt := h }\n⊢ count a (List.tail (head :: tail)) = count a tail + 1 - 1\n[PROOFSTEP]\nsimp at *\n[GOAL]\ncase neg\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\nh✝¹ : a = head\nh✝ : ¬a = get (head :: tail) { val := 0, isLt := h }\n⊢ count a (List.tail (head :: tail)) = count a tail + 1 - 0\n[PROOFSTEP]\nsimp at *\n[GOAL]\ncase pos\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\nh✝¹ : ¬a = head\nh✝ : a = get (head :: tail) { val := 0, isLt := h }\n⊢ count a (List.tail (head :: tail)) = count a tail + 0 - 1\n[PROOFSTEP]\nsimp at *\n[GOAL]\ncase neg\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\nh✝¹ : ¬a = head\nh✝ : ¬a = get (head :: tail) { val := 0, isLt := h }\n⊢ count a (List.tail (head :: tail)) = count a tail + 0 - 0\n[PROOFSTEP]\nsimp at *\n[GOAL]\ncase neg\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\nh✝¹ : a = head\nh✝ : ¬a = head\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nhead : α\ntail : List α\na : α\nh : 0 < length (head :: tail)\nh✝¹ : ¬a = head\nh✝ : a = head\n⊢ count a tail = count a tail - 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na : α\n⊢ count a [a] = 1\n[PROOFSTEP]\nrw [count_cons]\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na : α\n⊢ (if a = a then succ (count a []) else count a []) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na b : α\n⊢ count a [b] = if a = b then 1 else 0\n[PROOFSTEP]\nrw [count_cons]\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na b : α\n⊢ (if a = b then succ (count a []) else count a []) = if a = b then 1 else 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ count a (concat l a) = succ (count a l)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ 0 < count a l ↔ a ∈ l\n[PROOFSTEP]\nsimp only [count, countp_pos, beq_iff_eq, exists_eq_right]\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na : α\n⊢ count a l = length l ↔ ∀ (b : α), b ∈ l → a = b\n[PROOFSTEP]\nsimp_rw [count, countp_eq_length, beq_iff_eq, eq_comm]\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na b : α\nn : ℕ\n⊢ count a (replicate n b) = if a = b then n else 0\n[PROOFSTEP]\nsplit\n[GOAL]\ncase inl\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na b : α\nn : ℕ\nh✝ : a = b\n⊢ count a (replicate n b) = n\ncase inr α : Type u_1 l : List α inst✝ : DecidableEq α a b : α n : ℕ h✝ : ¬a = b ⊢ count a (replicate n b) = 0\n[PROOFSTEP]\nexacts [‹a = b› ▸ count_replicate_self _ _, count_eq_zero.2 <| mt eq_of_mem_replicate ‹a ≠ b›]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\na : α\n⊢ filter (fun x => x == a) l = replicate (count a l) a\n[PROOFSTEP]\nsimp only [count, countp_eq_length_filter, eq_replicate, mem_filter, beq_iff_eq]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\na : α\n⊢ True ∧ ∀ (b : α), b ∈ l ∧ b = a → b = a\n[PROOFSTEP]\nexact ⟨trivial, fun _ h => h.2⟩\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\na : α\n⊢ filter (fun x => decide (a = x)) l = replicate (count a l) a\n[PROOFSTEP]\nsimpa only [eq_comm] using filter_eq' l a\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\nn : ℕ\na : α\nh : replicate n a <+ l\n⊢ n ≤ count a l\n[PROOFSTEP]\nsimpa only [count_replicate_self] using h.count_le a\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\np : α → Bool\na : α\nh : p a = true\n⊢ count a (filter p l) = count a l\n[PROOFSTEP]\nrw [count, countp_filter]\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\np : α → Bool\na : α\nh : p a = true\n⊢ countp (fun a_1 => decide ((a_1 == a) = true ∧ p a_1 = true)) l = countp (fun x => x == a) l\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_p\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\np : α → Bool\na : α\nh : p a = true\n⊢ (fun a_1 => decide ((a_1 == a) = true ∧ p a_1 = true)) = fun x => x == a\n[PROOFSTEP]\nfunext b\n[GOAL]\ncase e_p.h\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\np : α → Bool\na : α\nh : p a = true\nb : α\n⊢ decide ((b == a) = true ∧ p b = true) = (b == a)\n[PROOFSTEP]\nrw [Bool.beq_eq_decide_eq]\n[GOAL]\ncase e_p.h\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\np : α → Bool\na : α\nh : p a = true\nb : α\n⊢ decide (decide (b = a) = true ∧ p b = true) = decide (b = a)\n[PROOFSTEP]\nby_cases hb : b = a\n[GOAL]\ncase pos\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\np : α → Bool\na : α\nh : p a = true\nb : α\nhb : b = a\n⊢ decide (decide (b = a) = true ∧ p b = true) = decide (b = a)\n[PROOFSTEP]\nsimp [hb, h]\n[GOAL]\ncase neg\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\np : α → Bool\na : α\nh : p a = true\nb : α\nhb : ¬b = a\n⊢ decide (decide (b = a) = true ∧ p b = true) = decide (b = a)\n[PROOFSTEP]\nsimp [hb]\n[GOAL]\nα✝ : Type ?u.43925\nl✝ : List α✝\ninst✝¹ : DecidableEq α✝\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq β\nl : List α\nf : α → List β\nx : β\n⊢ count x (List.bind l f) = sum (map (count x ∘ f) l)\n[PROOFSTEP]\nrw [List.bind, count_join, map_map]\n[GOAL]\nα✝ : Type ?u.44336\nl✝ : List α✝\ninst✝² : DecidableEq α✝\nα : Type u_1\nβ : Type u_2\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nl : List α\nf : α → β\nhf : Function.Injective f\nx : α\n⊢ count (f x) (map f l) = count x l\n[PROOFSTEP]\nsimp only [count, countp_map, (· ∘ ·), hf.beq_eq]\n[GOAL]\nα : Type u_2\nl✝ : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : DecidableEq β\nl : List α\nf : α → β\nx : α\n⊢ count x l ≤ count (f x) (map f l)\n[PROOFSTEP]\nrw [count, count, countp_map]\n[GOAL]\nα : Type u_2\nl✝ : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : DecidableEq β\nl : List α\nf : α → β\nx : α\n⊢ countp (fun x_1 => x_1 == x) l ≤ countp ((fun x_1 => x_1 == f x) ∘ f) l\n[PROOFSTEP]\nexact countp_mono_left <| by simp (config := { contextual := true })\n[GOAL]\nα : Type u_2\nl✝ : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : DecidableEq β\nl : List α\nf : α → β\nx : α\n⊢ ∀ (x_1 : α), x_1 ∈ l → (x_1 == x) = true → ((fun x_2 => x_2 == f x) ∘ f) x_1 = true\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nl : List α\ninst✝ : DecidableEq α\na b : α\n⊢ count a (List.erase [] b) = count a [] - if a = b then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\n⊢ count a (List.erase (c :: l) b) = count a (c :: l) - if a = b then 1 else 0\n[PROOFSTEP]\nrw [erase_cons]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\n⊢ count a (if c = b then l else c :: List.erase l b) = count a (c :: l) - if a = b then 1 else 0\n[PROOFSTEP]\nby_cases hc : c = b\n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\nhc : c = b\n⊢ count a (if c = b then l else c :: List.erase l b) = count a (c :: l) - if a = b then 1 else 0\n[PROOFSTEP]\nrw [if_pos hc, hc, count_cons', Nat.add_sub_cancel]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\nhc : ¬c = b\n⊢ count a (if c = b then l else c :: List.erase l b) = count a (c :: l) - if a = b then 1 else 0\n[PROOFSTEP]\nrw [if_neg hc, count_cons', count_cons', count_erase a b l]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\nhc : ¬c = b\n⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =\n (count a l + if a = c then 1 else 0) - if a = b then 1 else 0\n[PROOFSTEP]\nby_cases ha : a = b\n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\nhc : ¬c = b\nha : a = b\n⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =\n (count a l + if a = c then 1 else 0) - if a = b then 1 else 0\n[PROOFSTEP]\nrw [← ha, eq_comm] at hc \n[GOAL]\ncase pos\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\nhc : ¬a = c\nha : a = b\n⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =\n (count a l + if a = c then 1 else 0) - if a = b then 1 else 0\n[PROOFSTEP]\nrw [if_pos ha, if_neg hc, add_zero, add_zero]\n[GOAL]\ncase neg\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b c : α\nl : List α\nhc : ¬c = b\nha : ¬a = b\n⊢ ((count a l - if a = b then 1 else 0) + if a = c then 1 else 0) =\n (count a l + if a = c then 1 else 0) - if a = b then 1 else 0\n[PROOFSTEP]\nrw [if_neg ha, tsub_zero, tsub_zero]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ count a (List.erase l a) = count a l - 1\n[PROOFSTEP]\nrw [count_erase, if_pos rfl]\n[GOAL]\nα : Type u_1\nl✝ : List α\ninst✝ : DecidableEq α\na b : α\nab : a ≠ b\nl : List α\n⊢ count a (List.erase l b) = count a l\n[PROOFSTEP]\nrw [count_erase, if_neg ab, tsub_zero]\n[GOAL]\nα : Type u_2\nl : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : Monoid β\na : α\nf : α → β\nhf : ∀ (a' : α), a' ≠ a → a' ∈ l → f a' = 1\n⊢ prod (map f l) = f a ^ count a l\n[PROOFSTEP]\ninduction' l with a' as h generalizing a\n[GOAL]\ncase nil\nα : Type u_2\nl : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : Monoid β\na✝ : α\nf : α → β\nhf✝ : ∀ (a' : α), a' ≠ a✝ → a' ∈ l → f a' = 1\na : α\nhf : ∀ (a' : α), a' ≠ a → a' ∈ [] → f a' = 1\n⊢ prod (map f []) = f a ^ count a []\n[PROOFSTEP]\nrw [map_nil, prod_nil, count_nil, _root_.pow_zero]\n[GOAL]\ncase cons\nα : Type u_2\nl : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : Monoid β\na✝ : α\nf : α → β\nhf✝ : ∀ (a' : α), a' ≠ a✝ → a' ∈ l → f a' = 1\na' : α\nas : List α\nh : ∀ (a : α), (∀ (a' : α), a' ≠ a → a' ∈ as → f a' = 1) → prod (map f as) = f a ^ count a as\na : α\nhf : ∀ (a'_1 : α), a'_1 ≠ a → a'_1 ∈ a' :: as → f a'_1 = 1\n⊢ prod (map f (a' :: as)) = f a ^ count a (a' :: as)\n[PROOFSTEP]\nspecialize h a fun a' ha' hfa' => hf a' ha' (mem_cons_of_mem _ hfa')\n[GOAL]\ncase cons\nα : Type u_2\nl : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : Monoid β\na✝ : α\nf : α → β\nhf✝ : ∀ (a' : α), a' ≠ a✝ → a' ∈ l → f a' = 1\na' : α\nas : List α\na : α\nhf : ∀ (a'_1 : α), a'_1 ≠ a → a'_1 ∈ a' :: as → f a'_1 = 1\nh : prod (map f as) = f a ^ count a as\n⊢ prod (map f (a' :: as)) = f a ^ count a (a' :: as)\n[PROOFSTEP]\nrw [List.map_cons, List.prod_cons, count_cons, h]\n[GOAL]\ncase cons\nα : Type u_2\nl : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : Monoid β\na✝ : α\nf : α → β\nhf✝ : ∀ (a' : α), a' ≠ a✝ → a' ∈ l → f a' = 1\na' : α\nas : List α\na : α\nhf : ∀ (a'_1 : α), a'_1 ≠ a → a'_1 ∈ a' :: as → f a'_1 = 1\nh : prod (map f as) = f a ^ count a as\n⊢ f a' * f a ^ count a as = f a ^ if a = a' then succ (count a as) else count a as\n[PROOFSTEP]\nsplit_ifs with ha'\n[GOAL]\ncase pos\nα : Type u_2\nl : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : Monoid β\na✝ : α\nf : α → β\nhf✝ : ∀ (a' : α), a' ≠ a✝ → a' ∈ l → f a' = 1\na' : α\nas : List α\na : α\nhf : ∀ (a'_1 : α), a'_1 ≠ a → a'_1 ∈ a' :: as → f a'_1 = 1\nh : prod (map f as) = f a ^ count a as\nha' : a = a'\n⊢ f a' * f a ^ count a as = f a ^ succ (count a as)\n[PROOFSTEP]\nrw [ha', _root_.pow_succ]\n[GOAL]\ncase neg\nα : Type u_2\nl : List α\ninst✝¹ : DecidableEq α\nβ : Type u_1\ninst✝ : Monoid β\na✝ : α\nf : α → β\nhf✝ : ∀ (a' : α), a' ≠ a✝ → a' ∈ l → f a' = 1\na' : α\nas : List α\na : α\nhf : ∀ (a'_1 : α), a'_1 ≠ a → a'_1 ∈ a' :: as → f a'_1 = 1\nh : prod (map f as) = f a ^ count a as\nha' : ¬a = a'\n⊢ f a' * f a ^ count a as = f a ^ count a as\n[PROOFSTEP]\nrw [hf a' (Ne.symm ha') (List.mem_cons_self a' as), one_mul]\n[GOAL]\nα : Type u_1\nl : List α\ninst✝¹ : DecidableEq α\ninst✝ : Monoid α\na : α\nh : ∀ (a' : α), a' ≠ a → a' ∈ l → a' = 1\n⊢ prod l = prod (map id l)\n[PROOFSTEP]\nrw [map_id]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Count", "llama_tokens": 14044, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835493924953, "lm_q2_score": 0.7248702821204019, "lm_q1q2_score": 0.6056171961550928}} {"text": "[GOAL]\nn : ℕ\n⊢ pair (unpair n).fst (unpair n).snd = n\n[PROOFSTEP]\ndsimp only [unpair]\n[GOAL]\nn : ℕ\n⊢ pair\n (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)\n else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst\n (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)\n else (sqrt n, n - sqrt n * sqrt n - sqrt n)).snd =\n n\n[PROOFSTEP]\nlet s := sqrt n\n[GOAL]\nn : ℕ\ns : ℕ := sqrt n\n⊢ pair\n (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)\n else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst\n (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)\n else (sqrt n, n - sqrt n * sqrt n - sqrt n)).snd =\n n\n[PROOFSTEP]\nhave sm : s * s + (n - s * s) = n := add_tsub_cancel_of_le (sqrt_le _)\n[GOAL]\nn : ℕ\ns : ℕ := sqrt n\nsm : s * s + (n - s * s) = n\n⊢ pair\n (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)\n else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst\n (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)\n else (sqrt n, n - sqrt n * sqrt n - sqrt n)).snd =\n n\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nn : ℕ\ns : ℕ := sqrt n\nsm : s * s + (n - s * s) = n\nh : n - sqrt n * sqrt n < sqrt n\n⊢ pair (n - sqrt n * sqrt n, sqrt n).fst (n - sqrt n * sqrt n, sqrt n).snd = n\n[PROOFSTEP]\nsimp [pair, h, sm]\n[GOAL]\ncase neg\nn : ℕ\ns : ℕ := sqrt n\nsm : s * s + (n - s * s) = n\nh : ¬n - sqrt n * sqrt n < sqrt n\n⊢ pair (sqrt n, n - sqrt n * sqrt n - sqrt n).fst (sqrt n, n - sqrt n * sqrt n - sqrt n).snd = n\n[PROOFSTEP]\nhave hl : n - s * s - s ≤ s := tsub_le_iff_left.mpr (tsub_le_iff_left.mpr <| by rw [← add_assoc]; apply sqrt_le_add)\n[GOAL]\nn : ℕ\ns : ℕ := sqrt n\nsm : s * s + (n - s * s) = n\nh : ¬n - sqrt n * sqrt n < sqrt n\n⊢ n ≤ s * s + (s + s)\n[PROOFSTEP]\nrw [← add_assoc]\n[GOAL]\nn : ℕ\ns : ℕ := sqrt n\nsm : s * s + (n - s * s) = n\nh : ¬n - sqrt n * sqrt n < sqrt n\n⊢ n ≤ s * s + s + s\n[PROOFSTEP]\napply sqrt_le_add\n[GOAL]\ncase neg\nn : ℕ\ns : ℕ := sqrt n\nsm : s * s + (n - s * s) = n\nh : ¬n - sqrt n * sqrt n < sqrt n\nhl : n - s * s - s ≤ s\n⊢ pair (sqrt n, n - sqrt n * sqrt n - sqrt n).fst (sqrt n, n - sqrt n * sqrt n - sqrt n).snd = n\n[PROOFSTEP]\nsimp [pair, hl.not_lt, add_assoc, add_tsub_cancel_of_le (le_of_not_gt h), sm]\n[GOAL]\nn a b : ℕ\nH : unpair n = (a, b)\n⊢ pair a b = n\n[PROOFSTEP]\nsimpa [H] using pair_unpair n\n[GOAL]\na b : ℕ\n⊢ unpair (pair a b) = (a, b)\n[PROOFSTEP]\ndsimp only [pair]\n[GOAL]\na b : ℕ\n⊢ unpair (if a < b then b * b + a else a * a + a + b) = (a, b)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\na b : ℕ\nh : a < b\n⊢ unpair (b * b + a) = (a, b)\n[PROOFSTEP]\nshow unpair (b * b + a) = (a, b)\n[GOAL]\ncase pos\na b : ℕ\nh : a < b\n⊢ unpair (b * b + a) = (a, b)\n[PROOFSTEP]\nhave be : sqrt (b * b + a) = b := sqrt_add_eq _ (le_trans (le_of_lt h) (Nat.le_add_left _ _))\n[GOAL]\ncase pos\na b : ℕ\nh : a < b\nbe : sqrt (b * b + a) = b\n⊢ unpair (b * b + a) = (a, b)\n[PROOFSTEP]\nsimp [unpair, be, add_tsub_cancel_right, h]\n[GOAL]\ncase neg\na b : ℕ\nh : ¬a < b\n⊢ unpair (a * a + a + b) = (a, b)\n[PROOFSTEP]\nshow unpair (a * a + a + b) = (a, b)\n[GOAL]\ncase neg\na b : ℕ\nh : ¬a < b\n⊢ unpair (a * a + a + b) = (a, b)\n[PROOFSTEP]\nhave ae : sqrt (a * a + (a + b)) = a := by\n rw [sqrt_add_eq]\n exact add_le_add_left (le_of_not_gt h) _\n[GOAL]\na b : ℕ\nh : ¬a < b\n⊢ sqrt (a * a + (a + b)) = a\n[PROOFSTEP]\nrw [sqrt_add_eq]\n[GOAL]\ncase h\na b : ℕ\nh : ¬a < b\n⊢ a + b ≤ a + a\n[PROOFSTEP]\nexact add_le_add_left (le_of_not_gt h) _\n[GOAL]\ncase neg\na b : ℕ\nh : ¬a < b\nae : sqrt (a * a + (a + b)) = a\n⊢ unpair (a * a + a + b) = (a, b)\n[PROOFSTEP]\nsimp [unpair, ae, Nat.not_lt_zero, add_assoc]\n[GOAL]\nn : ℕ\nn1 : 1 ≤ n\n⊢ (unpair n).fst < n\n[PROOFSTEP]\nlet s := sqrt n\n[GOAL]\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\n⊢ (unpair n).fst < n\n[PROOFSTEP]\nsimp [unpair]\n[GOAL]\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\n⊢ (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n) else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst <\n n\n[PROOFSTEP]\nby_cases h : n - s * s < s\n[GOAL]\ncase pos\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\nh : n - s * s < s\n⊢ (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n) else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst <\n n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\nh : ¬n - s * s < s\n⊢ (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n) else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst <\n n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\nh : n - s * s < s\n⊢ n - sqrt n * sqrt n < n\n[PROOFSTEP]\nexact lt_of_lt_of_le h (sqrt_le_self _)\n[GOAL]\ncase neg\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\nh : ¬n - s * s < s\n⊢ sqrt n < n\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\nh : sqrt n ≤ n - sqrt n * sqrt n\n⊢ sqrt n < n\n[PROOFSTEP]\nhave s0 : 0 < s := sqrt_pos.2 n1\n[GOAL]\ncase neg\nn : ℕ\nn1 : 1 ≤ n\ns : ℕ := sqrt n\nh : sqrt n ≤ n - sqrt n * sqrt n\ns0 : 0 < s\n⊢ sqrt n < n\n[PROOFSTEP]\nexact lt_of_le_of_lt h (tsub_lt_self n1 (mul_pos s0 s0))\n[GOAL]\n⊢ unpair 0 = 0\n[PROOFSTEP]\nrw [unpair]\n[GOAL]\n⊢ (let s := sqrt 0;\n if 0 - s * s < s then (0 - s * s, s) else (s, 0 - s * s - s)) =\n 0\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ (unpair 0).fst ≤ 0\n[PROOFSTEP]\nsimp\n[GOAL]\na b : ℕ\n⊢ a ≤ pair a b\n[PROOFSTEP]\nsimpa using unpair_left_le (pair a b)\n[GOAL]\na b : ℕ\n⊢ b ≤ pair a b\n[PROOFSTEP]\nby_cases h : a < b\n[GOAL]\ncase pos\na b : ℕ\nh : a < b\n⊢ b ≤ pair a b\n[PROOFSTEP]\nsimp [pair, h]\n[GOAL]\ncase neg\na b : ℕ\nh : ¬a < b\n⊢ b ≤ pair a b\n[PROOFSTEP]\nsimp [pair, h]\n[GOAL]\ncase pos\na b : ℕ\nh : a < b\n⊢ b ≤ b * b + a\n[PROOFSTEP]\nexact le_trans (le_mul_self _) (Nat.le_add_right _ _)\n[GOAL]\nn : ℕ\n⊢ (unpair n).snd ≤ n\n[PROOFSTEP]\nsimpa using right_le_pair n.unpair.1 n.unpair.2\n[GOAL]\na₁ a₂ b : ℕ\nh : a₁ < a₂\n⊢ pair a₁ b < pair a₂ b\n[PROOFSTEP]\nby_cases h₁ : a₁ < b\n[GOAL]\ncase pos\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\n⊢ pair a₁ b < pair a₂ b\n[PROOFSTEP]\nsimp [pair, h₁, add_assoc]\n[GOAL]\ncase neg\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : ¬a₁ < b\n⊢ pair a₁ b < pair a₂ b\n[PROOFSTEP]\nsimp [pair, h₁, add_assoc]\n[GOAL]\ncase pos\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\n⊢ b * b + a₁ < if a₂ < b then b * b + a₂ else a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\nby_cases h₂ : a₂ < b\n[GOAL]\ncase pos\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\nh₂ : a₂ < b\n⊢ b * b + a₁ < if a₂ < b then b * b + a₂ else a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\nsimp [pair, h₂, h]\n[GOAL]\ncase neg\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\nh₂ : ¬a₂ < b\n⊢ b * b + a₁ < if a₂ < b then b * b + a₂ else a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\nsimp [pair, h₂, h]\n[GOAL]\ncase neg\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\nh₂ : ¬a₂ < b\n⊢ b * b + a₁ < a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\nsimp at h₂ \n[GOAL]\ncase neg\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\nh₂ : b ≤ a₂\n⊢ b * b + a₁ < a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\napply add_lt_add_of_le_of_lt\n[GOAL]\ncase neg.h₁\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\nh₂ : b ≤ a₂\n⊢ b * b ≤ a₂ * a₂\ncase neg.h₂ a₁ a₂ b : ℕ h : a₁ < a₂ h₁ : a₁ < b h₂ : b ≤ a₂ ⊢ a₁ < a₂ + b\n[PROOFSTEP]\nexact mul_self_le_mul_self h₂\n[GOAL]\ncase neg.h₂\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : a₁ < b\nh₂ : b ≤ a₂\n⊢ a₁ < a₂ + b\n[PROOFSTEP]\nexact Nat.lt_add_right _ _ _ h\n[GOAL]\ncase neg\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : ¬a₁ < b\n⊢ a₁ * a₁ + (a₁ + b) < if a₂ < b then b * b + a₂ else a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\nsimp at h₁ \n[GOAL]\ncase neg\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : b ≤ a₁\n⊢ a₁ * a₁ + (a₁ + b) < if a₂ < b then b * b + a₂ else a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\nsimp [not_lt_of_gt (lt_of_le_of_lt h₁ h)]\n[GOAL]\ncase neg\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : b ≤ a₁\n⊢ a₁ * a₁ + (a₁ + b) < a₂ * a₂ + (a₂ + b)\n[PROOFSTEP]\napply add_lt_add\n[GOAL]\ncase neg.h₁\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : b ≤ a₁\n⊢ a₁ * a₁ < a₂ * a₂\ncase neg.h₂ a₁ a₂ b : ℕ h : a₁ < a₂ h₁ : b ≤ a₁ ⊢ a₁ + b < a₂ + b\n[PROOFSTEP]\nexact mul_self_lt_mul_self h\n[GOAL]\ncase neg.h₂\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : b ≤ a₁\n⊢ a₁ + b < a₂ + b\n[PROOFSTEP]\napply add_lt_add_right\n[GOAL]\ncase neg.h₂.bc\na₁ a₂ b : ℕ\nh : a₁ < a₂\nh₁ : b ≤ a₁\n⊢ a₁ < a₂\n[PROOFSTEP]\nassumption\n[GOAL]\na b₁ b₂ : ℕ\nh : b₁ < b₂\n⊢ pair a b₁ < pair a b₂\n[PROOFSTEP]\nby_cases h₁ : a < b₁\n[GOAL]\ncase pos\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : a < b₁\n⊢ pair a b₁ < pair a b₂\n[PROOFSTEP]\nsimp [pair, h₁, add_assoc]\n[GOAL]\ncase neg\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : ¬a < b₁\n⊢ pair a b₁ < pair a b₂\n[PROOFSTEP]\nsimp [pair, h₁, add_assoc]\n[GOAL]\ncase pos\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : a < b₁\n⊢ b₁ * b₁ + a < if a < b₂ then b₂ * b₂ + a else a * a + (a + b₂)\n[PROOFSTEP]\nsimp [pair, lt_trans h₁ h, h]\n[GOAL]\ncase pos\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : a < b₁\n⊢ b₁ * b₁ < b₂ * b₂\n[PROOFSTEP]\nexact mul_self_lt_mul_self h\n[GOAL]\ncase neg\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : ¬a < b₁\n⊢ a * a + (a + b₁) < if a < b₂ then b₂ * b₂ + a else a * a + (a + b₂)\n[PROOFSTEP]\nby_cases h₂ : a < b₂\n[GOAL]\ncase pos\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : ¬a < b₁\nh₂ : a < b₂\n⊢ a * a + (a + b₁) < if a < b₂ then b₂ * b₂ + a else a * a + (a + b₂)\n[PROOFSTEP]\nsimp [pair, h₂, h]\n[GOAL]\ncase neg\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : ¬a < b₁\nh₂ : ¬a < b₂\n⊢ a * a + (a + b₁) < if a < b₂ then b₂ * b₂ + a else a * a + (a + b₂)\n[PROOFSTEP]\nsimp [pair, h₂, h]\n[GOAL]\ncase pos\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₁ : ¬a < b₁\nh₂ : a < b₂\n⊢ a * a + (a + b₁) < b₂ * b₂ + a\n[PROOFSTEP]\nsimp at h₁ \n[GOAL]\ncase pos\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₂ : a < b₂\nh₁ : b₁ ≤ a\n⊢ a * a + (a + b₁) < b₂ * b₂ + a\n[PROOFSTEP]\nrw [add_comm, add_comm _ a, add_assoc, add_lt_add_iff_left]\n[GOAL]\ncase pos\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₂ : a < b₂\nh₁ : b₁ ≤ a\n⊢ b₁ + a * a < b₂ * b₂\n[PROOFSTEP]\nrwa [add_comm, ← sqrt_lt, sqrt_add_eq]\n[GOAL]\ncase pos.h\na b₁ b₂ : ℕ\nh : b₁ < b₂\nh₂ : a < b₂\nh₁ : b₁ ≤ a\n⊢ b₁ ≤ a + a\n[PROOFSTEP]\nexact le_trans h₁ (Nat.le_add_left _ _)\n[GOAL]\nm n : ℕ\n⊢ pair m n < (max m n + 1) ^ 2\n[PROOFSTEP]\nrw [pair, add_sq, mul_one, two_mul, sq, add_assoc, add_assoc]\n[GOAL]\nm n : ℕ\n⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)\n[PROOFSTEP]\ncases' (lt_or_le m n) with h h\n[GOAL]\ncase inl\nm n : ℕ\nh : m < n\n⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)\n[PROOFSTEP]\nrw [if_pos h, max_eq_right h.le, add_lt_add_iff_left, add_assoc]\n[GOAL]\ncase inl\nm n : ℕ\nh : m < n\n⊢ m < n + (n + 1 ^ 2)\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)\n[PROOFSTEP]\nexact h.trans_le (self_le_add_right n _)\n[GOAL]\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)\n[PROOFSTEP]\nrw [if_neg h.not_lt, max_eq_left h, add_lt_add_iff_left, add_assoc, add_lt_add_iff_left]\n[GOAL]\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ n < m + 1 ^ 2\n[PROOFSTEP]\nexact lt_succ_of_le h\n[GOAL]\nm n : ℕ\n⊢ max m n ^ 2 + min m n ≤ pair m n\n[PROOFSTEP]\nrw [pair]\n[GOAL]\nm n : ℕ\n⊢ max m n ^ 2 + min m n ≤ if m < n then n * n + m else m * m + m + n\n[PROOFSTEP]\ncases' lt_or_le m n with h h\n[GOAL]\ncase inl\nm n : ℕ\nh : m < n\n⊢ max m n ^ 2 + min m n ≤ if m < n then n * n + m else m * m + m + n\ncase inr m n : ℕ h : n ≤ m ⊢ max m n ^ 2 + min m n ≤ if m < n then n * n + m else m * m + m + n\n[PROOFSTEP]\nrw [if_pos h, max_eq_right h.le, min_eq_left h.le, sq]\n[GOAL]\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ max m n ^ 2 + min m n ≤ if m < n then n * n + m else m * m + m + n\n[PROOFSTEP]\nrw [if_neg h.not_lt, max_eq_left h, min_eq_right h, sq, add_assoc, add_le_add_iff_left]\n[GOAL]\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ n ≤ m + n\n[PROOFSTEP]\nexact le_add_self\n[GOAL]\nm n : ℕ\n⊢ m + n ≤ max m n ^ 2 + min m n\n[PROOFSTEP]\nrw [sq, ← min_add_max, add_comm, add_le_add_iff_right]\n[GOAL]\nm n : ℕ\n⊢ max m n ≤ max m n * max m n\n[PROOFSTEP]\nexact le_mul_self _\n[GOAL]\nα : Type u_1\ninst✝ : CompleteLattice α\nf : ℕ → ℕ → α\n⊢ ⨆ (n : ℕ), f (unpair n).fst (unpair n).snd = ⨆ (i : ℕ) (j : ℕ), f i j\n[PROOFSTEP]\nrw [← (iSup_prod : ⨆ i : ℕ × ℕ, f i.1 i.2 = _), ← Nat.surjective_unpair.iSup_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : ℕ → Set α\nt : ℕ → Set β\n⊢ ⋃ (n : ℕ), s (unpair n).fst ×ˢ t (unpair n).snd = (⋃ (n : ℕ), s n) ×ˢ ⋃ (n : ℕ), t n\n[PROOFSTEP]\nrw [← Set.iUnion_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : ℕ → Set α\nt : ℕ → Set β\n⊢ ⋃ (n : ℕ), s (unpair n).fst ×ˢ t (unpair n).snd = ⋃ (x : ℕ × ℕ), s x.fst ×ˢ t x.snd\n[PROOFSTEP]\nexact surjective_unpair.iUnion_comp (fun x => s x.fst ×ˢ t x.snd)\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Pairing", "llama_tokens": 6753, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711756575749, "lm_q2_score": 0.7122321842389469, "lm_q1q2_score": 0.6053768269787401}} {"text": "[GOAL]\nF : Sort u_1\nα : Sort u_2\nβ : α → Sort u_3\ni : FunLike F α β\nf g : F\nh : f = g\n⊢ ↑f = ↑g\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nF : Sort u_1\nα : Sort u_2\nβ : α → Sort u_3\ni : FunLike F α β\nf : F\n⊢ ↑f = ↑f\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.FunLike.Basic", "llama_tokens": 131, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8459424295406088, "lm_q2_score": 0.7154240079185319, "lm_q1q2_score": 0.6052075234102826}} {"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : SpectralMap α β\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : SpectralMap α β\ntoFun✝ : α → β\nspectral'✝ : IsSpectralMap toFun✝\nh : { toFun := toFun✝, spectral' := spectral'✝ }.toFun = g.toFun\n⊢ { toFun := toFun✝, spectral' := spectral'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ntoFun✝¹ : α → β\nspectral'✝¹ : IsSpectralMap toFun✝¹\ntoFun✝ : α → β\nspectral'✝ : IsSpectralMap toFun✝\nh : { toFun := toFun✝¹, spectral' := spectral'✝¹ }.toFun = { toFun := toFun✝, spectral' := spectral'✝ }.toFun\n⊢ { toFun := toFun✝¹, spectral' := spectral'✝¹ } = { toFun := toFun✝, spectral' := spectral'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : SpectralMap β γ\ng : SpectralMap α β\n⊢ ↑f ∘ ↑g = ↑↑f ∘ ↑↑g\n[PROOFSTEP]\nrfl\n -- porting note: removed `simp` from this and added lemma above to address `simpNF` lint\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : SpectralMap β γ\ng : SpectralMap α β\n⊢ ↑(comp f g) = ContinuousMap.comp ↑f ↑g\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : SpectralMap β γ\nf₁ f₂ : SpectralMap α β\nhg : Injective ↑g\nh : comp g f₁ = comp g f₂\na : α\n⊢ ↑g (↑f₁ a) = ↑g (↑f₂ a)\n[PROOFSTEP]\nrw [← comp_apply, h, comp_apply]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Spectral.Hom", "llama_tokens": 1041, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240825770432, "lm_q2_score": 0.6992544210587586, "lm_q1q2_score": 0.6050117649485058}} {"text": "[GOAL]\nt : ℝ\n⊢ ‖exp (↑t * I)‖ = 1\n[PROOFSTEP]\nsimp only [norm_eq_abs, abs_exp_ofReal_mul_I]\n[GOAL]\nr₁ r₂ : ℝ\nh₀ : 0 ≤ r₁\nhr : r₁ < r₂\nx : ℝ\nh : r₁ < x ∧ x < r₂\n⊢ r₁ < ‖↑x‖ ∧ ‖↑x‖ < r₂\n[PROOFSTEP]\nrwa [norm_eq_abs, abs_ofReal, abs_of_pos (h₀.trans_lt h.1)]\n[GOAL]\nR : Type u_1\ninst✝¹ : NormedField R\ninst✝ : NormedAlgebra R ℝ\nr : R\nx : ℂ\n⊢ ‖r • x‖ ≤ ‖r‖ * ‖x‖\n[PROOFSTEP]\nrw [← algebraMap_smul ℝ r x, real_smul, norm_mul, norm_eq_abs, abs_ofReal, ← Real.norm_eq_abs, norm_algebraMap']\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz w : ℂ\n⊢ dist z w = Real.sqrt ((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2)\n[PROOFSTEP]\nrw [sq, sq]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz w : ℂ\n⊢ dist z w = Real.sqrt ((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im))\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz w : ℂ\nh : z.re = w.re\n⊢ dist z w = dist z.im w.im\n[PROOFSTEP]\nrw [dist_eq_re_im, h, sub_self, zero_pow two_pos, zero_add, Real.sqrt_sq_eq_abs, Real.dist_eq]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz w : ℂ\nh : z.re = w.re\n⊢ edist z w = edist z.im w.im\n[PROOFSTEP]\nrw [edist_nndist, edist_nndist, nndist_of_re_eq h]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz w : ℂ\nh : z.im = w.im\n⊢ dist z w = dist z.re w.re\n[PROOFSTEP]\nrw [dist_eq_re_im, h, sub_self, zero_pow two_pos, add_zero, Real.sqrt_sq_eq_abs, Real.dist_eq]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz w : ℂ\nh : z.im = w.im\n⊢ edist z w = edist z.re w.re\n[PROOFSTEP]\nrw [edist_nndist, edist_nndist, nndist_of_im_eq h]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\n⊢ dist (↑(starRingEnd ℂ) z) z = 2 * |z.im|\n[PROOFSTEP]\nrw [dist_of_re_eq (conj_re z), conj_im, dist_comm, Real.dist_eq, sub_neg_eq_add, ← two_mul, _root_.abs_mul,\n abs_of_pos (zero_lt_two' ℝ)]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\n⊢ ↑(nndist (↑(starRingEnd ℂ) z) z) = ↑(2 * ↑Real.nnabs z.im)\n[PROOFSTEP]\nrw [← dist_nndist, NNReal.coe_mul, NNReal.coe_two, Real.coe_nnabs, dist_conj_self]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\n⊢ dist z (↑(starRingEnd ℂ) z) = 2 * |z.im|\n[PROOFSTEP]\nrw [dist_comm, dist_conj_self]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\n⊢ nndist z (↑(starRingEnd ℂ) z) = 2 * ↑Real.nnabs z.im\n[PROOFSTEP]\nrw [nndist_comm, nndist_conj_self]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nr : ℚ\n⊢ ‖↑r‖ = |↑r|\n[PROOFSTEP]\nrw [← ofReal_rat_cast]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nr : ℚ\n⊢ ‖↑↑r‖ = |↑r|\n[PROOFSTEP]\nexact norm_real _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nn : ℤ\nhn : 0 ≤ n\n⊢ ‖↑n‖ = ↑n\n[PROOFSTEP]\nrw [norm_int, ← Int.cast_abs, _root_.abs_of_nonneg hn]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\n⊢ Continuous ↑normSq\n[PROOFSTEP]\nsimpa [← normSq_eq_abs] using continuous_abs.pow 2\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nn : ℕ\n⊢ ↑‖↑n‖₊ = ↑↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nζ : ℂ\nn : ℕ\nh : ζ ^ n = 1\nhn : n ≠ 0\n⊢ ‖ζ‖₊ = 1\n[PROOFSTEP]\nrefine' (@pow_left_inj NNReal _ _ _ _ zero_le' zero_le' hn.bot_lt).mp _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nζ : ℂ\nn : ℕ\nh : ζ ^ n = 1\nhn : n ≠ 0\n⊢ ‖ζ‖₊ ^ n = 1 ^ n\n[PROOFSTEP]\nrw [← nnnorm_pow, h, nnnorm_one, one_pow]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\n⊢ ‖↑equivRealProd z‖ ≤ ↑abs z\n[PROOFSTEP]\nsimp [Prod.norm_def, abs_re_le_abs, abs_im_le_abs]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\n⊢ ‖↑equivRealProd z‖ ≤ 1 * ↑abs z\n[PROOFSTEP]\nsimpa using equivRealProd_apply_le z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\n⊢ LipschitzWith 1 ↑equivRealProd\n[PROOFSTEP]\nsimpa using AddMonoidHomClass.lipschitz_of_bound equivRealProdLm 1 equivRealProd_apply_le'\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\n⊢ ‖z‖ ≤ ↑(↑NNReal.sqrt 2) * ‖↑equivRealProdLm z‖\n[PROOFSTEP]\nsimpa only [Real.coe_sqrt, NNReal.coe_ofNat] using abs_le_sqrt_two_mul_max z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\n⊢ Tendsto (↑normSq) (cocompact ℂ) atTop\n[PROOFSTEP]\nsimpa [mul_self_abs] using tendsto_abs_cocompact_atTop.atTop_mul_atTop tendsto_abs_cocompact_atTop\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nx : ℂ\n⊢ ‖↑reLm x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nsimp [abs_re_le_abs]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nx : ℂ\n⊢ ‖↑imLm x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nsimp [abs_im_le_abs]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nx : E\n⊢ restrictScalars ℝ (smulRight 1 x) = smulRight reClm x + I • smulRight imClm x\n[PROOFSTEP]\next ⟨a, b⟩\n[GOAL]\ncase h.mk\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nx : E\na b : ℝ\n⊢ ↑(restrictScalars ℝ (smulRight 1 x)) { re := a, im := b } =\n ↑(smulRight reClm x + I • smulRight imClm x) { re := a, im := b }\n[PROOFSTEP]\nsimp [mk_eq_add_mul_I, mul_smul, smul_comm I b x]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nx : ℂ\n⊢ restrictScalars ℝ (smulRight 1 x) = x • 1\n[PROOFSTEP]\next1 z\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nx z : ℂ\n⊢ ↑(restrictScalars ℝ (smulRight 1 x)) z = ↑(x • 1) z\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nx z : ℂ\n⊢ z * x = x * z\n[PROOFSTEP]\napply mul_comm\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz w : ℂ\n⊢ dist (↑(starRingEnd ℂ) z) w = dist z (↑(starRingEnd ℂ) w)\n[PROOFSTEP]\nrw [← dist_conj_conj, conj_conj]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ →+* ℂ\nhf : Continuous ↑f\n⊢ f = RingHom.id ℂ ∨ f = starRingEnd ℂ\n[PROOFSTEP]\nsimpa only [FunLike.ext_iff] using real_algHom_eq_id_or_conj (AlgHom.mk' f (map_real_smul f hf))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ →+* ℂ\nh : Continuous ↑f\n⊢ f = ofReal\n[PROOFSTEP]\nconvert congr_arg AlgHom.toRingHom <| Subsingleton.elim (AlgHom.mk' f <| map_real_smul f h) (Algebra.ofId ℝ ℂ)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\nhz : 0 ≤ z\n⊢ z = ↑‖z‖\n[PROOFSTEP]\nlift z to ℝ using hz.2.symm\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℝ\nhz : 0 ≤ ↑z\n⊢ ↑z = ↑‖↑z‖\n[PROOFSTEP]\nrw [norm_eq_abs, abs_ofReal, _root_.abs_of_nonneg (id hz.1 : 0 ≤ z)]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → ℝ\nx : ℝ\nh : HasSum (fun x => ↑(f x)) ↑x\n⊢ HasSum f x\n[PROOFSTEP]\nsimpa only [IsROrC.reClm_apply, IsROrC.ofReal_re] using reClm.hasSum h\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → ℝ\nh : Summable fun x => ↑(f x)\n⊢ Summable f\n[PROOFSTEP]\nsimpa only [IsROrC.reClm_apply, IsROrC.ofReal_re] using reClm.summable h\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → ℝ\n⊢ ↑(∑' (a : α), f a) = ∑' (a : α), ↑(f a)\n[PROOFSTEP]\nby_cases h : Summable f\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → ℝ\nh : Summable f\n⊢ ↑(∑' (a : α), f a) = ∑' (a : α), ↑(f a)\n[PROOFSTEP]\nexact ContinuousLinearMap.map_tsum ofRealClm h\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → ℝ\nh : ¬Summable f\n⊢ ↑(∑' (a : α), f a) = ∑' (a : α), ↑(f a)\n[PROOFSTEP]\nrw [tsum_eq_zero_of_not_summable h, tsum_eq_zero_of_not_summable ((summable_ofReal _).not.mpr h), ofReal_zero]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\nc : 𝕜\n⊢ HasSum f c ↔ HasSum (fun x => ↑re (f x)) (↑re c) ∧ HasSum (fun x => ↑im (f x)) (↑im c)\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨hasSum_re _ h, hasSum_im _ h⟩, _⟩\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\nc : 𝕜\n⊢ HasSum (fun x => ↑re (f x)) (↑re c) ∧ HasSum (fun x => ↑im (f x)) (↑im c) → HasSum f c\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase intro\nα : Type u_1\n𝕜 : Type u_2\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\nc : 𝕜\nh₁ : HasSum (fun x => ↑re (f x)) (↑re c)\nh₂ : HasSum (fun x => ↑im (f x)) (↑im c)\n⊢ HasSum f c\n[PROOFSTEP]\nsimpa only [re_add_im] using ((hasSum_ofReal 𝕜).mpr h₁).add (((hasSum_ofReal 𝕜).mpr h₂).mul_right I)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.Basic", "llama_tokens": 4547, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8376199754937772, "lm_q2_score": 0.7217432062975979, "lm_q1q2_score": 0.6045465267717941}} {"text": "[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (wittPolyProd p n) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [wittPolyProd]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ n) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ n)) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply Subset.trans (vars_mul _ _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ n)) ∪ vars (↑(rename (Prod.mk 1)) (wittPolynomial p ℤ n)) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrefine' union_subset _ _\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ n)) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrefine' Subset.trans (vars_rename _ _) _\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ image (Prod.mk 0) (vars (wittPolynomial p ℤ n)) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nsimp [wittPolynomial_vars, image_subset_iff]\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (↑(rename (Prod.mk 1)) (wittPolynomial p ℤ n)) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrefine' Subset.trans (vars_rename _ _) _\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ image (Prod.mk 1) (vars (wittPolynomial p ℤ n)) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nsimp [wittPolynomial_vars, image_subset_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (wittPolyProdRemainder p n) ⊆ univ ×ˢ range n\n[PROOFSTEP]\nrw [wittPolyProdRemainder]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (∑ i in range n, ↑p ^ i * wittMul p i ^ p ^ (n - i)) ⊆ univ ×ˢ range n\n[PROOFSTEP]\nrefine' Subset.trans (vars_sum_subset _ _) _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ (Finset.biUnion (range n) fun i => vars (↑p ^ i * wittMul p i ^ p ^ (n - i))) ⊆ univ ×ˢ range n\n[PROOFSTEP]\nrw [biUnion_subset]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range n → vars (↑p ^ x * wittMul p x ^ p ^ (n - x)) ⊆ univ ×ˢ range n\n[PROOFSTEP]\nintro x hx\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ vars (↑p ^ x * wittMul p x ^ p ^ (n - x)) ⊆ univ ×ˢ range n\n[PROOFSTEP]\napply Subset.trans (vars_mul _ _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ vars (↑p ^ x) ∪ vars (wittMul p x ^ p ^ (n - x)) ⊆ univ ×ˢ range n\n[PROOFSTEP]\nrefine' union_subset _ _\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ vars (↑p ^ x) ⊆ univ ×ˢ range n\n[PROOFSTEP]\napply Subset.trans (vars_pow _ _)\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ vars ↑p ⊆ univ ×ˢ range n\n[PROOFSTEP]\nhave : (p : 𝕄) = C (p : ℤ) := by simp only [Int.cast_ofNat, eq_intCast]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ ↑p = ↑C ↑p\n[PROOFSTEP]\nsimp only [Int.cast_ofNat, eq_intCast]\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\nthis : ↑p = ↑C ↑p\n⊢ vars ↑p ⊆ univ ×ˢ range n\n[PROOFSTEP]\nrw [this, vars_C]\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\nthis : ↑p = ↑C ↑p\n⊢ ∅ ⊆ univ ×ˢ range n\n[PROOFSTEP]\napply empty_subset\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ vars (wittMul p x ^ p ^ (n - x)) ⊆ univ ×ˢ range n\n[PROOFSTEP]\napply Subset.trans (vars_pow _ _)\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ vars (wittMul p x) ⊆ univ ×ˢ range n\n[PROOFSTEP]\napply Subset.trans (wittMul_vars _ _)\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ univ ×ˢ range (x + 1) ⊆ univ ×ˢ range n\n[PROOFSTEP]\napply product_subset_product (Subset.refl _)\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range n\n⊢ range (x + 1) ⊆ range n\n[PROOFSTEP]\nsimp only [mem_range, range_subset] at hx ⊢\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x < n\n⊢ x + 1 ≤ n\n[PROOFSTEP]\nexact hx\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (remainder p n) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [remainder]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars\n ((∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply Subset.trans (vars_mul _ _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ∪\n vars (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrefine' union_subset _ _\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrefine' Subset.trans (vars_sum_subset _ _) _\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ (Finset.biUnion (range (n + 1)) fun i =>\n vars (↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single i (p ^ (n + 1 - i)))) (↑p ^ i)))) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [biUnion_subset]\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∀ (x : ℕ),\n x ∈ range (n + 1) →\n vars (↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ vars (↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [rename_monomial, vars_monomial, Finsupp.mapDomain_single]\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ (Finsupp.single (0, x) (p ^ (n + 1 - x))).support ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply Subset.trans Finsupp.support_single_subset\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ {(0, x)} ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nsimpa using mem_range.mp hx\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ ↑p ^ x ≠ 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase refine'_1.h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.out.ne_zero\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrefine' Subset.trans (vars_sum_subset _ _) _\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ (Finset.biUnion (range (n + 1)) fun i =>\n vars (↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single i (p ^ (n + 1 - i)))) (↑p ^ i)))) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [biUnion_subset]\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∀ (x : ℕ),\n x ∈ range (n + 1) →\n vars (↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ vars (↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [rename_monomial, vars_monomial, Finsupp.mapDomain_single]\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ (Finsupp.single (1, x) (p ^ (n + 1 - x))).support ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply Subset.trans Finsupp.support_single_subset\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ {(1, x)} ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nsimpa using mem_range.mp hx\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ ↑p ^ x ≠ 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase refine'_2.h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn x : ℕ\nhx : x ∈ range (n + 1)\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.out.ne_zero\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∑ i in range (n + 1), ↑p ^ i * wittMul p i ^ p ^ (n - i) = wittPolyProd p n\n[PROOFSTEP]\nsimp only [wittPolyProd]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∑ i in range (n + 1), ↑p ^ i * wittMul p i ^ p ^ (n - i) =\n ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ n) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ n)\n[PROOFSTEP]\nconvert wittStructureInt_prop p (X (0 : Fin 2) * X 1) n using 1\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∑ i in range (n + 1), ↑p ^ i * wittMul p i ^ p ^ (n - i) =\n ↑(bind₁ (wittStructureInt p (X 0 * X 1))) (wittPolynomial p ℤ n)\n[PROOFSTEP]\nsimp only [wittPolynomial, wittMul]\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∑ x in range (n + 1), ↑p ^ x * wittStructureInt p (X 0 * X 1) x ^ p ^ (n - x) =\n ↑(bind₁ (wittStructureInt p (X 0 * X 1)))\n (∑ x in range (n + 1), ↑(monomial (Finsupp.single x (p ^ (n - x)))) (↑p ^ x))\n[PROOFSTEP]\nrw [AlgHom.map_sum]\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ∑ x in range (n + 1), ↑p ^ x * wittStructureInt p (X 0 * X 1) x ^ p ^ (n - x) =\n ∑ x in range (n + 1),\n ↑(bind₁ (wittStructureInt p (X 0 * X 1))) (↑(monomial (Finsupp.single x (p ^ (n - x)))) (↑p ^ x))\n[PROOFSTEP]\ncongr 1 with i\n[GOAL]\ncase h.e'_2.e_f.h.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn i : ℕ\nm✝ : Fin 2 × ℕ →₀ ℕ\n⊢ MvPolynomial.coeff m✝ (↑p ^ i * wittStructureInt p (X 0 * X 1) i ^ p ^ (n - i)) =\n MvPolynomial.coeff m✝\n (↑(bind₁ (wittStructureInt p (X 0 * X 1))) (↑(monomial (Finsupp.single i (p ^ (n - i)))) (↑p ^ i)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_2.e_f.h.a.e_p\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn i : ℕ\nm✝ : Fin 2 × ℕ →₀ ℕ\n⊢ ↑p ^ i * wittStructureInt p (X 0 * X 1) i ^ p ^ (n - i) =\n ↑(bind₁ (wittStructureInt p (X 0 * X 1))) (↑(monomial (Finsupp.single i (p ^ (n - i)))) (↑p ^ i))\n[PROOFSTEP]\nhave hsupp : (Finsupp.single i (p ^ (n - i))).support = { i } :=\n by\n rw [Finsupp.support_eq_singleton]\n simp only [and_true_iff, Finsupp.single_eq_same, eq_self_iff_true, Ne.def]\n exact pow_ne_zero _ hp.out.ne_zero\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn i : ℕ\nm✝ : Fin 2 × ℕ →₀ ℕ\n⊢ (Finsupp.single i (p ^ (n - i))).support = {i}\n[PROOFSTEP]\nrw [Finsupp.support_eq_singleton]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn i : ℕ\nm✝ : Fin 2 × ℕ →₀ ℕ\n⊢ ↑(Finsupp.single i (p ^ (n - i))) i ≠ 0 ∧\n Finsupp.single i (p ^ (n - i)) = Finsupp.single i (↑(Finsupp.single i (p ^ (n - i))) i)\n[PROOFSTEP]\nsimp only [and_true_iff, Finsupp.single_eq_same, eq_self_iff_true, Ne.def]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn i : ℕ\nm✝ : Fin 2 × ℕ →₀ ℕ\n⊢ ¬p ^ (n - i) = 0\n[PROOFSTEP]\nexact pow_ne_zero _ hp.out.ne_zero\n[GOAL]\ncase h.e'_2.e_f.h.a.e_p\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn i : ℕ\nm✝ : Fin 2 × ℕ →₀ ℕ\nhsupp : (Finsupp.single i (p ^ (n - i))).support = {i}\n⊢ ↑p ^ i * wittStructureInt p (X 0 * X 1) i ^ p ^ (n - i) =\n ↑(bind₁ (wittStructureInt p (X 0 * X 1))) (↑(monomial (Finsupp.single i (p ^ (n - i)))) (↑p ^ i))\n[PROOFSTEP]\nsimp only [bind₁_monomial, hsupp, Int.cast_ofNat, prod_singleton, eq_intCast, Finsupp.single_eq_same, C_pow,\n mul_eq_mul_left_iff, true_or_iff, eq_self_iff_true, Int.cast_pow]\n[GOAL]\ncase h.e'_3\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ n) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ n) =\n ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (wittPolynomial p ℤ n)) (X 0 * X 1)\n[PROOFSTEP]\nsimp only [map_mul, bind₁_X_right]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ n * wittMul p n + wittPolyProdRemainder p n = wittPolyProd p n\n[PROOFSTEP]\nconvert mul_polyOfInterest_aux1 p n\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ n * wittMul p n + wittPolyProdRemainder p n = ∑ i in range (n + 1), ↑p ^ i * wittMul p i ^ p ^ (n - i)\n[PROOFSTEP]\nrw [sum_range_succ, add_comm, Nat.sub_self, pow_zero, pow_one]\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ wittPolyProdRemainder p n + ↑p ^ n * wittMul p n =\n ∑ x in range n, ↑p ^ x * wittMul p x ^ p ^ (n - x) + ↑p ^ n * wittMul p n\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ wittPolyProd p (n + 1) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)) +\n remainder p n\n[PROOFSTEP]\nhave mvpz : (p : 𝕄) ^ (n + 1) = MvPolynomial.C ((p : ℤ) ^ (n + 1)) := by simp only;\n norm_cast\n -- Porting note: the original proof applies `sum_range_succ` through a non-`conv` rewrite,\n -- but this does not work in Lean 4; the whole proof also times out very badly. The proof has been\n -- nearly totally rewritten here and now finishes quite fast.\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n[PROOFSTEP]\nsimp only\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n[PROOFSTEP]\nnorm_cast\n -- Porting note: the original proof applies `sum_range_succ` through a non-`conv` rewrite,\n -- but this does not work in Lean 4; the whole proof also times out very badly. The proof has been\n -- nearly totally rewritten here and now finishes quite fast.\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ wittPolyProd p (n + 1) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)) +\n remainder p n\n[PROOFSTEP]\nrw [wittPolyProd, wittPolynomial, AlgHom.map_sum, AlgHom.map_sum]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1 + 1),\n ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\nconv_lhs =>\n arg 1\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| (∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\n arg 1\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| (∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\n arg 1\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| (∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\narg 1\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\nrw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1 + 1),\n ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\nconv_lhs =>\n arg 2\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\n arg 2\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\n arg 2\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\narg 2\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\nrw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1 + 1),\n ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\nconv_rhs =>\n enter [1, 1, 2, 2]\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\n enter [1, 1, 2, 2]\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\n enter [1, 1, 2, 2]\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\nenter [1, 1, 2, 2]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\nrw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\nconv_rhs =>\n enter [1, 2, 2]\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\n enter [1, 2, 2]\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\n enter [1, 2, 2]\n rw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n remainder p n\n[PROOFSTEP]\nenter [1, 2, 2]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n| ∑ x in range (n + 1 + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))\n[PROOFSTEP]\nrw [sum_range_succ, ← C_mul_X_pow_eq_monomial, tsub_self, pow_zero, pow_one, map_mul, rename_C, rename_X, ← mvpz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) *\n (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1)) +\n remainder p n\n[PROOFSTEP]\nsimp only [add_mul, mul_add]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ((∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1))) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n (↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1))) +\n (↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) * (↑p ^ (n + 1) * X (0, n + 1))) +\n remainder p n\n[PROOFSTEP]\nrw [add_comm _ (remainder p n)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ((∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1))) =\n remainder p n +\n (-(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n (↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1))) +\n (↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) * (↑p ^ (n + 1) * X (0, n + 1))))\n[PROOFSTEP]\nsimp only [add_assoc]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ (∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n (↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ((∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1)))) =\n remainder p n +\n (-(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n (↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n (↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1)) +\n (↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1),\n ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) * (↑p ^ (n + 1) * X (0, n + 1))))))\n[PROOFSTEP]\napply congrArg (Add.add _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nmvpz : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ ↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ((∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *\n (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1))) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n (↑p ^ (n + 1) * X (0, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 1)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n (↑p ^ (n + 1) * X (0, n + 1) * (↑p ^ (n + 1) * X (1, n + 1)) +\n (↑p ^ (n + 1) * X (1, n + 1) *\n ∑ x in range (n + 1), ↑(rename (Prod.mk 0)) (↑(monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x)) +\n ↑p ^ (n + 1) * X (1, n + 1) * (↑p ^ (n + 1) * X (0, n + 1)))))\n[PROOFSTEP]\nring\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ (n + 1) * wittMul p (n + 1) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)) +\n (remainder p n - wittPolyProdRemainder p (n + 1))\n[PROOFSTEP]\nrw [← add_sub_assoc, eq_sub_iff_add_eq, mul_polyOfInterest_aux2]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ wittPolyProd p (n + 1) =\n -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)) +\n remainder p n\n[PROOFSTEP]\nexact mul_polyOfInterest_aux3 _ _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ (n + 1) * polyOfInterest p n = remainder p n - wittPolyProdRemainder p (n + 1)\n[PROOFSTEP]\nsimp only [polyOfInterest, mul_sub, mul_add, sub_eq_iff_eq_add']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ (n + 1) * wittMul p (n + 1) + ↑p ^ (n + 1) * (↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1)) =\n ↑p ^ (n + 1) * (X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1))) +\n (↑p ^ (n + 1) * (X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))) +\n (remainder p n - wittPolyProdRemainder p (n + 1)))\n[PROOFSTEP]\nrw [mul_polyOfInterest_aux4 p n]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ -(↑p ^ (n + 1) * X (0, n + 1)) * (↑p ^ (n + 1) * X (1, n + 1)) +\n ↑p ^ (n + 1) * X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) +\n ↑p ^ (n + 1) * X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)) +\n (remainder p n - wittPolyProdRemainder p (n + 1)) +\n ↑p ^ (n + 1) * (↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1)) =\n ↑p ^ (n + 1) * (X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1))) +\n (↑p ^ (n + 1) * (X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))) +\n (remainder p n - wittPolyProdRemainder p (n + 1)))\n[PROOFSTEP]\nring\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (↑p ^ (n + 1) * polyOfInterest p n) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [mul_polyOfInterest_aux5]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (remainder p n - wittPolyProdRemainder p (n + 1)) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply Subset.trans (vars_sub_subset _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (remainder p n) ∪ vars (wittPolyProdRemainder p (n + 1)) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrefine' union_subset _ _\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (remainder p n) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply remainder_vars\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (wittPolyProdRemainder p (n + 1)) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply wittPolyProdRemainder_vars\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (polyOfInterest p n) =\n vars\n (↑p ^ (n + 1) *\n (wittMul p (n + 1) + ↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1) -\n X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) -\n X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))))\n[PROOFSTEP]\nhave : (p : 𝕄) ^ (n + 1) = C ((p : ℤ) ^ (n + 1)) := by simp only; norm_cast\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n[PROOFSTEP]\nsimp only\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nthis : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ vars (polyOfInterest p n) =\n vars\n (↑p ^ (n + 1) *\n (wittMul p (n + 1) + ↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1) -\n X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) -\n X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))))\n[PROOFSTEP]\nrw [polyOfInterest, this, vars_C_mul]\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nthis : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ ↑p ^ (n + 1) ≠ 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase ha.h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nthis : ↑p ^ (n + 1) = ↑C (↑p ^ (n + 1))\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.out.ne_zero\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars (polyOfInterest p n) ⊆ univ ×ˢ range (n + 1)\n[PROOFSTEP]\nrw [polyOfInterest_vars_eq]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\n⊢ vars\n (↑p ^ (n + 1) *\n (wittMul p (n + 1) + ↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1) -\n X (0, n + 1) * ↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) -\n X (1, n + 1) * ↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)))) ⊆\n univ ×ˢ range (n + 1)\n[PROOFSTEP]\napply mul_polyOfInterest_vars\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\n⊢ peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i] =\n coeff (x * y) (n + 1) + ↑(p ^ (n + 1)) * coeff x (n + 1) * coeff y (n + 1) -\n coeff y (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff x i ^ p ^ (n + 1 - i) -\n coeff x (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff y i ^ p ^ (n + 1 - i)\n[PROOFSTEP]\nsimp only [polyOfInterest, peval, map_natCast, Matrix.head_cons, map_pow, Function.uncurry_apply_pair, aeval_X,\n Matrix.cons_val_one, map_mul, Matrix.cons_val_zero, map_sub]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\n⊢ ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (wittMul p (n + 1) + ↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1)) -\n coeff x (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1))) -\n coeff y (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))) =\n coeff (x * y) (n + 1) + ↑(p ^ (n + 1)) * coeff x (n + 1) * coeff y (n + 1) -\n coeff y (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff x i ^ p ^ (n + 1 - i) -\n coeff x (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff y i ^ p ^ (n + 1 - i)\n[PROOFSTEP]\nrw [sub_sub, add_comm (_ * _), ← sub_sub]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\n⊢ ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (wittMul p (n + 1) + ↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1)) -\n coeff y (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))) -\n coeff x (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1))) =\n coeff (x * y) (n + 1) + ↑(p ^ (n + 1)) * coeff x (n + 1) * coeff y (n + 1) -\n coeff y (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff x i ^ p ^ (n + 1 - i) -\n coeff x (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff y i ^ p ^ (n + 1 - i)\n[PROOFSTEP]\nhave mvpz : (p : MvPolynomial ℕ ℤ) = MvPolynomial.C ↑p := by rw [eq_intCast, Int.cast_ofNat]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\n⊢ ↑p = ↑C ↑p\n[PROOFSTEP]\nrw [eq_intCast, Int.cast_ofNat]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\nmvpz : ↑p = ↑C ↑p\n⊢ ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (wittMul p (n + 1) + ↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1)) -\n coeff y (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))) -\n coeff x (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1))) =\n coeff (x * y) (n + 1) + ↑(p ^ (n + 1)) * coeff x (n + 1) * coeff y (n + 1) -\n coeff y (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff x i ^ p ^ (n + 1 - i) -\n coeff x (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff y i ^ p ^ (n + 1 - i)\n[PROOFSTEP]\nhave : ∀ (f : ℤ →+* k) (g : ℕ → k), eval₂ f g p = f p := by intros; rw [mvpz, MvPolynomial.eval₂_C]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\nmvpz : ↑p = ↑C ↑p\n⊢ ∀ (f : ℤ →+* k) (g : ℕ → k), eval₂ f g ↑p = ↑f ↑p\n[PROOFSTEP]\nintros\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\nmvpz : ↑p = ↑C ↑p\nf✝ : ℤ →+* k\ng✝ : ℕ → k\n⊢ eval₂ f✝ g✝ ↑p = ↑f✝ ↑p\n[PROOFSTEP]\nrw [mvpz, MvPolynomial.eval₂_C]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝ : CommRing k\nn : ℕ\nx y : 𝕎 k\nmvpz : ↑p = ↑C ↑p\nthis : ∀ (f : ℤ →+* k) (g : ℕ → k), eval₂ f g ↑p = ↑f ↑p\n⊢ ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (wittMul p (n + 1) + ↑p ^ (n + 1) * X (0, n + 1) * X (1, n + 1)) -\n coeff y (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1))) -\n coeff x (n + 1) *\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i]))\n (↑(rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1))) =\n coeff (x * y) (n + 1) + ↑(p ^ (n + 1)) * coeff x (n + 1) * coeff y (n + 1) -\n coeff y (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff x i ^ p ^ (n + 1 - i) -\n coeff x (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff y i ^ p ^ (n + 1 - i)\n[PROOFSTEP]\nsimp [wittPolynomial_eq_sum_C_mul_X_pow, aeval, eval₂_rename, this, mul_coeff, peval, map_natCast, map_add, map_pow,\n map_mul]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\n⊢ peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i] =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nrw [peval_polyOfInterest]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\n⊢ coeff (x * y) (n + 1) + ↑(p ^ (n + 1)) * coeff x (n + 1) * coeff y (n + 1) -\n coeff y (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff x i ^ p ^ (n + 1 - i) -\n coeff x (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff y i ^ p ^ (n + 1 - i) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nhave : (p : k) = 0 := CharP.cast_eq_zero k p\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\nthis : ↑p = 0\n⊢ coeff (x * y) (n + 1) + ↑(p ^ (n + 1)) * coeff x (n + 1) * coeff y (n + 1) -\n coeff y (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff x i ^ p ^ (n + 1 - i) -\n coeff x (n + 1) * ∑ i in range (n + 1 + 1), ↑(p ^ i) * coeff y i ^ p ^ (n + 1 - i) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nsimp only [this, Nat.cast_pow, ne_eq, add_eq_zero, and_false, zero_pow', zero_mul, add_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\nthis : ↑p = 0\n⊢ coeff (x * y) (n + 1) - coeff y (n + 1) * ∑ x_1 in range (n + 1 + 1), 0 ^ x_1 * coeff x x_1 ^ p ^ (n + 1 - x_1) -\n coeff x (n + 1) * ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nhave sum_zero_pow_mul_pow_p :\n ∀ y : 𝕎 k, ∑ x : ℕ in range (n + 1 + 1), (0 : k) ^ x * y.coeff x ^ p ^ (n + 1 - x) = y.coeff 0 ^ p ^ (n + 1) :=\n by\n intro y\n rw [Finset.sum_eq_single_of_mem 0]\n · simp\n · simp\n · intro j _ hj\n simp [zero_pow (zero_lt_iff.mpr hj)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\nthis : ↑p = 0\n⊢ ∀ (y : 𝕎 k), ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) = coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nintro y\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y✝ : 𝕎 k\nthis : ↑p = 0\ny : 𝕎 k\n⊢ ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) = coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nrw [Finset.sum_eq_single_of_mem 0]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y✝ : 𝕎 k\nthis : ↑p = 0\ny : 𝕎 k\n⊢ 0 ^ 0 * coeff y 0 ^ p ^ (n + 1 - 0) = coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y✝ : 𝕎 k\nthis : ↑p = 0\ny : 𝕎 k\n⊢ 0 ∈ range (n + 1 + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₀\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y✝ : 𝕎 k\nthis : ↑p = 0\ny : 𝕎 k\n⊢ ∀ (b : ℕ), b ∈ range (n + 1 + 1) → b ≠ 0 → 0 ^ b * coeff y b ^ p ^ (n + 1 - b) = 0\n[PROOFSTEP]\nintro j _ hj\n[GOAL]\ncase h₀\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y✝ : 𝕎 k\nthis : ↑p = 0\ny : 𝕎 k\nj : ℕ\na✝ : j ∈ range (n + 1 + 1)\nhj : j ≠ 0\n⊢ 0 ^ j * coeff y j ^ p ^ (n + 1 - j) = 0\n[PROOFSTEP]\nsimp [zero_pow (zero_lt_iff.mpr hj)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\nthis : ↑p = 0\nsum_zero_pow_mul_pow_p :\n ∀ (y : 𝕎 k), ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) = coeff y 0 ^ p ^ (n + 1)\n⊢ coeff (x * y) (n + 1) - coeff y (n + 1) * ∑ x_1 in range (n + 1 + 1), 0 ^ x_1 * coeff x x_1 ^ p ^ (n + 1 - x_1) -\n coeff x (n + 1) * ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a.e_a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\nthis : ↑p = 0\nsum_zero_pow_mul_pow_p :\n ∀ (y : 𝕎 k), ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) = coeff y 0 ^ p ^ (n + 1)\n⊢ ∑ x_1 in range (n + 1 + 1), 0 ^ x_1 * coeff x x_1 ^ p ^ (n + 1 - x_1) = coeff x 0 ^ p ^ (n + 1)\n[PROOFSTEP]\napply sum_zero_pow_mul_pow_p\n[GOAL]\ncase e_a.e_a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nx y : 𝕎 k\nthis : ↑p = 0\nsum_zero_pow_mul_pow_p :\n ∀ (y : 𝕎 k), ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) = coeff y 0 ^ p ^ (n + 1)\n⊢ ∑ x in range (n + 1 + 1), 0 ^ x * coeff y x ^ p ^ (n + 1 - x) = coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\napply sum_zero_pow_mul_pow_p\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\n⊢ ∃ f,\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n[PROOFSTEP]\nsimp only [← peval_polyOfInterest']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\n⊢ ∃ f,\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i]\n[PROOFSTEP]\nobtain ⟨f₀, hf₀⟩ := exists_restrict_to_vars k (polyOfInterest_vars p n)\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\n⊢ ∃ f,\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i]\n[PROOFSTEP]\nhave : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = a.product b := fun a b => rfl\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\n⊢ ∃ f,\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i]\n[PROOFSTEP]\nlet f : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n by\n intro x y\n apply f₀\n rintro ⟨a, ha⟩\n apply Function.uncurry ![x, y]\n simp_rw [product_val, this, Multiset.mem_product, mem_univ_val, true_and_iff, range_val, Multiset.range_succ,\n Multiset.mem_cons, Multiset.mem_range] at ha \n refine' ⟨a.fst, ⟨a.snd, _⟩⟩\n cases' ha with ha ha <;> linarith only [ha]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\n⊢ TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k\n[PROOFSTEP]\nintro x y\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\n⊢ k\n[PROOFSTEP]\napply f₀\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\n⊢ (↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\na : Fin 2 × ℕ\nha : a ∈ fun a => a ∈ (univ ×ˢ range (n + 1)).val\n⊢ k\n[PROOFSTEP]\napply Function.uncurry ![x, y]\n[GOAL]\ncase mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\na : Fin 2 × ℕ\nha : a ∈ fun a => a ∈ (univ ×ˢ range (n + 1)).val\n⊢ Fin (Nat.succ (Nat.succ 0)) × Fin (n + 1)\n[PROOFSTEP]\nsimp_rw [product_val, this, Multiset.mem_product, mem_univ_val, true_and_iff, range_val, Multiset.range_succ,\n Multiset.mem_cons, Multiset.mem_range] at ha \n[GOAL]\ncase mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\na : Fin 2 × ℕ\nha : a ∈ fun a => a.snd = n ∨ a.snd < n\n⊢ Fin (Nat.succ (Nat.succ 0)) × Fin (n + 1)\n[PROOFSTEP]\nrefine' ⟨a.fst, ⟨a.snd, _⟩⟩\n[GOAL]\ncase mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\na : Fin 2 × ℕ\nha : a ∈ fun a => a.snd = n ∨ a.snd < n\n⊢ a.snd < n + 1\n[PROOFSTEP]\ncases' ha with ha ha\n[GOAL]\ncase mk.inl\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\na : Fin 2 × ℕ\nha : a.snd = n\n⊢ a.snd < n + 1\n[PROOFSTEP]\nlinarith only [ha]\n[GOAL]\ncase mk.inr\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nx y : TruncatedWittVector p (n + 1) k\na : Fin 2 × ℕ\nha : a.snd < n\n⊢ a.snd < n + 1\n[PROOFSTEP]\nlinarith only [ha]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\n⊢ ∃ f,\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i]\n[PROOFSTEP]\nuse f\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\n⊢ ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i]\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\n⊢ f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n peval (polyOfInterest p n) ![fun i => coeff x i, fun i => coeff y i]\n[PROOFSTEP]\ndsimp [peval]\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\n⊢ (f₀ fun a =>\n Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y] (↑a).fst\n { val := (↑a).snd, isLt := (_ : (↑a).snd < n + 1) }) =\n ↑(aeval (Function.uncurry ![fun i => coeff x i, fun i => coeff y i])) (polyOfInterest p n)\n[PROOFSTEP]\nrw [← hf₀]\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\n⊢ (f₀ fun a =>\n Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y] (↑a).fst\n { val := (↑a).snd, isLt := (_ : (↑a).snd < n + 1) }) =\n f₀ (Function.uncurry ![fun i => coeff x i, fun i => coeff y i] ∘ Subtype.val)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\n⊢ (fun a =>\n Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y] (↑a).fst\n { val := (↑a).snd, isLt := (_ : (↑a).snd < n + 1) }) =\n Function.uncurry ![fun i => coeff x i, fun i => coeff y i] ∘ Subtype.val\n[PROOFSTEP]\next a\n[GOAL]\ncase h.e_a.h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\na : ↑fun a => a ∈ univ.val ×ˢ Multiset.range (n + 1)\n⊢ Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y] (↑a).fst\n { val := (↑a).snd, isLt := (_ : (↑a).snd < n + 1) } =\n (Function.uncurry ![fun i => coeff x i, fun i => coeff y i] ∘ Subtype.val) a\n[PROOFSTEP]\ncases' a with a ha\n[GOAL]\ncase h.e_a.h.mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\na : Fin 2 × ℕ\nha : a ∈ fun a => a ∈ univ.val ×ˢ Multiset.range (n + 1)\n⊢ Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y] (↑{ val := a, property := ha }).fst\n { val := (↑{ val := a, property := ha }).snd, isLt := (_ : (↑{ val := a, property := ha }).snd < n + 1) } =\n (Function.uncurry ![fun i => coeff x i, fun i => coeff y i] ∘ Subtype.val) { val := a, property := ha }\n[PROOFSTEP]\ncases' a with i m\n[GOAL]\ncase h.e_a.h.mk.mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\ni : Fin 2\nm : ℕ\nha : (i, m) ∈ fun a => a ∈ univ.val ×ˢ Multiset.range (n + 1)\n⊢ Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y] (↑{ val := (i, m), property := ha }).fst\n { val := (↑{ val := (i, m), property := ha }).snd,\n isLt := (_ : (↑{ val := (i, m), property := ha }).snd < n + 1) } =\n (Function.uncurry ![fun i => coeff x i, fun i => coeff y i] ∘ Subtype.val) { val := (i, m), property := ha }\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase h.e_a.h.mk.mk.head\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\nm : ℕ\nha : ({ val := 0, isLt := (_ : 0 < 2) }, m) ∈ fun a => a ∈ univ.val ×ˢ Multiset.range (n + 1)\n⊢ Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y]\n (↑{ val := ({ val := 0, isLt := (_ : 0 < 2) }, m), property := ha }).fst\n { val := (↑{ val := ({ val := 0, isLt := (_ : 0 < 2) }, m), property := ha }).snd,\n isLt := (_ : (↑{ val := ({ val := 0, isLt := (_ : 0 < 2) }, m), property := ha }).snd < n + 1) } =\n (Function.uncurry ![fun i => coeff x i, fun i => coeff y i] ∘ Subtype.val)\n { val := ({ val := 0, isLt := (_ : 0 < 2) }, m), property := ha }\n[PROOFSTEP]\nrfl\n -- surely this case split is not necessary\n[GOAL]\ncase h.e_a.h.mk.mk.tail.head\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf₀ : ((↑fun a => a ∈ (univ ×ˢ range (n + 1)).val) → k) → k\nhf₀ : ∀ (x : Fin 2 × ℕ → k), f₀ (x ∘ Subtype.val) = ↑(aeval x) (polyOfInterest p n)\nthis : ∀ (a : Multiset (Fin 2)) (b : Multiset ℕ), a ×ˢ b = Multiset.product a b\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k :=\n fun x y =>\n f₀ fun a =>\n Subtype.casesOn a fun a ha => Function.uncurry ![x, y] (a.fst, { val := a.snd, isLt := (_ : a.snd < n + 1) })\nx y : 𝕎 k\nm : ℕ\nha : ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, m) ∈ fun a => a ∈ univ.val ×ˢ Multiset.range (n + 1)\n⊢ Matrix.vecCons (truncateFun (n + 1) x) ![truncateFun (n + 1) y]\n (↑{ val := ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, m), property := ha }).fst\n { val := (↑{ val := ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, m), property := ha }).snd,\n isLt := (_ : (↑{ val := ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, m), property := ha }).snd < n + 1) } =\n (Function.uncurry ![fun i => coeff x i, fun i => coeff y i] ∘ Subtype.val)\n { val := ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, m), property := ha }\n[PROOFSTEP]\nrfl\n -- surely this case split is not necessary\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\n⊢ ∃ f,\n ∀ (x y : 𝕎 k),\n coeff (x * y) (n + 1) =\n coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1) + coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) +\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y)\n[PROOFSTEP]\nobtain ⟨f, hf⟩ := nth_mul_coeff' p k n\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k\nhf :\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n⊢ ∃ f,\n ∀ (x y : 𝕎 k),\n coeff (x * y) (n + 1) =\n coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1) + coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) +\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y)\n[PROOFSTEP]\nuse f\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k\nhf :\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\n⊢ ∀ (x y : 𝕎 k),\n coeff (x * y) (n + 1) =\n coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1) + coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) +\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k\nhf :\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\nx y : 𝕎 k\n⊢ coeff (x * y) (n + 1) =\n coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1) + coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) +\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y)\n[PROOFSTEP]\nrw [hf x y]\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : CommRing k\ninst✝ : CharP k p\nn : ℕ\nf : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k\nhf :\n ∀ (x y : 𝕎 k),\n f (truncateFun (n + 1) x) (truncateFun (n + 1) y) =\n coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1)\nx y : 𝕎 k\n⊢ coeff (x * y) (n + 1) =\n coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1) + coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) +\n (coeff (x * y) (n + 1) - coeff y (n + 1) * coeff x 0 ^ p ^ (n + 1) - coeff x (n + 1) * coeff y 0 ^ p ^ (n + 1))\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.MulCoeff", "llama_tokens": 35944, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006919925839876, "lm_q2_score": 0.7549149813536518, "lm_q1q2_score": 0.6044543806515593}} {"text": "[GOAL]\nβ : Type u_1\nM : Type ?u.36709\nα : Type ?u.36708\ninst✝² : SMul M α\ninst✝¹ : FaithfulSMul M α\ninst✝ : Nontrivial β\nc₁ c₂ : Mᵈᵐᵃ\nh : ∀ (a : α → β), c₁ • a = c₂ • a\na : α\n⊢ ↑mk.symm c₁ • a = ↑mk.symm c₂ • a\n[PROOFSTEP]\nrcases exists_pair_ne β with ⟨x, y, hne⟩\n[GOAL]\ncase intro.intro\nβ : Type u_1\nM : Type ?u.36709\nα : Type ?u.36708\ninst✝² : SMul M α\ninst✝¹ : FaithfulSMul M α\ninst✝ : Nontrivial β\nc₁ c₂ : Mᵈᵐᵃ\nh : ∀ (a : α → β), c₁ • a = c₂ • a\na : α\nx y : β\nhne : x ≠ y\n⊢ ↑mk.symm c₁ • a = ↑mk.symm c₂ • a\n[PROOFSTEP]\ncontrapose! hne\n[GOAL]\ncase intro.intro\nβ : Type u_1\nM : Type ?u.36709\nα : Type ?u.36708\ninst✝² : SMul M α\ninst✝¹ : FaithfulSMul M α\ninst✝ : Nontrivial β\nc₁ c₂ : Mᵈᵐᵃ\nh : ∀ (a : α → β), c₁ • a = c₂ • a\na : α\nx y : β\nhne : ↑mk.symm c₁ • a ≠ ↑mk.symm c₂ • a\n⊢ x = y\n[PROOFSTEP]\nhaveI := Classical.decEq α\n[GOAL]\ncase intro.intro\nβ : Type u_1\nM : Type ?u.36709\nα : Type ?u.36708\ninst✝² : SMul M α\ninst✝¹ : FaithfulSMul M α\ninst✝ : Nontrivial β\nc₁ c₂ : Mᵈᵐᵃ\nh : ∀ (a : α → β), c₁ • a = c₂ • a\na : α\nx y : β\nhne : ↑mk.symm c₁ • a ≠ ↑mk.symm c₂ • a\nthis : DecidableEq α\n⊢ x = y\n[PROOFSTEP]\nreplace h := congr_fun (h (update (const α x) (mk.symm c₂ • a) y)) a\n[GOAL]\ncase intro.intro\nβ : Type u_1\nM : Type ?u.36709\nα : Type ?u.36708\ninst✝² : SMul M α\ninst✝¹ : FaithfulSMul M α\ninst✝ : Nontrivial β\nc₁ c₂ : Mᵈᵐᵃ\na : α\nx y : β\nhne : ↑mk.symm c₁ • a ≠ ↑mk.symm c₂ • a\nthis : DecidableEq α\nh : (c₁ • update (const α x) (↑mk.symm c₂ • a) y) a = (c₂ • update (const α x) (↑mk.symm c₂ • a) y) a\n⊢ x = y\n[PROOFSTEP]\nsimpa [smul_apply, hne] using h\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.DomAct.Basic", "llama_tokens": 923, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8539127603871312, "lm_q2_score": 0.7057850216484838, "lm_q1q2_score": 0.6026788360757479}} {"text": "[GOAL]\nα : Type u_1\ninst✝¹ : OrderedAddCommGroup α\ninst✝ : Archimedean α\nx y : αᵒᵈ\nhy : 0 < y\nn : ℕ\nhn : -↑ofDual x ≤ n • -y\n⊢ x ≤ n • y\n[PROOFSTEP]\nrwa [neg_nsmul, neg_le_neg_iff] at hn \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nlet s : Set ℤ := {n : ℤ | n • a ≤ g}\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nobtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk : ℕ\nhk : -g ≤ k • a\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nhave h_ne : s.Nonempty := ⟨-k, by simpa using neg_le_neg hk⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk : ℕ\nhk : -g ≤ k • a\n⊢ -↑k ∈ s\n[PROOFSTEP]\nsimpa using neg_le_neg hk\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk : ℕ\nhk : -g ≤ k • a\nh_ne : Set.Nonempty s\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := Archimedean.arch g ha\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nhave h_bdd : ∀ n ∈ s, n ≤ (k : ℤ) := by\n intro n hn\n apply (zsmul_le_zsmul_iff ha).mp\n rw [← coe_nat_zsmul] at hk \n exact le_trans hn hk\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\n⊢ ∀ (n : ℤ), n ∈ s → n ≤ ↑k\n[PROOFSTEP]\nintro n hn\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nn : ℤ\nhn : n ∈ s\n⊢ n ≤ ↑k\n[PROOFSTEP]\napply (zsmul_le_zsmul_iff ha).mp\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nn : ℤ\nhn : n ∈ s\n⊢ n • a ≤ ↑k • a\n[PROOFSTEP]\nrw [← coe_nat_zsmul] at hk \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ ↑k • a\nn : ℤ\nhn : n ∈ s\n⊢ n • a ≤ ↑k • a\n[PROOFSTEP]\nexact le_trans hn hk\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nh_bdd : ∀ (n : ℤ), n ∈ s → n ≤ ↑k\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nobtain ⟨m, hm, hm'⟩ := Int.exists_greatest_of_bdd ⟨k, h_bdd⟩ h_ne\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nh_bdd : ∀ (n : ℤ), n ∈ s → n ≤ ↑k\nm : ℤ\nhm : m ∈ s\nhm' : ∀ (z : ℤ), z ∈ s → z ≤ m\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nhave hm'' : g < (m + 1) • a := by\n contrapose! hm'\n exact ⟨m + 1, hm', lt_add_one _⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nh_bdd : ∀ (n : ℤ), n ∈ s → n ≤ ↑k\nm : ℤ\nhm : m ∈ s\nhm' : ∀ (z : ℤ), z ∈ s → z ≤ m\n⊢ g < (m + 1) • a\n[PROOFSTEP]\ncontrapose! hm'\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nh_bdd : ∀ (n : ℤ), n ∈ s → n ≤ ↑k\nm : ℤ\nhm : m ∈ s\nhm' : (m + 1) • a ≤ g\n⊢ ∃ z, z ∈ {n | n • a ≤ g} ∧ m < z\n[PROOFSTEP]\nexact ⟨m + 1, hm', lt_add_one _⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nh_bdd : ∀ (n : ℤ), n ∈ s → n ≤ ↑k\nm : ℤ\nhm : m ∈ s\nhm' : ∀ (z : ℤ), z ∈ s → z ≤ m\nhm'' : g < (m + 1) • a\n⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a\n[PROOFSTEP]\nrefine' ⟨m, ⟨hm, hm''⟩, fun n hn => (hm' n hn.1).antisymm <| Int.le_of_lt_add_one _⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nh_bdd : ∀ (n : ℤ), n ∈ s → n ≤ ↑k\nm : ℤ\nhm : m ∈ s\nhm' : ∀ (z : ℤ), z ∈ s → z ≤ m\nhm'' : g < (m + 1) • a\nn : ℤ\nhn : (fun k => k • a ≤ g ∧ g < (k + 1) • a) n\n⊢ m < n + 1\n[PROOFSTEP]\nrw [← zsmul_lt_zsmul_iff ha]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\ns : Set ℤ := {n | n • a ≤ g}\nk✝ : ℕ\nhk✝ : -g ≤ k✝ • a\nh_ne : Set.Nonempty s\nk : ℕ\nhk : g ≤ k • a\nh_bdd : ∀ (n : ℤ), n ∈ s → n ≤ ↑k\nm : ℤ\nhm : m ∈ s\nhm' : ∀ (z : ℤ), z ∈ s → z ≤ m\nhm'' : g < (m + 1) • a\nn : ℤ\nhn : (fun k => k • a ≤ g ∧ g < (k + 1) • a) n\n⊢ m • a < (n + 1) • a\n[PROOFSTEP]\nexact lt_of_le_of_lt hm hn.2\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\ng : α\n⊢ ∃! k, 0 ≤ g - k • a ∧ g - k • a < a\n[PROOFSTEP]\nsimpa only [sub_nonneg, add_zsmul, one_zsmul, sub_lt_iff_lt_add'] using existsUnique_zsmul_near_of_pos ha g\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\nb c : α\n⊢ ∃! m, b - m • a ∈ Ico c (c + a)\n[PROOFSTEP]\nsimpa only [mem_Ico, le_sub_iff_add_le, zero_add, add_comm c, sub_lt_iff_lt_add', add_assoc] using\n existsUnique_zsmul_near_of_pos' ha (b - c)\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\nb c : α\n⊢ ∃! x, b + ↑(Equiv.neg ℤ) x • a ∈ Ico c (c + a)\n[PROOFSTEP]\nsimpa only [Equiv.neg_apply, mem_Ico, neg_zsmul, ← sub_eq_add_neg, le_sub_iff_add_le, zero_add, add_comm c,\n sub_lt_iff_lt_add', add_assoc] using existsUnique_zsmul_near_of_pos' ha (b - c)\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\nb c : α\n⊢ ∃! x, b + ↑(Equiv.addRight 1) x • a ∈ Ioc c (c + a)\n[PROOFSTEP]\nsimpa only [add_zsmul, sub_lt_iff_lt_add', le_sub_iff_add_le', ← add_assoc, and_comm, mem_Ioc, Equiv.coe_addRight,\n one_zsmul, add_le_add_iff_right] using existsUnique_zsmul_near_of_pos ha (c - b)\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\na : α\nha : 0 < a\nb c : α\n⊢ ∃! x, b - ↑(Equiv.neg ℤ) x • a ∈ Ioc c (c + a)\n[PROOFSTEP]\nsimpa only [Equiv.neg_apply, neg_zsmul, sub_neg_eq_add] using existsUnique_add_zsmul_mem_Ioc ha b c\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedSemiring α\ninst✝ : Archimedean α\nx : α\nn : ℕ\nhn : x < n • 1\n⊢ x < ↑n\n[PROOFSTEP]\nrwa [← nsmul_one]\n[GOAL]\nα : Type u_1\ninst✝¹ : OrderedSemiring α\ninst✝ : Archimedean α\nx : α\n⊢ ∃ n, x ≤ ↑n\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\ninst✝¹ : OrderedSemiring α\ninst✝ : Archimedean α\nx : α\n✝ : Nontrivial α\n⊢ ∃ n, x ≤ ↑n\n[PROOFSTEP]\nexact (Archimedean.arch x one_pos).imp fun n h => by rwa [← nsmul_one]\n[GOAL]\nα : Type u_1\ninst✝¹ : OrderedSemiring α\ninst✝ : Archimedean α\nx : α\n✝ : Nontrivial α\nn : ℕ\nh : x ≤ n • 1\n⊢ x ≤ ↑n\n[PROOFSTEP]\nrwa [← nsmul_one]\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedSemiring α\ninst✝ : Archimedean α\nx y : α\nhy : 0 < y\nthis : 0 ≤ 1 + y\nn : ℕ\nh : x ≤ n • y\n⊢ (1 + y) ^ n = (y + 1) ^ n\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\nn : ℕ\nh : x < ↑n\n⊢ x < ↑↑n\n[PROOFSTEP]\nrwa [Int.cast_ofNat]\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\nn : ℤ\nh : -x < ↑n\n⊢ ↑(-n) < x\n[PROOFSTEP]\nrw [Int.cast_neg]\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\nn : ℤ\nh : -x < ↑n\n⊢ -↑n < x\n[PROOFSTEP]\nexact neg_lt.1 h\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\n⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x\n[PROOFSTEP]\nhaveI := Classical.propDecidable\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\nthis : (a : Prop) → Decidable a\n⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x\n[PROOFSTEP]\nhave : ∃ ub : ℤ, (ub : α) ≤ x ∧ ∀ z : ℤ, (z : α) ≤ x → z ≤ ub :=\n Int.exists_greatest_of_bdd\n (let ⟨n, hn⟩ := exists_int_gt x\n ⟨n, fun z h' => Int.cast_le.1 <| le_trans h' <| le_of_lt hn⟩)\n (let ⟨n, hn⟩ := exists_int_lt x\n ⟨n, le_of_lt hn⟩)\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\nthis✝ : (a : Prop) → Decidable a\nthis : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub\n⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x\n[PROOFSTEP]\nrefine' this.imp fun fl h z => _\n[GOAL]\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\nthis✝ : (a : Prop) → Decidable a\nthis : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub\nfl : ℤ\nh : ↑fl ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ fl\nz : ℤ\n⊢ z ≤ fl ↔ ↑z ≤ x\n[PROOFSTEP]\ncases' h with h₁ h₂\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : StrictOrderedRing α\ninst✝ : Archimedean α\nx : α\nthis✝ : (a : Prop) → Decidable a\nthis : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub\nfl z : ℤ\nh₁ : ↑fl ≤ x\nh₂ : ∀ (z : ℤ), ↑z ≤ x → z ≤ fl\n⊢ z ≤ fl ↔ ↑z ≤ x\n[PROOFSTEP]\nexact ⟨fun h => le_trans (Int.cast_le.2 h) h₁, h₂ z⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedRing α\ninst✝ : Archimedean α\nx y : α\nhx : 1 ≤ x\nhy : 1 < y\n⊢ ∃ n, y ^ n ≤ x ∧ x < y ^ (n + 1)\n[PROOFSTEP]\nhave h : ∃ n : ℕ, x < y ^ n := pow_unbounded_of_one_lt _ hy\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedRing α\ninst✝ : Archimedean α\nx y : α\nhx : 1 ≤ x\nhy : 1 < y\nh : ∃ n, x < y ^ n\n⊢ ∃ n, y ^ n ≤ x ∧ x < y ^ (n + 1)\n[PROOFSTEP]\nclassical exact\n let n := Nat.find h\n have hn : x < y ^ n := Nat.find_spec h\n have hnp : 0 < n := pos_iff_ne_zero.2 fun hn0 => by rw [hn0, pow_zero] at hn ; exact not_le_of_gt hn hx\n have hnsp : Nat.pred n + 1 = n := Nat.succ_pred_eq_of_pos hnp\n have hltn : Nat.pred n < n := Nat.pred_lt (ne_of_gt hnp)\n ⟨Nat.pred n, le_of_not_lt (Nat.find_min h hltn), by rwa [hnsp]⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedRing α\ninst✝ : Archimedean α\nx y : α\nhx : 1 ≤ x\nhy : 1 < y\nh : ∃ n, x < y ^ n\n⊢ ∃ n, y ^ n ≤ x ∧ x < y ^ (n + 1)\n[PROOFSTEP]\nexact\n let n := Nat.find h\n have hn : x < y ^ n := Nat.find_spec h\n have hnp : 0 < n := pos_iff_ne_zero.2 fun hn0 => by rw [hn0, pow_zero] at hn ; exact not_le_of_gt hn hx\n have hnsp : Nat.pred n + 1 = n := Nat.succ_pred_eq_of_pos hnp\n have hltn : Nat.pred n < n := Nat.pred_lt (ne_of_gt hnp)\n ⟨Nat.pred n, le_of_not_lt (Nat.find_min h hltn), by rwa [hnsp]⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedRing α\ninst✝ : Archimedean α\nx y : α\nhx : 1 ≤ x\nhy : 1 < y\nh : ∃ n, x < y ^ n\nn : ℕ := Nat.find h\nhn : x < y ^ n\nhn0 : n = 0\n⊢ False\n[PROOFSTEP]\nrw [hn0, pow_zero] at hn \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedRing α\ninst✝ : Archimedean α\nx y : α\nhx : 1 ≤ x\nhy : 1 < y\nh : ∃ n, x < y ^ n\nn : ℕ := Nat.find h\nhn : x < 1\nhn0 : n = 0\n⊢ False\n[PROOFSTEP]\nexact not_le_of_gt hn hx\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedRing α\ninst✝ : Archimedean α\nx y : α\nhx : 1 ≤ x\nhy : 1 < y\nh : ∃ n, x < y ^ n\nn : ℕ := Nat.find h\nhn : x < y ^ n\nhnp : 0 < n\nhnsp : Nat.pred n + 1 = n\nhltn : Nat.pred n < n\n⊢ x < y ^ (Nat.pred n + 1)\n[PROOFSTEP]\nrwa [hnsp]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : 1 < y\n⊢ ∃ n, x ∈ Ico (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\nclassical exact\n let ⟨N, hN⟩ := pow_unbounded_of_one_lt x⁻¹ hy\n have he : ∃ m : ℤ, y ^ m ≤ x :=\n ⟨-N,\n le_of_lt\n (by\n rw [zpow_neg y ↑N, zpow_ofNat]\n exact (inv_lt hx (lt_trans (inv_pos.2 hx) hN)).1 hN)⟩\n let ⟨M, hM⟩ := pow_unbounded_of_one_lt x hy\n have hb : ∃ b : ℤ, ∀ m, y ^ m ≤ x → m ≤ b :=\n ⟨M, fun m hm =>\n le_of_not_lt fun hlt =>\n not_lt_of_ge (zpow_le_of_le hy.le hlt.le) (lt_of_le_of_lt hm (by rwa [← zpow_ofNat] at hM ))⟩\n let ⟨n, hn₁, hn₂⟩ := Int.exists_greatest_of_bdd hb he\n ⟨n, hn₁, lt_of_not_ge fun hge => not_le_of_gt (Int.lt_succ _) (hn₂ _ hge)⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : 1 < y\n⊢ ∃ n, x ∈ Ico (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\nexact\n let ⟨N, hN⟩ := pow_unbounded_of_one_lt x⁻¹ hy\n have he : ∃ m : ℤ, y ^ m ≤ x :=\n ⟨-N,\n le_of_lt\n (by\n rw [zpow_neg y ↑N, zpow_ofNat]\n exact (inv_lt hx (lt_trans (inv_pos.2 hx) hN)).1 hN)⟩\n let ⟨M, hM⟩ := pow_unbounded_of_one_lt x hy\n have hb : ∃ b : ℤ, ∀ m, y ^ m ≤ x → m ≤ b :=\n ⟨M, fun m hm =>\n le_of_not_lt fun hlt =>\n not_lt_of_ge (zpow_le_of_le hy.le hlt.le) (lt_of_le_of_lt hm (by rwa [← zpow_ofNat] at hM ))⟩\n let ⟨n, hn₁, hn₂⟩ := Int.exists_greatest_of_bdd hb he\n ⟨n, hn₁, lt_of_not_ge fun hge => not_le_of_gt (Int.lt_succ _) (hn₂ _ hge)⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : 1 < y\nN : ℕ\nhN : x⁻¹ < y ^ N\n⊢ y ^ (-↑N) < x\n[PROOFSTEP]\nrw [zpow_neg y ↑N, zpow_ofNat]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : 1 < y\nN : ℕ\nhN : x⁻¹ < y ^ N\n⊢ (y ^ N)⁻¹ < x\n[PROOFSTEP]\nexact (inv_lt hx (lt_trans (inv_pos.2 hx) hN)).1 hN\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : 1 < y\nN : ℕ\nhN : x⁻¹ < y ^ N\nhe : ∃ m, y ^ m ≤ x\nM : ℕ\nhM : x < y ^ M\nm : ℤ\nhm : y ^ m ≤ x\nhlt : ↑M < m\n⊢ x < y ^ ↑M\n[PROOFSTEP]\nrwa [← zpow_ofNat] at hM \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : 1 < y\nm : ℤ\nhle : y ^ m ≤ x⁻¹\nhlt : x⁻¹ < y ^ (m + 1)\nhyp : 0 < y\n⊢ y ^ (-(m + 1)) < x\n[PROOFSTEP]\nrwa [zpow_neg, inv_lt (zpow_pos_of_pos hyp _) hx]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : 1 < y\nm : ℤ\nhle : y ^ m ≤ x⁻¹\nhlt : x⁻¹ < y ^ (m + 1)\nhyp : 0 < y\n⊢ x ≤ y ^ (-(m + 1) + 1)\n[PROOFSTEP]\nrwa [neg_add, neg_add_cancel_right, zpow_neg, le_inv hx (zpow_pos_of_pos hyp _)]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\n⊢ ∃ n, y ^ n < x\n[PROOFSTEP]\nby_cases y_pos : y ≤ 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\ny_pos : y ≤ 0\n⊢ ∃ n, y ^ n < x\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\ny_pos : y ≤ 0\n⊢ y ^ 1 < x\n[PROOFSTEP]\nsimp only [pow_one]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\ny_pos : y ≤ 0\n⊢ y < x\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\ny_pos : ¬y ≤ 0\n⊢ ∃ n, y ^ n < x\n[PROOFSTEP]\nrw [not_le] at y_pos \n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\ny_pos : 0 < y\n⊢ ∃ n, y ^ n < x\n[PROOFSTEP]\nrcases pow_unbounded_of_one_lt x⁻¹ (one_lt_inv y_pos hy) with ⟨q, hq⟩\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\ny_pos : 0 < y\nq : ℕ\nhq : x⁻¹ < y⁻¹ ^ q\n⊢ ∃ n, y ^ n < x\n[PROOFSTEP]\nexact ⟨q, by rwa [inv_pow, inv_lt_inv hx (pow_pos y_pos _)] at hq ⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nhx : 0 < x\nhy : y < 1\ny_pos : 0 < y\nq : ℕ\nhq : x⁻¹ < y⁻¹ ^ q\n⊢ y ^ q < x\n[PROOFSTEP]\nrwa [inv_pow, inv_lt_inv hx (pow_pos y_pos _)] at hq \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nxpos : 0 < x\nhx : x ≤ 1\nypos : 0 < y\nhy : y < 1\n⊢ ∃ n, y ^ (n + 1) < x ∧ x ≤ y ^ n\n[PROOFSTEP]\nrcases exists_nat_pow_near (one_le_inv_iff.2 ⟨xpos, hx⟩) (one_lt_inv_iff.2 ⟨ypos, hy⟩) with ⟨n, hn, h'n⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nxpos : 0 < x\nhx : x ≤ 1\nypos : 0 < y\nhy : y < 1\nn : ℕ\nhn : y⁻¹ ^ n ≤ x⁻¹\nh'n : x⁻¹ < y⁻¹ ^ (n + 1)\n⊢ ∃ n, y ^ (n + 1) < x ∧ x ≤ y ^ n\n[PROOFSTEP]\nrefine' ⟨n, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nxpos : 0 < x\nhx : x ≤ 1\nypos : 0 < y\nhy : y < 1\nn : ℕ\nhn : y⁻¹ ^ n ≤ x⁻¹\nh'n : x⁻¹ < y⁻¹ ^ (n + 1)\n⊢ y ^ (n + 1) < x\n[PROOFSTEP]\nrwa [inv_pow, inv_lt_inv xpos (pow_pos ypos _)] at h'n \n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε : α\nxpos : 0 < x\nhx : x ≤ 1\nypos : 0 < y\nhy : y < 1\nn : ℕ\nhn : y⁻¹ ^ n ≤ x⁻¹\nh'n : x⁻¹ < y⁻¹ ^ (n + 1)\n⊢ x ≤ y ^ n\n[PROOFSTEP]\nrwa [inv_pow, inv_le_inv (pow_pos ypos _) xpos] at hn \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y ε x : α\nn : ℕ\nh : x < ↑n\n⊢ x < ↑↑n\n[PROOFSTEP]\nrwa [Rat.cast_coe_nat]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y ε x : α\nn : ℤ\nh : ↑n < x\n⊢ ↑↑n < x\n[PROOFSTEP]\nrwa [Rat.cast_coe_int]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\n⊢ ∃ q, x < ↑q ∧ ↑q < y\n[PROOFSTEP]\ncases' exists_nat_gt (y - x)⁻¹ with n nh\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\n⊢ ∃ q, x < ↑q ∧ ↑q < y\n[PROOFSTEP]\ncases' exists_floor (x * n) with z zh\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\n⊢ ∃ q, x < ↑q ∧ ↑q < y\n[PROOFSTEP]\nrefine' ⟨(z + 1 : ℤ) / n, _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\n⊢ x < ↑(↑(z + 1) / ↑n) ∧ ↑(↑(z + 1) / ↑n) < y\n[PROOFSTEP]\nhave n0' := (inv_pos.2 (sub_pos.2 h)).trans nh\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\n⊢ x < ↑(↑(z + 1) / ↑n) ∧ ↑(↑(z + 1) / ↑n) < y\n[PROOFSTEP]\nhave n0 := Nat.cast_pos.1 n0'\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ x < ↑(↑(z + 1) / ↑n) ∧ ↑(↑(z + 1) / ↑n) < y\n[PROOFSTEP]\nrw [Rat.cast_div_of_ne_zero, Rat.cast_coe_nat, Rat.cast_coe_int, div_lt_iff n0']\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ x < ↑(z + 1) / ↑n ∧ ↑(z + 1) < y * ↑n\ncase intro.intro.md\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑(z + 1)).den ≠ 0\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).num ≠ 0\ncase intro.intro.nd\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).den ≠ 0\n[PROOFSTEP]\nrefine' ⟨(lt_div_iff n0').2 <| (lt_iff_lt_of_le_iff_le (zh _)).1 (lt_add_one _), _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(z + 1) < y * ↑n\ncase intro.intro.md\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑(z + 1)).den ≠ 0\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).num ≠ 0\ncase intro.intro.nd\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).den ≠ 0\n[PROOFSTEP]\nrw [Int.cast_add, Int.cast_one]\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑z + 1 < y * ↑n\ncase intro.intro.md\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑(z + 1)).den ≠ 0\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).num ≠ 0\ncase intro.intro.nd\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).den ≠ 0\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (add_le_add_right ((zh _).1 le_rfl) _) _\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ x * ↑n + 1 < y * ↑n\ncase intro.intro.md\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑(z + 1)).den ≠ 0\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).num ≠ 0\ncase intro.intro.nd\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).den ≠ 0\n[PROOFSTEP]\nrwa [← lt_sub_iff_add_lt', ← sub_mul, ← div_lt_iff' (sub_pos.2 h), one_div]\n[GOAL]\ncase intro.intro.md\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑(z + 1)).den ≠ 0\n[PROOFSTEP]\nrw [Rat.coe_int_den, Nat.cast_one]\n[GOAL]\ncase intro.intro.md\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).num ≠ 0\n[PROOFSTEP]\nintro H\n[GOAL]\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\nH : ↑(↑n).num = 0\n⊢ False\n[PROOFSTEP]\nrw [Rat.coe_nat_num, Int.cast_ofNat, Nat.cast_eq_zero] at H \n[GOAL]\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\nH : n = 0\n⊢ False\n[PROOFSTEP]\nsubst H\n[GOAL]\ncase intro.intro.nn\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nz : ℤ\nnh : (y - x)⁻¹ < ↑0\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑0\nn0' : 0 < ↑0\nn0 : 0 < 0\n⊢ False\n[PROOFSTEP]\ncases n0\n[GOAL]\ncase intro.intro.nd\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ ↑(↑n).den ≠ 0\n[PROOFSTEP]\nrw [Rat.coe_nat_den, Nat.cast_one]\n[GOAL]\ncase intro.intro.nd\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y✝ ε x y : α\nh : x < y\nn : ℕ\nnh : (y - x)⁻¹ < ↑n\nz : ℤ\nzh : ∀ (z_1 : ℤ), z_1 ≤ z ↔ ↑z_1 ≤ x * ↑n\nn0' : 0 < ↑n\nn0 : 0 < n\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε✝ ε : α\nhε : 0 < ε\n⊢ ∃ n, 1 / (↑n + 1) < ε\n[PROOFSTEP]\ncases' exists_nat_gt (1 / ε) with n hn\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε✝ ε : α\nhε : 0 < ε\nn : ℕ\nhn : 1 / ε < ↑n\n⊢ ∃ n, 1 / (↑n + 1) < ε\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε✝ ε : α\nhε : 0 < ε\nn : ℕ\nhn : 1 / ε < ↑n\n⊢ 1 / (↑n + 1) < ε\n[PROOFSTEP]\nrw [div_lt_iff, ← div_lt_iff' hε]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε✝ ε : α\nhε : 0 < ε\nn : ℕ\nhn : 1 / ε < ↑n\n⊢ 1 / ε < ↑n + 1\n[PROOFSTEP]\napply hn.trans\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε✝ ε : α\nhε : 0 < ε\nn : ℕ\nhn : 1 / ε < ↑n\n⊢ ↑n < ↑n + 1\n[PROOFSTEP]\nsimp [zero_lt_one]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx y ε✝ ε : α\nhε : 0 < ε\nn : ℕ\nhn : 1 / ε < ↑n\n⊢ 0 < ↑n + 1\n[PROOFSTEP]\nexact n.cast_add_one_pos\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\nx✝ y ε x : α\nx0 : 0 < x\n⊢ ∃ q, 0 < q ∧ ↑q < x\n[PROOFSTEP]\nsimpa only [Rat.cast_pos] using exists_rat_btwn x0\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nH : ∀ (x : α), ∃ n, x < ↑n\nx y : α\ny0 : 0 < y\nn : ℕ\nh : x / y < ↑n\n⊢ x < n • y\n[PROOFSTEP]\nrwa [div_lt_iff y0, ← nsmul_eq_mul] at h \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\n⊢ (∀ (x : α), ∃ n, x < ↑n) → Archimedean α\n[PROOFSTEP]\nrw [archimedean_iff_nat_lt]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\n⊢ (∀ (x : α), ∃ n, x < ↑n) → ∀ (x : α), ∃ n, x < ↑n\n[PROOFSTEP]\nintro h x\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nh : ∀ (x : α), ∃ n, x < ↑n\nx : α\n⊢ ∃ n, x < ↑n\n[PROOFSTEP]\nobtain ⟨n, h⟩ := h x\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\nh✝ : ∀ (x : α), ∃ n, x < ↑n\nx : α\nn : ℤ\nh : x < ↑n\n⊢ ∃ n, x < ↑n\n[PROOFSTEP]\nrefine' ⟨n.toNat, h.trans_le _⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\nh✝ : ∀ (x : α), ∃ n, x < ↑n\nx : α\nn : ℤ\nh : x < ↑n\n⊢ ↑n ≤ ↑(toNat n)\n[PROOFSTEP]\nexact_mod_cast Int.self_le_toNat _\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nH : ∀ (x : α), ∃ q, x < ↑q\nx : α\nq : ℚ\nh : x < ↑q\n⊢ ↑q ≤ ↑⌈q⌉₊\n[PROOFSTEP]\nsimpa only [Rat.cast_coe_nat] using (@Rat.cast_le α _ _ _).2 (Nat.le_ceil _)\n[GOAL]\nα : Type u_1\nn m : ℕ\nm0 : 0 < m\n⊢ n ≤ n • m\n[PROOFSTEP]\nrw [← mul_one n, smul_eq_mul, mul_assoc, one_mul m]\n[GOAL]\nα : Type u_1\nn m : ℕ\nm0 : 0 < m\n⊢ n * 1 ≤ n * m\n[PROOFSTEP]\nexact Nat.mul_le_mul_left n (by linarith)\n[GOAL]\nα : Type u_1\nn m : ℕ\nm0 : 0 < m\n⊢ 1 ≤ m\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\nn m : ℤ\nm0 : 0 < m\n⊢ ↑(toNat n) ≤ toNat n • m\n[PROOFSTEP]\nsimpa only [nsmul_eq_mul, zero_add, mul_one] using\n mul_le_mul_of_nonneg_left (Int.add_one_le_iff.2 m0) (Int.ofNat_zero_le n.toNat)\n[GOAL]\nα : Type u_1\nq : ℚ\n⊢ q ≤ ↑q\n[PROOFSTEP]\nrw [Rat.cast_id]\n[GOAL]\nα✝ : Type u_1\nα : Type ?u.91487\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\n⊢ Archimedean α\n[PROOFSTEP]\nrw [archimedean_iff_int_le]\n[GOAL]\nα✝ : Type u_1\nα : Type ?u.91487\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\n⊢ ∀ (x : α), ∃ n, x ≤ ↑n\n[PROOFSTEP]\nexact fun x => ⟨⌈x⌉, Int.le_ceil x⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Archimedean", "llama_tokens": 16687, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8615382165412809, "lm_q2_score": 0.6992544210587585, "lm_q1q2_score": 0.6024344068275687}} {"text": "[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : OrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝¹ : OrderedAddCommMonoid β := orderedAddCommMonoid f hf zero add nsmul\nsrc✝ : Semiring β := Injective.semiring f hf zero one add mul nsmul npow nat_cast\n⊢ f 0 ≤ f 1\n[PROOFSTEP]\nsimp only [zero, one, zero_le_one]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : OrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝¹ : OrderedAddCommMonoid β := orderedAddCommMonoid f hf zero add nsmul\nsrc✝ : Semiring β := Injective.semiring f hf zero one add mul nsmul npow nat_cast\na b c : β\nh : a ≤ b\nhc : 0 ≤ c\n⊢ f (c * a) ≤ f (c * b)\n[PROOFSTEP]\nrw [mul, mul]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : OrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝¹ : OrderedAddCommMonoid β := orderedAddCommMonoid f hf zero add nsmul\nsrc✝ : Semiring β := Injective.semiring f hf zero one add mul nsmul npow nat_cast\na b c : β\nh : a ≤ b\nhc : 0 ≤ c\n⊢ f c * f a ≤ f c * f b\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left h _\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : OrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝¹ : OrderedAddCommMonoid β := orderedAddCommMonoid f hf zero add nsmul\nsrc✝ : Semiring β := Injective.semiring f hf zero one add mul nsmul npow nat_cast\na b c : β\nh : a ≤ b\nhc : 0 ≤ c\n⊢ 0 ≤ f c\n[PROOFSTEP]\nrwa [← zero]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : OrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝¹ : OrderedAddCommMonoid β := orderedAddCommMonoid f hf zero add nsmul\nsrc✝ : Semiring β := Injective.semiring f hf zero one add mul nsmul npow nat_cast\na b c : β\nh : a ≤ b\nhc : 0 ≤ c\n⊢ f (a * c) ≤ f (b * c)\n[PROOFSTEP]\nrw [mul, mul]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : OrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝¹ : OrderedAddCommMonoid β := orderedAddCommMonoid f hf zero add nsmul\nsrc✝ : Semiring β := Injective.semiring f hf zero one add mul nsmul npow nat_cast\na b c : β\nh : a ≤ b\nhc : 0 ≤ c\n⊢ f a * f c ≤ f b * f c\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right h _\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : OrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝¹ : OrderedAddCommMonoid β := orderedAddCommMonoid f hf zero add nsmul\nsrc✝ : Semiring β := Injective.semiring f hf zero one add mul nsmul npow nat_cast\na b c : β\nh : a ≤ b\nhc : 0 ≤ c\n⊢ 0 ≤ f c\n[PROOFSTEP]\nrwa [← zero]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝¹¹ : OrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ f 0 ≤ f (a * b)\n[PROOFSTEP]\nrw [zero, mul]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝¹¹ : OrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ 0 ≤ f a * f b\n[PROOFSTEP]\napply mul_nonneg\n[GOAL]\ncase ha\nα : Type u\nβ : Type u_1\ninst✝¹¹ : OrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ 0 ≤ f a\n[PROOFSTEP]\nrwa [← zero]\n[GOAL]\ncase hb\nα : Type u\nβ : Type u_1\ninst✝¹¹ : OrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ 0 ≤ f b\n[PROOFSTEP]\nrwa [← zero]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : StrictOrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝² : OrderedCancelAddCommMonoid β := orderedCancelAddCommMonoid f hf zero add nsmul\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Nontrivial β := pullback_nonzero f zero one\na b c : β\nh : a < b\nhc : 0 < c\n⊢ f (c * a) < f (c * b)\n[PROOFSTEP]\nsimpa only [mul, zero] using mul_lt_mul_of_pos_left ‹f a < f b› (by rwa [← zero])\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : StrictOrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝² : OrderedCancelAddCommMonoid β := orderedCancelAddCommMonoid f hf zero add nsmul\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Nontrivial β := pullback_nonzero f zero one\na b c : β\nh : a < b\nhc : 0 < c\n⊢ 0 < f c\n[PROOFSTEP]\nrwa [← zero]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : StrictOrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝² : OrderedCancelAddCommMonoid β := orderedCancelAddCommMonoid f hf zero add nsmul\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Nontrivial β := pullback_nonzero f zero one\na b c : β\nh : a < b\nhc : 0 < c\n⊢ f (a * c) < f (b * c)\n[PROOFSTEP]\nsimpa only [mul, zero] using mul_lt_mul_of_pos_right ‹f a < f b› (by rwa [← zero])\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁷ : StrictOrderedSemiring α\ninst✝⁶ : Zero β\ninst✝⁵ : One β\ninst✝⁴ : Add β\ninst✝³ : Mul β\ninst✝² : Pow β ℕ\ninst✝¹ : SMul ℕ β\ninst✝ : NatCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nsrc✝² : OrderedCancelAddCommMonoid β := orderedCancelAddCommMonoid f hf zero add nsmul\nsrc✝¹ : OrderedSemiring β := Injective.orderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Nontrivial β := pullback_nonzero f zero one\na b c : β\nh : a < b\nhc : 0 < c\n⊢ 0 < f c\n[PROOFSTEP]\nrwa [← zero]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝¹¹ : StrictOrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : StrictOrderedSemiring β := Injective.strictOrderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\na0 : 0 < a\nb0 : 0 < b\n⊢ f 0 < f (a * b)\n[PROOFSTEP]\nrw [zero, mul]\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝¹¹ : StrictOrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : StrictOrderedSemiring β := Injective.strictOrderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\na0 : 0 < a\nb0 : 0 < b\n⊢ 0 < f a * f b\n[PROOFSTEP]\napply mul_pos\n[GOAL]\ncase ha\nα : Type u\nβ : Type u_1\ninst✝¹¹ : StrictOrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : StrictOrderedSemiring β := Injective.strictOrderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\na0 : 0 < a\nb0 : 0 < b\n⊢ 0 < f a\n[PROOFSTEP]\nrwa [← zero]\n[GOAL]\ncase hb\nα : Type u\nβ : Type u_1\ninst✝¹¹ : StrictOrderedRing α\ninst✝¹⁰ : Zero β\ninst✝⁹ : One β\ninst✝⁸ : Add β\ninst✝⁷ : Mul β\ninst✝⁶ : Neg β\ninst✝⁵ : Sub β\ninst✝⁴ : SMul ℕ β\ninst✝³ : SMul ℤ β\ninst✝² : Pow β ℕ\ninst✝¹ : NatCast β\ninst✝ : IntCast β\nf : β → α\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : β), f (x + y) = f x + f y\nmul : ∀ (x y : β), f (x * y) = f x * f y\nneg : ∀ (x : β), f (-x) = -f x\nsub : ∀ (x y : β), f (x - y) = f x - f y\nnsmul : ∀ (x : β) (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : β) (n : ℤ), f (n • x) = n • f x\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nsrc✝¹ : StrictOrderedSemiring β := Injective.strictOrderedSemiring f hf zero one add mul nsmul npow nat_cast\nsrc✝ : Ring β := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na b : β\na0 : 0 < a\nb0 : 0 < b\n⊢ 0 < f b\n[PROOFSTEP]\nrwa [← zero]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Ring.InjSurj", "llama_tokens": 8492, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8615382165412808, "lm_q2_score": 0.6992544210587585, "lm_q1q2_score": 0.6024344068275685}} {"text": "[GOAL]\nα✝ α : Type u\ninst✝ : OrderedCommGroup α\na b c : α\nbc : a * b ≤ a * c\n⊢ b ≤ c\n[PROOFSTEP]\nsimpa using mul_le_mul_left' bc a⁻¹\n[GOAL]\nα✝ α : Type u\ninst✝ : OrderedCommGroup α\na b c : α\nbc : swap (fun x x_1 => x * x_1) a b ≤ swap (fun x x_1 => x * x_1) a c\n⊢ b ≤ c\n[PROOFSTEP]\nsimpa using mul_le_mul_right' bc a⁻¹\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a⁻¹ ≤ 1 ↔ 1 ≤ a\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left a]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * a⁻¹ ≤ a * 1 ↔ 1 ≤ a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ 1 ≤ a⁻¹ ↔ a ≤ 1\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left a]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * 1 ≤ a * a⁻¹ ↔ a ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ b ≤ a⁻¹ * c ↔ a * b ≤ c\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left a]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * b ≤ a * (a⁻¹ * c) ↔ a * b ≤ c\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ b⁻¹ * a ≤ c ↔ a ≤ b * c\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left b, mul_inv_cancel_left]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * a⁻¹ ≤ a * b ↔ 1 ≤ a * b\n[PROOFSTEP]\nrw [mul_inv_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ b * a ≤ b * b⁻¹ ↔ b * a ≤ 1\n[PROOFSTEP]\nrw [mul_inv_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ 1 ≤ b⁻¹ * a ↔ b ≤ a\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left b, mul_one, mul_inv_cancel_left]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ b ≤ a * 1 ↔ b ≤ a\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ 1 < a⁻¹ ↔ a < 1\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_left a, mul_inv_self, mul_one]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a⁻¹ < 1 ↔ 1 < a\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_left a, mul_inv_self, mul_one]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ b < a⁻¹ * c ↔ a * b < c\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_left a]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a * b < a * (a⁻¹ * c) ↔ a * b < c\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ b⁻¹ * a < c ↔ a < b * c\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_left b, mul_inv_cancel_left]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a * a⁻¹ < a * b ↔ 1 < a * b\n[PROOFSTEP]\nrw [mul_inv_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ b * a < b * b⁻¹ ↔ b * a < 1\n[PROOFSTEP]\nrw [mul_inv_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ 1 < b⁻¹ * a ↔ b < a\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_left b, mul_one, mul_inv_cancel_left]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ b < a * 1 ↔ b < a\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a⁻¹ ≤ 1 ↔ 1 ≤ a\n[PROOFSTEP]\nrw [← mul_le_mul_iff_right a]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a⁻¹ * a ≤ 1 * a ↔ 1 ≤ a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ 1 ≤ a⁻¹ ↔ a ≤ 1\n[PROOFSTEP]\nrw [← mul_le_mul_iff_right a]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ 1 * a ≤ a⁻¹ * a ↔ a ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a⁻¹ * a ≤ b * a ↔ 1 ≤ b * a\n[PROOFSTEP]\nrw [inv_mul_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a * b ≤ b⁻¹ * b ↔ a * b ≤ 1\n[PROOFSTEP]\nrw [inv_mul_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a * b⁻¹ * b ≤ c * b ↔ a ≤ c * b\n[PROOFSTEP]\nrw [inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ c * b ≤ a * b⁻¹ * b ↔ c * b ≤ a\n[PROOFSTEP]\nrw [inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a ≤ 1 * b ↔ a ≤ b\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ 1 ≤ a * b⁻¹ ↔ b ≤ a\n[PROOFSTEP]\nrw [← mul_le_mul_iff_right b, one_mul, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ b ≤ 1 * a ↔ b ≤ a\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a⁻¹ < 1 ↔ 1 < a\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right a, inv_mul_self, one_mul]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ 1 < a⁻¹ ↔ a < 1\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right a, inv_mul_self, one_mul]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a⁻¹ * a < b * a ↔ 1 < b * a\n[PROOFSTEP]\nrw [inv_mul_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a * b < b⁻¹ * b ↔ a * b < 1\n[PROOFSTEP]\nrw [inv_mul_self]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a * b⁻¹ < c ↔ a < c * b\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right b, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ c * b < a * b⁻¹ * b ↔ c * b < a\n[PROOFSTEP]\nrw [inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a * b⁻¹ < 1 ↔ a < b\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right b, inv_mul_cancel_right, one_mul]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ 1 < a * b⁻¹ ↔ b < a\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right b, one_mul, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ b < 1 * a ↔ b < a\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LE α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a⁻¹ ≤ b⁻¹ ↔ b ≤ a\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left a, ← mul_le_mul_iff_right b]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LE α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * a⁻¹ * b ≤ a * b⁻¹ * b ↔ b ≤ a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LE α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * b⁻¹ ≤ d⁻¹ * c ↔ d * a ≤ c * b\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left d, ← mul_le_mul_iff_right b, mul_inv_cancel_left, mul_assoc, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LE α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c d a b : α\n⊢ a / b ≤ a ↔ 1 ≤ b\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LE α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c d a b : α\n⊢ a ≤ a / b ↔ b ≤ 1\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a⁻¹ < b⁻¹ ↔ b < a\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_left a, ← mul_lt_mul_iff_right b]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a⁻¹ < b ↔ b⁻¹ < a\n[PROOFSTEP]\nrw [← inv_lt_inv_iff, inv_inv]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a < b⁻¹ ↔ b < a⁻¹\n[PROOFSTEP]\nrw [← inv_lt_inv_iff, inv_inv]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a * b⁻¹ < d⁻¹ * c ↔ d * a < c * b\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_left d, ← mul_lt_mul_iff_right b, mul_inv_cancel_left, mul_assoc, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na✝ b✝ c d a b : α\n⊢ a / b < a ↔ 1 < b\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ c⁻¹ * a ≤ b ↔ a ≤ b * c\n[PROOFSTEP]\nrw [inv_mul_le_iff_le_mul, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * b⁻¹ ≤ c ↔ a ≤ b * c\n[PROOFSTEP]\nrw [← inv_mul_le_iff_le_mul, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a * b⁻¹ ≤ c * d⁻¹ ↔ a * d ≤ c * b\n[PROOFSTEP]\nrw [mul_comm c, mul_inv_le_inv_mul_iff, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ c⁻¹ * a < b ↔ a < b * c\n[PROOFSTEP]\nrw [inv_mul_lt_iff_lt_mul, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a * b⁻¹ < c ↔ a < b * c\n[PROOFSTEP]\nrw [← inv_mul_lt_iff_lt_mul, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a * b⁻¹ < c * d⁻¹ ↔ a * d < c * b\n[PROOFSTEP]\nrw [mul_comm c, mul_inv_lt_inv_mul_iff, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c✝ d c : α\n⊢ a / c ≤ b / c ↔ a ≤ b\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using mul_le_mul_iff_right _\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ 1 ≤ a / b ↔ b ≤ a\n[PROOFSTEP]\nrw [← mul_le_mul_iff_right b, one_mul, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a / b ≤ 1 ↔ a ≤ b\n[PROOFSTEP]\nrw [← mul_le_mul_iff_right b, one_mul, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a ≤ c / b ↔ a * b ≤ c\n[PROOFSTEP]\nrw [← mul_le_mul_iff_right b, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a / c ≤ b ↔ a ≤ b * c\n[PROOFSTEP]\nrw [← mul_le_mul_iff_right c, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LE α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\n⊢ a / b ≤ a / c ↔ c ≤ b\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, ← mul_le_mul_iff_left a⁻¹, inv_mul_cancel_left, inv_mul_cancel_left, inv_le_inv_iff]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a / b ≤ c / d ↔ a * d ≤ c * b\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using mul_inv_le_mul_inv_iff'\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ b ≤ c / a ↔ a * b ≤ c\n[PROOFSTEP]\nrw [le_div_iff_mul_le, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a / b ≤ c ↔ a ≤ b * c\n[PROOFSTEP]\nrw [div_le_iff_le_mul, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\n⊢ a⁻¹ ≤ b / c ↔ c ≤ a * b\n[PROOFSTEP]\nrw [inv_le_div_iff_le_mul, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : Preorder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\nhab : a ≤ b\nhcd : c ≤ d\n⊢ a / d ≤ b / c\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, mul_comm b, mul_inv_le_inv_mul_iff, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : Preorder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c d : α\nhab : a ≤ b\nhcd : c ≤ d\n⊢ a * c ≤ b * d\n[PROOFSTEP]\nexact mul_le_mul' hab hcd\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c✝ d c : α\n⊢ a / c < b / c ↔ a < b\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using mul_lt_mul_iff_right _\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ 1 < a / b ↔ b < a\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right b, one_mul, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a / b < 1 ↔ a < b\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right b, one_mul, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a < c / b ↔ a * b < c\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right b, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a / c < b ↔ a < b * c\n[PROOFSTEP]\nrw [← mul_lt_mul_iff_right c, div_eq_mul_inv, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na✝ b c a : α\n⊢ a / b < a / c ↔ c < b\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, ← mul_lt_mul_iff_left a⁻¹, inv_mul_cancel_left, inv_mul_cancel_left, inv_lt_inv_iff]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LT α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c : α\n⊢ a⁻¹ < b / c ↔ c < a * b\n[PROOFSTEP]\nrw [div_eq_mul_inv, lt_mul_inv_iff_mul_lt, inv_mul_lt_iff_lt_mul]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a / b < c / d ↔ a * d < c * b\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using mul_inv_lt_mul_inv_iff'\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ b < c / a ↔ a * b < c\n[PROOFSTEP]\nrw [lt_div_iff_mul_lt, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\n⊢ a / b < c ↔ a < b * c\n[PROOFSTEP]\nrw [div_lt_iff_lt_mul, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : Preorder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\nhab : a < b\nhcd : c < d\n⊢ a / d < b / c\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, mul_comm b, mul_inv_lt_inv_mul_iff, mul_comm]\n[GOAL]\nα : Type u\ninst✝² : CommGroup α\ninst✝¹ : Preorder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1\na b c d : α\nhab : a < b\nhcd : c < d\n⊢ a * c < b * d\n[PROOFSTEP]\nexact mul_lt_mul_of_lt_of_lt hab hcd\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ cmp (a / b) 1 = cmp a b\n[PROOFSTEP]\nrw [← cmp_mul_right' _ _ b, one_mul, div_mul_cancel']\n[GOAL]\nα : Type u\ninst✝² : Group α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nh : ∀ (ε : α), 1 < ε → a < b * ε\nh₁ : b < a\n⊢ a < a\n[PROOFSTEP]\nsimpa using h _ (lt_inv_mul_iff_lt.mpr h₁)\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\n⊢ a / b ≤ a⁻¹ * b ↔ a ≤ b\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_inv_le_inv_mul_iff]\n[GOAL]\nα : Type u\ninst✝³ : Group α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\n⊢ a * a ≤ b * b ↔ a ≤ b\n[PROOFSTEP]\nexact ⟨fun h => not_lt.mp fun k => not_lt.mpr h (mul_lt_mul_of_lt_of_lt k k), fun h => mul_le_mul' h h⟩\n[GOAL]\nα✝ : Type u\ninst✝⁵ : Group α✝\ninst✝⁴ : LinearOrder α✝\ninst✝³ : CovariantClass α✝ α✝ (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α✝\nα : Type u_1\ninst✝² : CommGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a / b ≤ b / a ↔ a ≤ b\n[PROOFSTEP]\nrw [div_eq_mul_inv b, mul_comm]\n[GOAL]\nα✝ : Type u\ninst✝⁵ : Group α✝\ninst✝⁴ : LinearOrder α✝\ninst✝³ : CovariantClass α✝ α✝ (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α✝\nα : Type u_1\ninst✝² : CommGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a / b ≤ a⁻¹ * b ↔ a ≤ b\n[PROOFSTEP]\nexact div_le_inv_mul_iff\n[GOAL]\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\n⊢ ∃ a, 1 < a\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := Decidable.exists_ne (1 : α)\n[GOAL]\ncase intro\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\ny : α\nhy : y ≠ 1\n⊢ ∃ a, 1 < a\n[PROOFSTEP]\nobtain h | h := hy.lt_or_lt\n[GOAL]\ncase intro.inl\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\ny : α\nhy : y ≠ 1\nh : y < 1\n⊢ ∃ a, 1 < a\n[PROOFSTEP]\nexact ⟨y⁻¹, one_lt_inv'.mpr h⟩\n[GOAL]\ncase intro.inr\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\ny : α\nhy : y ≠ 1\nh : 1 < y\n⊢ ∃ a, 1 < a\n[PROOFSTEP]\nexact ⟨y, h⟩\n[GOAL]\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\n⊢ ∀ (a : α), ∃ b, a < b\n[PROOFSTEP]\nobtain ⟨y, hy⟩ : ∃ a : α, 1 < a := exists_one_lt'\n[GOAL]\ncase intro\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\ny : α\nhy : 1 < y\n⊢ ∀ (a : α), ∃ b, a < b\n[PROOFSTEP]\nexact fun a => ⟨a * y, lt_mul_of_one_lt_right' a hy⟩\n[GOAL]\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\n⊢ ∀ (a : α), ∃ b, b < a\n[PROOFSTEP]\nobtain ⟨y, hy⟩ : ∃ a : α, 1 < a := exists_one_lt'\n[GOAL]\ncase intro\nα : Type u\ninst✝¹ : LinearOrderedCommGroup α\na b c : α\ninst✝ : Nontrivial α\ny : α\nhy : 1 < y\n⊢ ∀ (a : α), ∃ b, b < a\n[PROOFSTEP]\nexact fun a => ⟨a / y, (div_lt_self_iff a).mpr hy⟩\n[GOAL]\nα✝ : Type u\nα : Type u_1\ninst✝ : AddCommGroup α\nC : PositiveCone α\nsrc✝ : AddCommGroup α := inst✝\na : α\n⊢ a ≤ a\n[PROOFSTEP]\nsimp [C.zero_nonneg]\n[GOAL]\nα✝ : Type u\nα : Type u_1\ninst✝ : AddCommGroup α\nC : PositiveCone α\nsrc✝ : AddCommGroup α := inst✝\na b c : α\nnab : a ≤ b\nnbc : b ≤ c\n⊢ a ≤ c\n[PROOFSTEP]\nsimpa [← sub_add_sub_cancel] using C.add_nonneg nbc nab\n[GOAL]\nα✝ : Type u\nα : Type u_1\ninst✝ : AddCommGroup α\nC : PositiveCone α\nsrc✝ : AddCommGroup α := inst✝\na b : α\n⊢ a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nsimp [C.pos_iff]\n[GOAL]\nα✝ : Type u\nα : Type u_1\ninst✝ : AddCommGroup α\nC : PositiveCone α\nsrc✝ : AddCommGroup α := inst✝\na b : α\nnab : a ≤ b\nnba : b ≤ a\n⊢ PositiveCone.nonneg C (-(a - b))\n[PROOFSTEP]\nrwa [neg_sub]\n[GOAL]\nα✝ : Type u\nα : Type u_1\ninst✝ : AddCommGroup α\nC : PositiveCone α\nsrc✝ : AddCommGroup α := inst✝\na b : α\nnab : a ≤ b\nc : α\n⊢ c + a ≤ c + b\n[PROOFSTEP]\nsimpa using nab\n[GOAL]\nα✝ : Type u\nα : Type u_1\ninst✝ : AddCommGroup α\nC : TotalPositiveCone α\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\na b : α\n⊢ a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nsimpa [neg_sub] using C.nonneg_total (b - a)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Group.Defs", "llama_tokens": 12526, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104788995148791, "lm_q2_score": 0.743168019989179, "lm_q1q2_score": 0.6023219989954814}} {"text": "[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nr : (i : I) → Semiring (f i)\nm : (i : I) → AddCommMonoid (g i)\ninst✝ : (i : I) → Module (f i) (g i)\n⊢ ∀ (r_1 s : (i : I) → f i) (x : (i : I) → g i), (r_1 + s) • x = r_1 • x + s • x\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nr : (i : I) → Semiring (f i)\nm : (i : I) → AddCommMonoid (g i)\ninst✝ : (i : I) → Module (f i) (g i)\nr✝ s✝ : (i : I) → f i\nx✝ : (i : I) → g i\n⊢ (r✝ + s✝) • x✝ = r✝ • x✝ + s✝ • x✝\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nr : (i : I) → Semiring (f i)\nm : (i : I) → AddCommMonoid (g i)\ninst✝ : (i : I) → Module (f i) (g i)\nr✝ s✝ : (i : I) → f i\nx✝¹ : (i : I) → g i\nx✝ : I\n⊢ ((r✝ + s✝) • x✝¹) x✝ = (r✝ • x✝¹ + s✝ • x✝¹) x✝\n[PROOFSTEP]\napply add_smul\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nr : (i : I) → Semiring (f i)\nm : (i : I) → AddCommMonoid (g i)\ninst✝ : (i : I) → Module (f i) (g i)\n⊢ ∀ (x : (i : I) → g i), 0 • x = 0\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nr : (i : I) → Semiring (f i)\nm : (i : I) → AddCommMonoid (g i)\ninst✝ : (i : I) → Module (f i) (g i)\nx✝ : (i : I) → g i\n⊢ 0 • x✝ = 0\n[PROOFSTEP]\next1\n -- Porting note: not sure why `apply zero_smul` fails here.\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nr : (i : I) → Semiring (f i)\nm : (i : I) → AddCommMonoid (g i)\ninst✝ : (i : I) → Module (f i) (g i)\nx✝¹ : (i : I) → g i\nx✝ : I\n⊢ (0 • x✝¹) x✝ = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nrw [zero_smul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.Pi", "llama_tokens": 982, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.865224072151174, "lm_q2_score": 0.6959583187272712, "lm_q1q2_score": 0.6021598905766943}} {"text": "[GOAL]\np : ℕ\nh : 1 < p\n⊢ 0 < p ^ 0\n[PROOFSTEP]\nsimp [zero_lt_one]\n[GOAL]\nn : ℕ\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn m : ℕ\nh : 0 < m\n⊢ 1 ≤ m ^ n\n[PROOFSTEP]\nrw [← one_pow n]\n[GOAL]\nn m : ℕ\nh : 0 < m\n⊢ 1 ^ n ≤ m ^ n\n[PROOFSTEP]\nexact Nat.pow_le_pow_of_le_left h n\n[GOAL]\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn m : ℕ\nh₀ : 0 < n\nh₁ : 1 < m\n⊢ 1 < m ^ n\n[PROOFSTEP]\nrw [← one_pow n]\n[GOAL]\nn m : ℕ\nh₀ : 0 < n\nh₁ : 1 < m\n⊢ 1 ^ n < m ^ n\n[PROOFSTEP]\nexact pow_lt_pow_of_lt_left h₁ h₀\n[GOAL]\nk n : ℕ\nh : 0 ≠ k\n⊢ 1 < n ^ k ↔ 1 < n\n[PROOFSTEP]\nrcases n with (rfl | n)\n[GOAL]\ncase zero\nk : ℕ\nh : 0 ≠ k\n⊢ 1 < zero ^ k ↔ 1 < zero\n[PROOFSTEP]\ncases k\n[GOAL]\ncase zero.zero\nh : 0 ≠ zero\n⊢ 1 < zero ^ zero ↔ 1 < zero\n[PROOFSTEP]\nsimp [zero_pow_eq]\n[GOAL]\ncase zero.succ\nn✝ : ℕ\nh : 0 ≠ succ n✝\n⊢ 1 < zero ^ succ n✝ ↔ 1 < zero\n[PROOFSTEP]\nsimp [zero_pow_eq]\n[GOAL]\ncase succ\nk : ℕ\nh : 0 ≠ k\nn : ℕ\n⊢ 1 < succ n ^ k ↔ 1 < succ n\n[PROOFSTEP]\nrcases n with (rfl | n)\n[GOAL]\ncase succ.zero\nk : ℕ\nh : 0 ≠ k\n⊢ 1 < succ zero ^ k ↔ 1 < succ zero\n[PROOFSTEP]\nrw [← Nat.one_eq_succ_zero, one_pow]\n[GOAL]\ncase succ.succ\nk : ℕ\nh : 0 ≠ k\nn : ℕ\n⊢ 1 < succ (succ n) ^ k ↔ 1 < succ (succ n)\n[PROOFSTEP]\nrefine' ⟨fun _ => one_lt_succ_succ n, fun _ => _⟩\n[GOAL]\ncase succ.succ\nk : ℕ\nh : 0 ≠ k\nn : ℕ\nx✝ : 1 < succ (succ n)\n⊢ 1 < succ (succ n) ^ k\n[PROOFSTEP]\ninduction' k with k hk\n[GOAL]\ncase succ.succ.zero\nk : ℕ\nh✝ : 0 ≠ k\nn : ℕ\nx✝ : 1 < succ (succ n)\nh : 0 ≠ zero\n⊢ 1 < succ (succ n) ^ zero\n[PROOFSTEP]\nexact absurd rfl h\n[GOAL]\ncase succ.succ.succ\nk✝ : ℕ\nh✝ : 0 ≠ k✝\nn : ℕ\nx✝ : 1 < succ (succ n)\nk : ℕ\nhk : 0 ≠ k → 1 < succ (succ n) ^ k\nh : 0 ≠ succ k\n⊢ 1 < succ (succ n) ^ succ k\n[PROOFSTEP]\nrcases k with (rfl | k)\n[GOAL]\ncase succ.succ.succ.zero\nk : ℕ\nh✝ : 0 ≠ k\nn : ℕ\nx✝ : 1 < succ (succ n)\nhk : 0 ≠ zero → 1 < succ (succ n) ^ zero\nh : 0 ≠ succ zero\n⊢ 1 < succ (succ n) ^ succ zero\n[PROOFSTEP]\nsimp [← Nat.one_eq_succ_zero]\n[GOAL]\ncase succ.succ.succ.succ\nk✝ : ℕ\nh✝ : 0 ≠ k✝\nn : ℕ\nx✝ : 1 < succ (succ n)\nk : ℕ\nhk : 0 ≠ succ k → 1 < succ (succ n) ^ succ k\nh : 0 ≠ succ (succ k)\n⊢ 1 < succ (succ n) ^ succ (succ k)\n[PROOFSTEP]\nrw [pow_succ']\n[GOAL]\ncase succ.succ.succ.succ\nk✝ : ℕ\nh✝ : 0 ≠ k✝\nn : ℕ\nx✝ : 1 < succ (succ n)\nk : ℕ\nhk : 0 ≠ succ k → 1 < succ (succ n) ^ succ k\nh : 0 ≠ succ (succ k)\n⊢ 1 < succ (succ n) * succ (succ n) ^ (k + 1)\n[PROOFSTEP]\nexact one_lt_mul (one_lt_succ_succ _).le (hk (succ_ne_zero k).symm)\n[GOAL]\nn : ℕ\nh₀ : 0 < n\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn a q : ℕ\na0 : 0 < a\nq1 : 1 < q\n⊢ n * q < a * q ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ, ← mul_assoc, mul_lt_mul_right (zero_lt_one.trans q1)]\n[GOAL]\nn a q : ℕ\na0 : 0 < a\nq1 : 1 < q\n⊢ n < a * q ^ n\n[PROOFSTEP]\nexact lt_mul_of_one_le_of_lt (Nat.succ_le_iff.mpr a0) (Nat.lt_pow_self q1 n)\n[GOAL]\na b : ℕ\n⊢ a ^ 2 - b ^ 2 = (a + b) * (a - b)\n[PROOFSTEP]\nrw [sq, sq]\n[GOAL]\na b : ℕ\n⊢ a * a - b * b = (a + b) * (a - b)\n[PROOFSTEP]\nexact Nat.mul_self_sub_mul_self_eq a b\n[GOAL]\na b n : ℕ\n⊢ a ^ b % n = (a % n) ^ b % n\n[PROOFSTEP]\ninduction' b with b ih\n[GOAL]\ncase zero\na n : ℕ\n⊢ a ^ zero % n = (a % n) ^ zero % n\ncase succ a n b : ℕ ih : a ^ b % n = (a % n) ^ b % n ⊢ a ^ succ b % n = (a % n) ^ succ b % n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\na n b : ℕ\nih : a ^ b % n = (a % n) ^ b % n\n⊢ a ^ succ b % n = (a % n) ^ succ b % n\n[PROOFSTEP]\nsimp [pow_succ, Nat.mul_mod, ih]\n[GOAL]\nb w m : ℕ\n⊢ m % b ^ succ w = b * (m / b % b ^ w) + m % b\n[PROOFSTEP]\nby_cases b_h : b = 0\n[GOAL]\ncase pos\nb w m : ℕ\nb_h : b = 0\n⊢ m % b ^ succ w = b * (m / b % b ^ w) + m % b\n[PROOFSTEP]\nsimp [b_h, pow_succ]\n[GOAL]\ncase neg\nb w m : ℕ\nb_h : ¬b = 0\n⊢ m % b ^ succ w = b * (m / b % b ^ w) + m % b\n[PROOFSTEP]\nhave b_pos := Nat.pos_of_ne_zero b_h\n[GOAL]\ncase neg\nb w m : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\n⊢ m % b ^ succ w = b * (m / b % b ^ w) + m % b\n[PROOFSTEP]\ninduction m using Nat.strong_induction_on with\n| h p IH =>\n cases' lt_or_ge p (b ^ succ w) with h₁ h₁\n ·\n -- base case: p < b^succ w\n have h₂ : p / b < b ^ w := by\n rw [div_lt_iff_lt_mul b_pos]\n simpa [pow_succ] using h₁\n rw [mod_eq_of_lt h₁, mod_eq_of_lt h₂]\n simp [div_add_mod]\n ·\n -- step: p ≥ b^succ w\n -- Generate condition for induction hypothesis\n have h₂ : p - b ^ succ w < p :=\n tsub_lt_self ((pow_pos b_pos _).trans_le h₁)\n (pow_pos b_pos _)\n -- Apply induction\n rw [mod_eq_sub_mod h₁, IH _ h₂]\n -- Normalize goal and h1\n simp only [pow_succ']\n simp only [GE.ge, pow_succ'] at h₁ \n rw [sub_mul_mod h₁, sub_mul_div _ _ _ h₁]\n -- Cancel subtraction inside mod b^w\n have p_b_ge : b ^ w ≤ p / b := by\n rw [le_div_iff_mul_le b_pos, mul_comm]\n exact h₁\n rw [Eq.symm (mod_eq_sub_mod p_b_ge)]\n[GOAL]\ncase neg\nb w m : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\n⊢ m % b ^ succ w = b * (m / b % b ^ w) + m % b\n[PROOFSTEP]\ninduction m using Nat.strong_induction_on with\n| h p IH =>\n cases' lt_or_ge p (b ^ succ w) with h₁ h₁\n ·\n -- base case: p < b^succ w\n have h₂ : p / b < b ^ w := by\n rw [div_lt_iff_lt_mul b_pos]\n simpa [pow_succ] using h₁\n rw [mod_eq_of_lt h₁, mod_eq_of_lt h₂]\n simp [div_add_mod]\n ·\n -- step: p ≥ b^succ w\n -- Generate condition for induction hypothesis\n have h₂ : p - b ^ succ w < p :=\n tsub_lt_self ((pow_pos b_pos _).trans_le h₁)\n (pow_pos b_pos _)\n -- Apply induction\n rw [mod_eq_sub_mod h₁, IH _ h₂]\n -- Normalize goal and h1\n simp only [pow_succ']\n simp only [GE.ge, pow_succ'] at h₁ \n rw [sub_mul_mod h₁, sub_mul_div _ _ _ h₁]\n -- Cancel subtraction inside mod b^w\n have p_b_ge : b ^ w ≤ p / b := by\n rw [le_div_iff_mul_le b_pos, mul_comm]\n exact h₁\n rw [Eq.symm (mod_eq_sub_mod p_b_ge)]\n[GOAL]\ncase neg.h\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\n⊢ p % b ^ succ w = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\n\n| h p IH =>\n cases' lt_or_ge p (b ^ succ w) with h₁ h₁\n ·\n -- base case: p < b^succ w\n have h₂ : p / b < b ^ w := by\n rw [div_lt_iff_lt_mul b_pos]\n simpa [pow_succ] using h₁\n rw [mod_eq_of_lt h₁, mod_eq_of_lt h₂]\n simp [div_add_mod]\n ·\n -- step: p ≥ b^succ w\n -- Generate condition for induction hypothesis\n have h₂ : p - b ^ succ w < p :=\n tsub_lt_self ((pow_pos b_pos _).trans_le h₁)\n (pow_pos b_pos _)\n -- Apply induction\n rw [mod_eq_sub_mod h₁, IH _ h₂]\n -- Normalize goal and h1\n simp only [pow_succ']\n simp only [GE.ge, pow_succ'] at h₁ \n rw [sub_mul_mod h₁, sub_mul_div _ _ _ h₁]\n -- Cancel subtraction inside mod b^w\n have p_b_ge : b ^ w ≤ p / b := by\n rw [le_div_iff_mul_le b_pos, mul_comm]\n exact h₁\n rw [Eq.symm (mod_eq_sub_mod p_b_ge)]\n[GOAL]\ncase neg.h\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\n⊢ p % b ^ succ w = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\ncases' lt_or_ge p (b ^ succ w) with h₁ h₁\n[GOAL]\ncase neg.h.inl\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p < b ^ succ w\n⊢ p % b ^ succ w = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nhave h₂ : p / b < b ^ w := by\n rw [div_lt_iff_lt_mul b_pos]\n simpa [pow_succ] using h₁\n[GOAL]\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p < b ^ succ w\n⊢ p / b < b ^ w\n[PROOFSTEP]\nrw [div_lt_iff_lt_mul b_pos]\n[GOAL]\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p < b ^ succ w\n⊢ p < b ^ w * b\n[PROOFSTEP]\nsimpa [pow_succ] using h₁\n[GOAL]\ncase neg.h.inl\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p < b ^ succ w\nh₂ : p / b < b ^ w\n⊢ p % b ^ succ w = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nrw [mod_eq_of_lt h₁, mod_eq_of_lt h₂]\n[GOAL]\ncase neg.h.inl\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p < b ^ succ w\nh₂ : p / b < b ^ w\n⊢ p = b * (p / b) + p % b\n[PROOFSTEP]\nsimp [div_add_mod]\n[GOAL]\ncase neg.h.inr\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p ≥ b ^ succ w\n⊢ p % b ^ succ w = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nhave h₂ : p - b ^ succ w < p :=\n tsub_lt_self ((pow_pos b_pos _).trans_le h₁)\n (pow_pos b_pos _)\n -- Apply induction\n[GOAL]\ncase neg.h.inr\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p ≥ b ^ succ w\nh₂ : p - b ^ succ w < p\n⊢ p % b ^ succ w = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nrw [mod_eq_sub_mod h₁, IH _ h₂]\n -- Normalize goal and h1\n[GOAL]\ncase neg.h.inr\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p ≥ b ^ succ w\nh₂ : p - b ^ succ w < p\n⊢ b * ((p - b ^ succ w) / b % b ^ w) + (p - b ^ succ w) % b = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nsimp only [pow_succ']\n[GOAL]\ncase neg.h.inr\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₁ : p ≥ b ^ succ w\nh₂ : p - b ^ succ w < p\n⊢ b * ((p - b * b ^ w) / b % b ^ w) + (p - b * b ^ w) % b = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nsimp only [GE.ge, pow_succ'] at h₁ \n[GOAL]\ncase neg.h.inr\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₂ : p - b ^ succ w < p\nh₁ : b * b ^ w ≤ p\n⊢ b * ((p - b * b ^ w) / b % b ^ w) + (p - b * b ^ w) % b = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nrw [sub_mul_mod h₁, sub_mul_div _ _ _ h₁]\n -- Cancel subtraction inside mod b^w\n[GOAL]\ncase neg.h.inr\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₂ : p - b ^ succ w < p\nh₁ : b * b ^ w ≤ p\n⊢ b * ((p / b - b ^ w) % b ^ w) + p % b = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nhave p_b_ge : b ^ w ≤ p / b := by\n rw [le_div_iff_mul_le b_pos, mul_comm]\n exact h₁\n[GOAL]\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₂ : p - b ^ succ w < p\nh₁ : b * b ^ w ≤ p\n⊢ b ^ w ≤ p / b\n[PROOFSTEP]\nrw [le_div_iff_mul_le b_pos, mul_comm]\n[GOAL]\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₂ : p - b ^ succ w < p\nh₁ : b * b ^ w ≤ p\n⊢ b * b ^ w ≤ p\n[PROOFSTEP]\nexact h₁\n[GOAL]\ncase neg.h.inr\nb w : ℕ\nb_h : ¬b = 0\nb_pos : 0 < b\np : ℕ\nIH : ∀ (m : ℕ), m < p → m % b ^ succ w = b * (m / b % b ^ w) + m % b\nh₂ : p - b ^ succ w < p\nh₁ : b * b ^ w ≤ p\np_b_ge : b ^ w ≤ p / b\n⊢ b * ((p / b - b ^ w) % b ^ w) + p % b = b * (p / b % b ^ w) + p % b\n[PROOFSTEP]\nrw [Eq.symm (mod_eq_sub_mod p_b_ge)]\n[GOAL]\nk l x : ℕ\nw : 0 < x + 1\n⊢ (x + 1) ^ k ∣ (x + 1) ^ l ↔ (x + 1) ^ k ≤ (x + 1) ^ l\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk l x : ℕ\nw : 0 < x + 1\n⊢ (x + 1) ^ k ∣ (x + 1) ^ l → (x + 1) ^ k ≤ (x + 1) ^ l\n[PROOFSTEP]\nintro a\n[GOAL]\ncase mp\nk l x : ℕ\nw : 0 < x + 1\na : (x + 1) ^ k ∣ (x + 1) ^ l\n⊢ (x + 1) ^ k ≤ (x + 1) ^ l\n[PROOFSTEP]\nexact le_of_dvd (pow_pos (succ_pos x) l) a\n[GOAL]\ncase mpr\nk l x : ℕ\nw : 0 < x + 1\n⊢ (x + 1) ^ k ≤ (x + 1) ^ l → (x + 1) ^ k ∣ (x + 1) ^ l\n[PROOFSTEP]\nintro a\n[GOAL]\ncase mpr\nk l x : ℕ\nw : 0 < x + 1\na : (x + 1) ^ k ≤ (x + 1) ^ l\n⊢ (x + 1) ^ k ∣ (x + 1) ^ l\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase mpr.zero\nk l : ℕ\nw : 0 < zero + 1\na : (zero + 1) ^ k ≤ (zero + 1) ^ l\n⊢ (zero + 1) ^ k ∣ (zero + 1) ^ l\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.succ\nk l x : ℕ\nw : 0 < succ x + 1\na : (succ x + 1) ^ k ≤ (succ x + 1) ^ l\n⊢ (succ x + 1) ^ k ∣ (succ x + 1) ^ l\n[PROOFSTEP]\nhave le := (pow_le_iff_le_right (Nat.le_add_left _ _)).mp a\n[GOAL]\ncase mpr.succ\nk l x : ℕ\nw : 0 < succ x + 1\na : (succ x + 1) ^ k ≤ (succ x + 1) ^ l\nle : k ≤ l\n⊢ (succ x + 1) ^ k ∣ (succ x + 1) ^ l\n[PROOFSTEP]\nuse(x + 2) ^ (l - k)\n[GOAL]\ncase h\nk l x : ℕ\nw : 0 < succ x + 1\na : (succ x + 1) ^ k ≤ (succ x + 1) ^ l\nle : k ≤ l\n⊢ (succ x + 1) ^ l = (succ x + 1) ^ k * (x + 2) ^ (l - k)\n[PROOFSTEP]\nrw [← pow_add, add_comm k, tsub_add_cancel_of_le le]\n[GOAL]\nx k l : ℕ\nw : 1 < x\n⊢ x ^ k ∣ x ^ l ↔ k ≤ l\n[PROOFSTEP]\nrw [pow_dvd_pow_iff_pow_le_pow (lt_of_succ_lt w), pow_le_iff_le_right w]\n[GOAL]\np k : ℕ\nhp : 1 < succ p\nhk : 1 < succ k\nh : succ p ^ succ k ∣ succ p\n⊢ succ p * succ p ^ k ∣ succ p * 1\n[PROOFSTEP]\nsimpa [pow_succ'] using h\n[GOAL]\np k : ℕ\nhp : 1 < succ p\nhk : 1 < succ k\nh : succ p ^ succ k ∣ succ p\nthis✝¹ : succ p * succ p ^ k ∣ succ p * 1\nthis✝ : succ p ^ k ∣ 1\nhe : succ p ^ k = 1\nthis : k < succ p ^ k\n⊢ k < 1\n[PROOFSTEP]\nrwa [he] at this \n[GOAL]\np k : ℕ\nhp : 1 < succ p\nhk : 1 < succ k\nh : succ p ^ succ k ∣ succ p\nthis✝³ : succ p * succ p ^ k ∣ succ p * 1\nthis✝² : succ p ^ k ∣ 1\nhe : succ p ^ k = 1\nthis✝¹ : k < succ p ^ k\nthis✝ : k < 1\nthis : k = 0\n⊢ 1 < 1\n[PROOFSTEP]\nrwa [this] at hk \n[GOAL]\np k : ℕ\nhp : 1 < succ p\nhk : 1 < succ k\nh : succ p ^ succ k ∣ succ p\nthis✝⁴ : succ p * succ p ^ k ∣ succ p * 1\nthis✝³ : succ p ^ k ∣ 1\nhe : succ p ^ k = 1\nthis✝² : k < succ p ^ k\nthis✝¹ : k < 1\nthis✝ : k = 0\nthis : 1 < 1\n⊢ ¬1 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\np k m : ℕ\nhk : 1 ≤ k\nhpk : p ^ k ∣ m\n⊢ p ∣ m\n[PROOFSTEP]\nrw [← pow_one p]\n[GOAL]\np k m : ℕ\nhk : 1 ≤ k\nhpk : p ^ k ∣ m\n⊢ p ^ 1 ∣ m\n[PROOFSTEP]\nexact pow_dvd_of_le_of_pow_dvd hk hpk\n[GOAL]\nx m n : ℕ\nh : n ≤ m\nhx : 0 < x\n⊢ x ^ m / x ^ n = x ^ (m - n)\n[PROOFSTEP]\nrw [Nat.div_eq_iff_eq_mul_left (pow_pos hx n) (pow_dvd_pow _ h), pow_sub_mul_pow _ h]\n[GOAL]\np i n : ℕ\nhn : n ≠ 0\nhp : 2 ≤ p\nh : p ^ i ∣ n\n⊢ i < n\n[PROOFSTEP]\nrw [← pow_lt_iff_lt_right hp]\n[GOAL]\np i n : ℕ\nhn : n ≠ 0\nhp : 2 ≤ p\nh : p ^ i ∣ n\n⊢ p ^ i < p ^ n\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_of_dvd hn.bot_lt h) (lt_pow_self (succ_le_iff.mp hp) n)\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Pow", "llama_tokens": 7643, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.833324611869563, "lm_q2_score": 0.7217432062975979, "lm_q1q2_score": 0.6014463772574397}} {"text": "[GOAL]\nG : Type u_1\ninst✝⁴ : Group G\nA : Type u_2\ninst✝³ : AddGroup A\nH✝ : Type u_3\ninst✝² : Group H✝\ninst✝¹ : IsSimpleGroup G\ninst✝ : Nontrivial H✝\nf : G →* H✝\nhf : Function.Surjective ↑f\nH : Subgroup H✝\niH : Normal H\n⊢ H = ⊥ ∨ H = ⊤\n[PROOFSTEP]\nrefine' (iH.comap f).eq_bot_or_eq_top.imp (fun h => _) fun h => _\n[GOAL]\ncase refine'_1\nG : Type u_1\ninst✝⁴ : Group G\nA : Type u_2\ninst✝³ : AddGroup A\nH✝ : Type u_3\ninst✝² : Group H✝\ninst✝¹ : IsSimpleGroup G\ninst✝ : Nontrivial H✝\nf : G →* H✝\nhf : Function.Surjective ↑f\nH : Subgroup H✝\niH : Normal H\nh : comap f H = ⊥\n⊢ H = ⊥\n[PROOFSTEP]\nrw [← map_bot f, ← h, map_comap_eq_self_of_surjective hf]\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝⁴ : Group G\nA : Type u_2\ninst✝³ : AddGroup A\nH✝ : Type u_3\ninst✝² : Group H✝\ninst✝¹ : IsSimpleGroup G\ninst✝ : Nontrivial H✝\nf : G →* H✝\nhf : Function.Surjective ↑f\nH : Subgroup H✝\niH : Normal H\nh : comap f H = ⊤\n⊢ H = ⊤\n[PROOFSTEP]\nrw [← comap_top f] at h \n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝⁴ : Group G\nA : Type u_2\ninst✝³ : AddGroup A\nH✝ : Type u_3\ninst✝² : Group H✝\ninst✝¹ : IsSimpleGroup G\ninst✝ : Nontrivial H✝\nf : G →* H✝\nhf : Function.Surjective ↑f\nH : Subgroup H✝\niH : Normal H\nh : comap f H = comap f ⊤\n⊢ H = ⊤\n[PROOFSTEP]\nexact comap_injective hf h\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Subgroup.Simple", "llama_tokens": 674, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8558511616741042, "lm_q2_score": 0.7025300449389326, "lm_q1q2_score": 0.6012611550719461}} {"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{u_1, u₁} C\nD : Type u₂\ninst✝ : Category.{u_2, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nW : D\nh : F.obj Z ⟶ W\n⊢ F.map (f ≫ g) ≫ h = F.map f ≫ F.map g ≫ h\n[PROOFSTEP]\nrw [F.map_comp, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\n⊢ ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z),\n { obj := fun X => G.obj (F.obj X), map := fun {X Y} f => G.map (F.map f) }.map (f ≫ g) =\n { obj := fun X => G.obj (F.obj X), map := fun {X Y} f => G.map (F.map f) }.map f ≫\n { obj := fun X => G.obj (F.obj X), map := fun {X Y} f => G.map (F.map f) }.map g\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ { obj := fun X => G.obj (F.obj X), map := fun {X Y} f => G.map (F.map f) }.map (f✝ ≫ g✝) =\n { obj := fun X => G.obj (F.obj X), map := fun {X Y} f => G.map (F.map f) }.map f✝ ≫\n { obj := fun X => G.obj (F.obj X), map := fun {X Y} f => G.map (F.map f) }.map g✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ G.map (F.map (f✝ ≫ g✝)) = G.map (F.map f✝) ≫ G.map (F.map g✝)\n[PROOFSTEP]\nrw [F.map_comp, G.map_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\n⊢ F ⋙ 𝟭 D = F\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ntoPrefunctor✝ : C ⥤q D\nmap_id✝ : ∀ (X : C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\n⊢ mk toPrefunctor✝ ⋙ 𝟭 D = mk toPrefunctor✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\n⊢ 𝟭 C ⋙ F = F\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ntoPrefunctor✝ : C ⥤q D\nmap_id✝ : ∀ (X : C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\n⊢ 𝟭 C ⋙ mk toPrefunctor✝ = mk toPrefunctor✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nF : C ⥤ D\nX Y : C\nP : Prop\ninst✝ : Decidable P\nf : P → (X ⟶ Y)\ng : ¬P → (X ⟶ Y)\n⊢ F.map (if h : P then f h else g h) = if h : P then F.map (f h) else F.map (g h)\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Functor.Basic", "llama_tokens": 1773, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677583778258, "lm_q2_score": 0.7090191460821871, "lm_q1q2_score": 0.6012253759502724}} {"text": "[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nHbdd : ∃ b, ∀ (z : ℤ), P z → b ≤ z\nHinh : ∃ z, P z\n⊢ ∃ lb, P lb ∧ ∀ (z : ℤ), P z → lb ≤ z\n[PROOFSTEP]\nlet ⟨b, Hb⟩ := Hbdd\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nHbdd : ∃ b, ∀ (z : ℤ), P z → b ≤ z\nHinh : ∃ z, P z\nb : ℤ\nHb : ∀ (z : ℤ), P z → b ≤ z\n⊢ ∃ lb, P lb ∧ ∀ (z : ℤ), P z → lb ≤ z\n[PROOFSTEP]\nlet ⟨lb, H⟩ := leastOfBdd b Hb Hinh\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nHbdd : ∃ b, ∀ (z : ℤ), P z → b ≤ z\nHinh : ∃ z, P z\nb : ℤ\nHb : ∀ (z : ℤ), P z → b ≤ z\nlb : ℤ\nH : P lb ∧ ∀ (z : ℤ), P z → lb ≤ z\n⊢ ∃ lb, P lb ∧ ∀ (z : ℤ), P z → lb ≤ z\n[PROOFSTEP]\nexact ⟨lb, H⟩\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb b' : ℤ\nHb : ∀ (z : ℤ), P z → b ≤ z\nHb' : ∀ (z : ℤ), P z → b' ≤ z\nHinh : ∃ z, P z\n⊢ ↑(leastOfBdd b Hb Hinh) = ↑(leastOfBdd b' Hb' Hinh)\n[PROOFSTEP]\nrcases leastOfBdd b Hb Hinh with ⟨n, hn, h2n⟩\n[GOAL]\ncase mk.intro\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb b' : ℤ\nHb : ∀ (z : ℤ), P z → b ≤ z\nHb' : ∀ (z : ℤ), P z → b' ≤ z\nHinh : ∃ z, P z\nn : ℤ\nhn : P n\nh2n : ∀ (z : ℤ), P z → n ≤ z\n⊢ ↑{ val := n, property := (_ : P n ∧ ∀ (z : ℤ), P z → n ≤ z) } = ↑(leastOfBdd b' Hb' Hinh)\n[PROOFSTEP]\nrcases leastOfBdd b' Hb' Hinh with ⟨n', hn', h2n'⟩\n[GOAL]\ncase mk.intro.mk.intro\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb b' : ℤ\nHb : ∀ (z : ℤ), P z → b ≤ z\nHb' : ∀ (z : ℤ), P z → b' ≤ z\nHinh : ∃ z, P z\nn : ℤ\nhn : P n\nh2n : ∀ (z : ℤ), P z → n ≤ z\nn' : ℤ\nhn' : P n'\nh2n' : ∀ (z : ℤ), P z → n' ≤ z\n⊢ ↑{ val := n, property := (_ : P n ∧ ∀ (z : ℤ), P z → n ≤ z) } =\n ↑{ val := n', property := (_ : P n' ∧ ∀ (z : ℤ), P z → n' ≤ z) }\n[PROOFSTEP]\nexact le_antisymm (h2n _ hn') (h2n' _ hn)\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\nHinh : ∃ z, P z\nHbdd' : ∀ (z : ℤ), P (-z) → -b ≤ z\nelt : ℤ\nHelt : P elt\n⊢ P (- -elt)\n[PROOFSTEP]\nrw [neg_neg]\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\nHinh : ∃ z, P z\nHbdd' : ∀ (z : ℤ), P (-z) → -b ≤ z\nelt : ℤ\nHelt : P elt\n⊢ P elt\n[PROOFSTEP]\nexact Helt\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\nHinh : ∃ z, P z\nHbdd' : ∀ (z : ℤ), P (-z) → -b ≤ z\nHinh' : ∃ z, P (-z)\nlb : ℤ\nPlb : P (-lb)\nal : ∀ (z : ℤ), P (-z) → lb ≤ z\nz : ℤ\nh : P z\n⊢ P (- -z)\n[PROOFSTEP]\nrwa [neg_neg]\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nHbdd : ∃ b, ∀ (z : ℤ), P z → z ≤ b\nHinh : ∃ z, P z\n⊢ ∃ ub, P ub ∧ ∀ (z : ℤ), P z → z ≤ ub\n[PROOFSTEP]\nlet ⟨b, Hb⟩ := Hbdd\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nHbdd : ∃ b, ∀ (z : ℤ), P z → z ≤ b\nHinh : ∃ z, P z\nb : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\n⊢ ∃ ub, P ub ∧ ∀ (z : ℤ), P z → z ≤ ub\n[PROOFSTEP]\nlet ⟨lb, H⟩ := greatestOfBdd b Hb Hinh\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nHbdd : ∃ b, ∀ (z : ℤ), P z → z ≤ b\nHinh : ∃ z, P z\nb : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\nlb : ℤ\nH : P lb ∧ ∀ (z : ℤ), P z → z ≤ lb\n⊢ ∃ ub, P ub ∧ ∀ (z : ℤ), P z → z ≤ ub\n[PROOFSTEP]\nexact ⟨lb, H⟩\n[GOAL]\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb b' : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\nHb' : ∀ (z : ℤ), P z → z ≤ b'\nHinh : ∃ z, P z\n⊢ ↑(greatestOfBdd b Hb Hinh) = ↑(greatestOfBdd b' Hb' Hinh)\n[PROOFSTEP]\nrcases greatestOfBdd b Hb Hinh with ⟨n, hn, h2n⟩\n[GOAL]\ncase mk.intro\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb b' : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\nHb' : ∀ (z : ℤ), P z → z ≤ b'\nHinh : ∃ z, P z\nn : ℤ\nhn : P n\nh2n : ∀ (z : ℤ), P z → z ≤ n\n⊢ ↑{ val := n, property := (_ : P n ∧ ∀ (z : ℤ), P z → z ≤ n) } = ↑(greatestOfBdd b' Hb' Hinh)\n[PROOFSTEP]\nrcases greatestOfBdd b' Hb' Hinh with ⟨n', hn', h2n'⟩\n[GOAL]\ncase mk.intro.mk.intro\nP : ℤ → Prop\ninst✝ : DecidablePred P\nb b' : ℤ\nHb : ∀ (z : ℤ), P z → z ≤ b\nHb' : ∀ (z : ℤ), P z → z ≤ b'\nHinh : ∃ z, P z\nn : ℤ\nhn : P n\nh2n : ∀ (z : ℤ), P z → z ≤ n\nn' : ℤ\nhn' : P n'\nh2n' : ∀ (z : ℤ), P z → z ≤ n'\n⊢ ↑{ val := n, property := (_ : P n ∧ ∀ (z : ℤ), P z → z ≤ n) } =\n ↑{ val := n', property := (_ : P n' ∧ ∀ (z : ℤ), P z → z ≤ n') }\n[PROOFSTEP]\nexact le_antisymm (h2n' _ hn) (h2n _ hn')\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.LeastGreatest", "llama_tokens": 2367, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357494949105, "lm_q2_score": 0.6926419894793248, "lm_q1q2_score": 0.6005453664798522}} {"text": "[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\n⊢ Isometry f ↔ ∀ (x y : α), nndist (f x) (f y) = nndist x y\n[PROOFSTEP]\nsimp only [Isometry, edist_nndist, ENNReal.coe_eq_coe]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\n⊢ Isometry f ↔ ∀ (x y : α), dist (f x) (f y) = dist x y\n[PROOFSTEP]\nsimp only [isometry_iff_nndist_eq, ← coe_nndist, NNReal.coe_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx✝ y✝ z : α\ns : Set α\nh : Isometry f\nx y : α\n⊢ edist x y ≤ ↑1 * edist (f x) (f y)\n[PROOFSTEP]\nsimp only [h x y, ENNReal.coe_one, one_mul, le_refl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : PseudoEMetricSpace α\ninst✝² : PseudoEMetricSpace β\ninst✝¹ : PseudoEMetricSpace γ\nf : α → β\nx✝ y✝ z : α\ns : Set α\ninst✝ : Subsingleton α\nx y : α\n⊢ edist (f x) (f y) = edist x y\n[PROOFSTEP]\nrw [Subsingleton.elim x y]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : PseudoEMetricSpace α\ninst✝² : PseudoEMetricSpace β\ninst✝¹ : PseudoEMetricSpace γ\nf : α → β\nx✝ y✝ z : α\ns : Set α\ninst✝ : Subsingleton α\nx y : α\n⊢ edist (f y) (f y) = edist y y\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : PseudoEMetricSpace α\ninst✝² : PseudoEMetricSpace β\ninst✝¹ : PseudoEMetricSpace γ\nf✝ : α → β\nx✝ y✝ z : α\ns : Set α\nδ : Type u_2\ninst✝ : PseudoEMetricSpace δ\nf : α → β\ng : γ → δ\nhf : Isometry f\nhg : Isometry g\nx y : α × γ\n⊢ edist (Prod.map f g x) (Prod.map f g y) = edist x y\n[PROOFSTEP]\nsimp only [Prod.edist_eq, hf.edist_eq, hg.edist_eq, Prod_map]\n[GOAL]\nι✝ : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\ninst✝⁵ : PseudoEMetricSpace α✝\ninst✝⁴ : PseudoEMetricSpace β✝\ninst✝³ : PseudoEMetricSpace γ\nf✝ : α✝ → β✝\nx✝ y✝ z : α✝\ns : Set α✝\nι : Type u_4\ninst✝² : Fintype ι\nα : ι → Type u_2\nβ : ι → Type u_3\ninst✝¹ : (i : ι) → PseudoEMetricSpace (α i)\ninst✝ : (i : ι) → PseudoEMetricSpace (β i)\nf : (i : ι) → α i → β i\nhf : ∀ (i : ι), Isometry (f i)\nx y : (i : ι) → α i\n⊢ edist ((fun g i => f i (g i)) x) ((fun g i => f i (g i)) y) = edist x y\n[PROOFSTEP]\nsimp only [edist_pi_def, (hf _).edist_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf✝ : α → β\nx✝ y✝ z : α\ns : Set α\nf : α → β\ng : β → α\nh : Isometry f\nhg : Function.RightInverse g f\nx y : β\n⊢ edist (g x) (g y) = edist x y\n[PROOFSTEP]\nrw [← h, hg _, hg _]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx✝ y z : α\ns : Set α\nh : Isometry f\nx : α\nr : ℝ≥0∞\n⊢ f ⁻¹' EMetric.closedBall (f x) r = EMetric.closedBall x r\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx✝ y✝ z : α\ns : Set α\nh : Isometry f\nx : α\nr : ℝ≥0∞\ny : α\n⊢ y ∈ f ⁻¹' EMetric.closedBall (f x) r ↔ y ∈ EMetric.closedBall x r\n[PROOFSTEP]\nsimp [h.edist_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx✝ y z : α\ns : Set α\nh : Isometry f\nx : α\nr : ℝ≥0∞\n⊢ f ⁻¹' EMetric.ball (f x) r = EMetric.ball x r\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx✝ y✝ z : α\ns : Set α\nh : Isometry f\nx : α\nr : ℝ≥0∞\ny : α\n⊢ y ∈ f ⁻¹' EMetric.ball (f x) r ↔ y ∈ EMetric.ball x r\n[PROOFSTEP]\nsimp [h.edist_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx y z : α\ns✝ : Set α\nhf : Isometry f\ns : Set α\nd : ℝ≥0∞\n⊢ EMetric.diam (f '' s) ≤ d ↔ EMetric.diam s ≤ d\n[PROOFSTEP]\nsimp only [EMetric.diam_le_iff, ball_image_iff, hf.edist_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx y z : α\ns : Set α\nhf : Isometry f\n⊢ EMetric.diam (range f) = EMetric.diam univ\n[PROOFSTEP]\nrw [← image_univ]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nf : α → β\nx y z : α\ns : Set α\nhf : Isometry f\n⊢ EMetric.diam (f '' univ) = EMetric.diam univ\n[PROOFSTEP]\nexact hf.ediam_image univ\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nhf : Isometry f\ns : Set α\n⊢ Metric.diam (f '' s) = Metric.diam s\n[PROOFSTEP]\nrw [Metric.diam, Metric.diam, hf.ediam_image]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nhf : Isometry f\n⊢ Metric.diam (range f) = Metric.diam univ\n[PROOFSTEP]\nrw [← image_univ]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nhf : Isometry f\n⊢ Metric.diam (f '' univ) = Metric.diam univ\n[PROOFSTEP]\nexact hf.diam_image univ\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nhf : Isometry f\nx : α\np : ℝ → Prop\n⊢ f ⁻¹' {y | p (dist y (f x))} = {y | p (dist y x)}\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nhf : Isometry f\nx : α\np : ℝ → Prop\ny : α\n⊢ y ∈ f ⁻¹' {y | p (dist y (f x))} ↔ y ∈ {y | p (dist y x)}\n[PROOFSTEP]\nsimp [hf.dist_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nh : α ≃ᵢ β\n⊢ EMetric.diam univ = EMetric.diam univ\n[PROOFSTEP]\nrw [← h.range_eq_univ, h.isometry.ediam_range]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nh : α ≃ᵢ β\ns : Set β\n⊢ EMetric.diam (↑h ⁻¹' s) = EMetric.diam s\n[PROOFSTEP]\nrw [← image_symm, ediam_image]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nh : α ≃ᵢ β\nx : β\nr : ℝ≥0∞\n⊢ ↑h ⁻¹' EMetric.ball x r = EMetric.ball (↑(IsometryEquiv.symm h) x) r\n[PROOFSTEP]\nrw [← h.isometry.preimage_emetric_ball (h.symm x) r, h.apply_symm_apply]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nh : α ≃ᵢ β\nx : β\nr : ℝ≥0∞\n⊢ ↑h ⁻¹' EMetric.closedBall x r = EMetric.closedBall (↑(IsometryEquiv.symm h) x) r\n[PROOFSTEP]\nrw [← h.isometry.preimage_emetric_closedBall (h.symm x) r, h.apply_symm_apply]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nh : α ≃ᵢ β\nx : α\nr : ℝ≥0∞\n⊢ ↑h '' EMetric.ball x r = EMetric.ball (↑h x) r\n[PROOFSTEP]\nrw [← h.preimage_symm, h.symm.preimage_emetric_ball, symm_symm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\nh : α ≃ᵢ β\nx : α\nr : ℝ≥0∞\n⊢ ↑h '' EMetric.closedBall x r = EMetric.closedBall (↑h x) r\n[PROOFSTEP]\nrw [← h.preimage_symm, h.symm.preimage_emetric_closedBall, symm_symm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : PseudoEMetricSpace γ\ne : α ≃ᵢ β\n⊢ CompleteSpace α ↔ CompleteSpace β\n[PROOFSTEP]\nsimp only [completeSpace_iff_isComplete_univ, ← e.range_eq_univ, ← image_univ,\n isComplete_image_iff e.isometry.uniformInducing]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : Unique ι\ninst✝ : Fintype ι\nx hx : ι → α\n⊢ edist (Equiv.toFun (Equiv.funUnique ι α) x) (Equiv.toFun (Equiv.funUnique ι α) hx) = edist x hx\n[PROOFSTEP]\nsimp [edist_pi_def, Finset.univ_unique, Finset.sup_singleton]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : PseudoEMetricSpace α✝\ninst✝² : PseudoEMetricSpace β\ninst✝¹ : PseudoEMetricSpace γ\nα : Fin 2 → Type u_2\ninst✝ : (i : Fin 2) → PseudoEMetricSpace (α i)\nx hx : (i : Fin 2) → α i\n⊢ edist (Equiv.toFun (piFinTwoEquiv α) x) (Equiv.toFun (piFinTwoEquiv α) hx) = edist x hx\n[PROOFSTEP]\nsimp [edist_pi_def, Fin.univ_succ, Prod.edist_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nh : α ≃ᵢ β\ns : Set β\n⊢ Metric.diam (↑h ⁻¹' s) = Metric.diam s\n[PROOFSTEP]\nrw [← image_symm, diam_image]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nh✝ h : α ≃ᵢ β\nx : β\nr : ℝ\n⊢ ↑h ⁻¹' Metric.ball x r = Metric.ball (↑(IsometryEquiv.symm h) x) r\n[PROOFSTEP]\nrw [← h.isometry.preimage_ball (h.symm x) r, h.apply_symm_apply]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nh✝ h : α ≃ᵢ β\nx : β\nr : ℝ\n⊢ ↑h ⁻¹' Metric.sphere x r = Metric.sphere (↑(IsometryEquiv.symm h) x) r\n[PROOFSTEP]\nrw [← h.isometry.preimage_sphere (h.symm x) r, h.apply_symm_apply]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nh✝ h : α ≃ᵢ β\nx : β\nr : ℝ\n⊢ ↑h ⁻¹' Metric.closedBall x r = Metric.closedBall (↑(IsometryEquiv.symm h) x) r\n[PROOFSTEP]\nrw [← h.isometry.preimage_closedBall (h.symm x) r, h.apply_symm_apply]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nh✝ h : α ≃ᵢ β\nx : α\nr : ℝ\n⊢ ↑h '' Metric.ball x r = Metric.ball (↑h x) r\n[PROOFSTEP]\nrw [← h.preimage_symm, h.symm.preimage_ball, symm_symm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nh✝ h : α ≃ᵢ β\nx : α\nr : ℝ\n⊢ ↑h '' Metric.sphere x r = Metric.sphere (↑h x) r\n[PROOFSTEP]\nrw [← h.preimage_symm, h.symm.preimage_sphere, symm_symm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nh✝ h : α ≃ᵢ β\nx : α\nr : ℝ\n⊢ ↑h '' Metric.closedBall x r = Metric.closedBall (↑h x) r\n[PROOFSTEP]\nrw [← h.preimage_symm, h.symm.preimage_closedBall, symm_symm]\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Isometry", "llama_tokens": 5528, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867825403177, "lm_q2_score": 0.7520125737597972, "lm_q1q2_score": 0.6002464966791959}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nk : α\nn : ℕ\nx a a' : α\nh : k + a = a'\n⊢ k + term n x a = term n x a'\n[PROOFSTEP]\nsimp [h.symm, term, add_comm, add_assoc]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nk : α\nn : ℤ\nx a a' : α\nh : k + a = a'\n⊢ k + termg n x a = termg n x a'\n[PROOFSTEP]\nsimp [h.symm, termg, add_comm, add_assoc]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nn : ℕ\nx a k a' : α\nh : a + k = a'\n⊢ term n x a + k = term n x a'\n[PROOFSTEP]\nsimp [h.symm, term, add_assoc]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nn : ℤ\nx a k a' : α\nh : a + k = a'\n⊢ termg n x a + k = termg n x a'\n[PROOFSTEP]\nsimp [h.symm, termg, add_assoc]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nn₁ : ℕ\nx a₁ : α\nn₂ : ℕ\na₂ : α\nn' : ℕ\na' : α\nh₁ : n₁ + n₂ = n'\nh₂ : a₁ + a₂ = a'\n⊢ term n₁ x a₁ + term n₂ x a₂ = term n' x a'\n[PROOFSTEP]\nsimp [h₁.symm, h₂.symm, term, add_nsmul, add_assoc, add_left_comm]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nn₁ : ℤ\nx a₁ : α\nn₂ : ℤ\na₂ : α\nn' : ℤ\na' : α\nh₁ : n₁ + n₂ = n'\nh₂ : a₁ + a₂ = a'\n⊢ termg n₁ x a₁ + termg n₂ x a₂ = termg n' x a'\n[PROOFSTEP]\nsimp [h₁.symm, h₂.symm, termg, add_zsmul]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nn₁ : ℤ\nx a₁ : α\nn₂ : ℤ\na₂ : α\nn' : ℤ\na' : α\nh₁ : n₁ + n₂ = n'\nh₂ : a₁ + a₂ = a'\n⊢ n₁ • x + a₁ + (n₂ • x + a₂) = n₁ • x + n₂ • x + (a₁ + a₂)\n[PROOFSTEP]\nexact add_add_add_comm (n₁ • x) a₁ (n₂ • x) a₂\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nx a : α\n⊢ term 0 x a = a\n[PROOFSTEP]\nsimp [term, zero_nsmul, one_nsmul]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nx a : α\n⊢ termg 0 x a = a\n[PROOFSTEP]\nsimp [termg, zero_zsmul]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nn : ℤ\nx a : α\nn' : ℤ\na' : α\nh₁ : -n = n'\nh₂ : -a = a'\n⊢ -termg n x a = termg n' x a'\n[PROOFSTEP]\nsimp [h₂.symm, h₁.symm, termg]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nn : ℤ\nx a : α\nn' : ℤ\na' : α\nh₁ : -n = n'\nh₂ : -a = a'\n⊢ -a + -(n • x) = -(n • x) + -a\n[PROOFSTEP]\nexact add_comm _ _\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nc : ℕ\n⊢ smul c 0 = 0\n[PROOFSTEP]\nsimp [smul, nsmul_zero]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nc : ℤ\n⊢ smulg c 0 = 0\n[PROOFSTEP]\nsimp [smulg, zsmul_zero]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nc n : ℕ\nx a : α\nn' : ℕ\na' : α\nh₁ : c * n = n'\nh₂ : smul c a = a'\n⊢ smul c (term n x a) = term n' x a'\n[PROOFSTEP]\nsimp [h₂.symm, h₁.symm, term, smul, nsmul_add, mul_nsmul']\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nc n : ℤ\nx a : α\nn' : ℤ\na' : α\nh₁ : c * n = n'\nh₂ : smulg c a = a'\n⊢ smulg c (termg n x a) = termg n' x a'\n[PROOFSTEP]\nsimp [h₂.symm, h₁.symm, termg, smulg, zsmul_add, mul_zsmul]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nx : α\n⊢ x = term 1 x 0\n[PROOFSTEP]\nsimp [term]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nx : α\n⊢ x = termg 1 x 0\n[PROOFSTEP]\nsimp [termg]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nx x' : α\nh : x = x'\n⊢ x = term 1 x' 0\n[PROOFSTEP]\nsimp [term, h]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nx x' : α\nh : x = x'\n⊢ x = termg 1 x' 0\n[PROOFSTEP]\nsimp [termg, h]\n[GOAL]\nα : Type u_1\ninst✝ : SubtractionMonoid α\na b c : α\nh : a + -b = c\n⊢ a - b = c\n[PROOFSTEP]\nrw [sub_eq_add_neg, h]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nl : ℕ\nr : α\ntl : ℕ\ntr t : α\nprl : l = tl\nprr : r = tr\nprt : smul tl tr = t\n⊢ smul l r = t\n[PROOFSTEP]\nsimp [prl, prr, prt]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nl : ℤ\nr : α\ntl : ℤ\ntr t : α\nprl : l = tl\nprr : r = tr\nprt : smulg tl tr = t\n⊢ smulg l r = t\n[PROOFSTEP]\nsimp [prl, prr, prt]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nl : ℕ\nr : α\ntl : ℕ\nzl : ℤ\ntr t : α\nprl₁ : l = tl\nprl₂ : ↑tl = zl\nprr : r = tr\nprt : smulg zl tr = t\n⊢ smul l r = t\n[PROOFSTEP]\nsimp [← prt, prl₁, ← prl₂, prr, smul, smulg, coe_nat_zsmul]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommMonoid α\nl r tl tr t : α\nprl : l = tl\nprr : r = tr\nprt : tl + tr = t\n⊢ l + r = t\n[PROOFSTEP]\nrw [prl, prr, prt]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\nl r tl tr t : α\nprl : l = tl\nprr : r = tr\nprt : tl + tr = t\n⊢ l + r = t\n[PROOFSTEP]\nrw [prl, prr, prt]\n[GOAL]\nα : Type u_1\ninst✝ : AddCommGroup α\na ta t : α\npra : a = ta\nprt : -ta = t\n⊢ -a = t\n[PROOFSTEP]\nsimp [pra, prt]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.Abel", "llama_tokens": 2300, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744761936437, "lm_q2_score": 0.7341195327172402, "lm_q1q2_score": 0.6001973924248201}} {"text": "[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\n⊢ 𝓝ˢ (Ici a) = 𝓝 a ⊔ 𝓟 (Ioi a)\n[PROOFSTEP]\nrw [← Ioi_insert, nhdsSet_insert, nhdsSet_Ioi]\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\nh : a < b\n⊢ 𝓝ˢ (Ico a b) = 𝓝 a ⊔ 𝓟 (Ioo a b)\n[PROOFSTEP]\nrw [← Ioo_insert_left h, nhdsSet_insert, nhdsSet_Ioo]\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\nh : a < b\n⊢ 𝓝ˢ (Ioc a b) = 𝓝 b ⊔ 𝓟 (Ioo a b)\n[PROOFSTEP]\nrw [← Ioo_insert_right h, nhdsSet_insert, nhdsSet_Ioo]\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\nh : a ≤ b\n⊢ 𝓝ˢ (Icc a b) = 𝓝 a ⊔ 𝓝 b ⊔ 𝓟 (Ioo a b)\n[PROOFSTEP]\nrcases h.eq_or_lt with rfl | hlt\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na c d : α\nh : a ≤ a\n⊢ 𝓝ˢ (Icc a a) = 𝓝 a ⊔ 𝓝 a ⊔ 𝓟 (Ioo a a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\nh : a ≤ b\nhlt : a < b\n⊢ 𝓝ˢ (Icc a b) = 𝓝 a ⊔ 𝓝 b ⊔ 𝓟 (Ioo a b)\n[PROOFSTEP]\nrw [← Ioc_insert_left h, nhdsSet_insert, nhdsSet_Ioc hlt, sup_assoc]\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\n⊢ Ioi a ∈ 𝓝ˢ (Ici b) ↔ a < b\n[PROOFSTEP]\nrw [isOpen_Ioi.mem_nhdsSet, Ici_subset_Ioi]\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\nh : b ≤ c\n⊢ Iio c ∈ 𝓝ˢ (Iio b)\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\na b c d : α\nh : a ≤ b\n⊢ Ioi a ∈ 𝓝ˢ (Ioi b)\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderTopology α\na : α\nh : Nonempty ↑(Ioi a)\n⊢ HasBasis (𝓝ˢ (Iic a)) (fun x => a < x) Iio\n[PROOFSTEP]\nrefine ⟨fun s ↦ ⟨fun hs ↦ ?_, fun ⟨b, hab, hb⟩ ↦ mem_of_superset (Iio_mem_nhdsSet_Iic hab) hb⟩⟩\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderTopology α\na : α\nh : Nonempty ↑(Ioi a)\ns : Set α\nhs : s ∈ 𝓝ˢ (Iic a)\n⊢ ∃ i, a < i ∧ Iio i ⊆ s\n[PROOFSTEP]\nrw [nhdsSet_Iic, mem_sup, mem_principal] at hs \n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderTopology α\na : α\nh : Nonempty ↑(Ioi a)\ns : Set α\nhs : s ∈ 𝓝 a ∧ Iio a ⊆ s\n⊢ ∃ i, a < i ∧ Iio i ⊆ s\n[PROOFSTEP]\nrcases exists_Ico_subset_of_mem_nhds hs.1 (Set.nonempty_coe_sort.1 h) with ⟨b, hab, hbs⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderTopology α\na : α\nh : Nonempty ↑(Ioi a)\ns : Set α\nhs : s ∈ 𝓝 a ∧ Iio a ⊆ s\nb : α\nhab : a < b\nhbs : Ico a b ⊆ s\n⊢ ∃ i, a < i ∧ Iio i ⊆ s\n[PROOFSTEP]\nexact ⟨b, hab, Iio_subset_Iio_union_Ico.trans (union_subset hs.2 hbs)⟩\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrder α\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderTopology α\na : α\ninst✝ : NeBot (𝓝[Ioi a] a)\n⊢ HasBasis (𝓝ˢ (Iic a)) (fun x => a < x) Iic\n[PROOFSTEP]\nhave : Nonempty (Ioi a) := (Filter.nonempty_of_mem (self_mem_nhdsWithin : Ioi a ∈ 𝓝[>] a)).to_subtype\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrder α\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderTopology α\na : α\ninst✝ : NeBot (𝓝[Ioi a] a)\nthis : Nonempty ↑(Ioi a)\n⊢ HasBasis (𝓝ˢ (Iic a)) (fun x => a < x) Iic\n[PROOFSTEP]\nrefine (hasBasis_nhdsSet_Iic_Iio _).to_hasBasis (fun c hc ↦ ?_) (fun _ h ↦ ⟨_, h, Iio_subset_Iic_self⟩)\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrder α\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderTopology α\na : α\ninst✝ : NeBot (𝓝[Ioi a] a)\nthis : Nonempty ↑(Ioi a)\nc : α\nhc : a < c\n⊢ ∃ i', a < i' ∧ Iic i' ⊆ Iio c\n[PROOFSTEP]\nsimpa only [Iic_subset_Iio] using (Filter.nonempty_of_mem <| Ioo_mem_nhdsWithin_Ioi' hc)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Order.NhdsSet", "llama_tokens": 2075, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619263765707, "lm_q2_score": 0.7279754548076478, "lm_q1q2_score": 0.6001880458255735}} {"text": "[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nu : M₀ˣ\na : M₀\nh : a * ↑u = 0\n⊢ a = 0\n[PROOFSTEP]\nsimpa using mul_eq_zero_of_left h ↑u⁻¹\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nu : M₀ˣ\na : M₀\nh : ↑u * a = 0\n⊢ a = 0\n[PROOFSTEP]\nsimpa using mul_eq_zero_of_right (↑u⁻¹) h\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx✝ : IsUnit 0\na : M₀\na0 : 0 * a = 1\ninv_val✝ : a * 0 = 1\n⊢ 0 = 1\n[PROOFSTEP]\nrwa [zero_mul] at a0 \n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nu : M₀ˣ\n⊢ inverse ↑u = ↑u⁻¹\n[PROOFSTEP]\nrw [inverse, dif_pos u.isUnit, IsUnit.unit_of_val_units]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx : M₀\nh : IsUnit x\n⊢ x * inverse x = 1\n[PROOFSTEP]\nrcases h with ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nu : M₀ˣ\n⊢ ↑u * inverse ↑u = 1\n[PROOFSTEP]\nrw [inverse_unit, Units.mul_inv]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx : M₀\nh : IsUnit x\n⊢ inverse x * x = 1\n[PROOFSTEP]\nrcases h with ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nu : M₀ˣ\n⊢ inverse ↑u * ↑u = 1\n[PROOFSTEP]\nrw [inverse_unit, Units.inv_mul]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y : M₀\nh : IsUnit x\n⊢ y * x * inverse x = y\n[PROOFSTEP]\nrw [mul_assoc, mul_inverse_cancel x h, mul_one]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y : M₀\nh : IsUnit x\n⊢ y * inverse x * x = y\n[PROOFSTEP]\nrw [mul_assoc, inverse_mul_cancel x h, mul_one]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y : M₀\nh : IsUnit x\n⊢ x * (inverse x * y) = y\n[PROOFSTEP]\nrw [← mul_assoc, mul_inverse_cancel x h, one_mul]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y : M₀\nh : IsUnit x\n⊢ inverse x * (x * y) = y\n[PROOFSTEP]\nrw [← mul_assoc, inverse_mul_cancel x h, one_mul]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y z : M₀\nh : IsUnit x\nh1 : inverse x * y = z\n⊢ y = x * z\n[PROOFSTEP]\nrw [← h1, mul_inverse_cancel_left _ _ h]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y z : M₀\nh : IsUnit x\nh1 : y = x * z\n⊢ inverse x * y = z\n[PROOFSTEP]\nrw [h1, inverse_mul_cancel_left _ _ h]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y z : M₀\nh : IsUnit z\nh1 : x = y * inverse z\n⊢ x * z = y\n[PROOFSTEP]\nrw [h1, inverse_mul_cancel_right _ _ h]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\nx y z : M₀\nh : IsUnit z\nh1 : x * z = y\n⊢ x = y * inverse z\n[PROOFSTEP]\nrw [← h1, mul_inverse_cancel_right _ _ h]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\n⊢ inverse 0 = 0\n[PROOFSTEP]\nnontriviality\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\n✝ : Nontrivial M₀\n⊢ inverse 0 = 0\n[PROOFSTEP]\nexact inverse_non_unit _ not_isUnit_zero\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\na : M₀\nh : IsUnit (Ring.inverse a)\n⊢ IsUnit a\n[PROOFSTEP]\ncases subsingleton_or_nontrivial M₀\n[GOAL]\ncase inl\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\na : M₀\nh : IsUnit (Ring.inverse a)\nh✝ : Subsingleton M₀\n⊢ IsUnit a\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase inr\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\na : M₀\nh : IsUnit (Ring.inverse a)\nh✝ : Nontrivial M₀\n⊢ IsUnit a\n[PROOFSTEP]\ncontrapose h\n[GOAL]\ncase inr\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\na : M₀\nh✝ : Nontrivial M₀\nh : ¬IsUnit a\n⊢ ¬IsUnit (Ring.inverse a)\n[PROOFSTEP]\nrw [Ring.inverse_non_unit _ h]\n[GOAL]\ncase inr\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝ : MonoidWithZero M₀\na : M₀\nh✝ : Nontrivial M₀\nh : ¬IsUnit a\n⊢ ¬IsUnit 0\n[PROOFSTEP]\nexact not_isUnit_zero\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b : G₀\nh : optParam (1 ≠ 0) (_ : 1 ≠ 0)\n⊢ mk0 1 h = 1\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b : G₀\nh : optParam (1 ≠ 0) (_ : 1 ≠ 0)\n⊢ ↑(mk0 1 h) = ↑1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b✝ a b : G₀\nha : a ≠ 0\nhb : b ≠ 0\nh : mk0 a ha = mk0 b hb\n⊢ a = b\n[PROOFSTEP]\ninjection h\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b : G₀\np : (g : G₀) → g ≠ 0 → Prop\n⊢ (∃ g hg, p g hg) ↔ ∃ g hg, p ↑(mk0 g hg) (_ : ↑(mk0 g hg) ≠ 0)\n[PROOFSTEP]\nsimp_rw [val_mk0]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b x : G₀\n⊢ (∃ u, ↑u = x) ↔ x ≠ 0\n[PROOFSTEP]\nsimp [exists0]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b a : G₀\n⊢ a = 0 ∨ ∃ u, a = ↑u\n[PROOFSTEP]\nby_cases h : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b a : G₀\nh : a = 0\n⊢ a = 0 ∨ ∃ u, a = ↑u\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b a : G₀\nh : a = 0\n⊢ a = 0\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b a : G₀\nh : ¬a = 0\n⊢ a = 0 ∨ ∃ u, a = ↑u\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b a : G₀\nh : ¬a = 0\n⊢ ∃ u, a = ↑u\n[PROOFSTEP]\nsimpa only [eq_comm] using Units.exists_iff_ne_zero.mpr h\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b✝ c : G₀\nsrc✝ : GroupWithZero G₀ := inst✝\na b : G₀\nh : a * b = 0\n⊢ a = 0 ∨ b = 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b✝ c : G₀\nsrc✝ : GroupWithZero G₀ := inst✝\na b : G₀\nh : a ≠ 0 ∧ b ≠ 0\n⊢ a * b ≠ 0\n[PROOFSTEP]\nexact (Units.mk0 a h.1 * Units.mk0 b h.2).ne_zero\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b c x y : G₀\nhxy : x * y ≠ 0\n⊢ mk0 (x * y) hxy = mk0 x (_ : x ≠ 0) * mk0 y (_ : y ≠ 0)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b c x y : G₀\nhxy : x * y ≠ 0\n⊢ ↑(mk0 (x * y) hxy) = ↑(mk0 x (_ : x ≠ 0) * mk0 y (_ : y ≠ 0))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b c : G₀\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a / b ≠ 0\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b c : G₀\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a * b⁻¹ ≠ 0\n[PROOFSTEP]\nexact mul_ne_zero ha (inv_ne_zero hb)\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b c : G₀\n⊢ a / b = 0 ↔ a = 0 ∨ b = 0\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b c a : G₀\n⊢ inverse a = a⁻¹\n[PROOFSTEP]\nobtain rfl | ha := eq_or_ne a 0\n[GOAL]\ncase inl\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na b c : G₀\n⊢ inverse 0 = 0⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\ninst✝ : GroupWithZero G₀\na✝ b c a : G₀\nha : a ≠ 0\n⊢ inverse a = a⁻¹\n[PROOFSTEP]\nexact Ring.inverse_unit (Units.mk0 a ha)\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\nM : Type u_8\ninst✝ : Nontrivial M\nhM : MonoidWithZero M\nh : ∀ (a : M), IsUnit a ∨ a = 0\na : M\nh0 : a ≠ 0\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\nchange (a * if h0 : a = 0 then 0 else ↑((h a).resolve_right h0).unit⁻¹) = 1\n[GOAL]\nα : Type u_1\nM₀ : Type u_2\nG₀ : Type u_3\nM₀' : Type u_4\nG₀' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst✝¹ : MonoidWithZero M₀\nM : Type u_8\ninst✝ : Nontrivial M\nhM : MonoidWithZero M\nh : ∀ (a : M), IsUnit a ∨ a = 0\na : M\nh0 : a ≠ 0\n⊢ (a * if h0 : a = 0 then 0 else ↑(IsUnit.unit (_ : IsUnit a))⁻¹) = 1\n[PROOFSTEP]\nrw [dif_neg h0, Units.mul_inv_eq_iff_eq_mul, one_mul, IsUnit.unit_spec]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GroupWithZero.Units.Basic", "llama_tokens": 6021, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619134371953, "lm_q2_score": 0.7279754489059775, "lm_q1q2_score": 0.6001880315403235}} {"text": "[GOAL]\n⊢ ∀ {X' X : SemigroupCat} {Y : MonCat} (f : X' ⟶ X) (g : X ⟶ (forget₂ MonCat SemigroupCat).obj Y),\n ↑((fun S M => WithOne.lift.symm) X' Y).symm (f ≫ g) = adjoinOne.map f ≫ ↑((fun S M => WithOne.lift.symm) X Y).symm g\n[PROOFSTEP]\nintro S T M f g\n[GOAL]\nS T : SemigroupCat\nM : MonCat\nf : S ⟶ T\ng : T ⟶ (forget₂ MonCat SemigroupCat).obj M\n⊢ ↑((fun S M => WithOne.lift.symm) S M).symm (f ≫ g) = adjoinOne.map f ≫ ↑((fun S M => WithOne.lift.symm) T M).symm g\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nS T : SemigroupCat\nM : MonCat\nf : S ⟶ T\ng : T ⟶ (forget₂ MonCat SemigroupCat).obj M\nx : ↑(adjoinOne.obj S)\n⊢ ↑(↑((fun S M => WithOne.lift.symm) S M).symm (f ≫ g)) x =\n ↑(adjoinOne.map f ≫ ↑((fun S M => WithOne.lift.symm) T M).symm g) x\n[PROOFSTEP]\nsimp only [Equiv.symm_symm, adjoinOne_map, coe_comp]\n[GOAL]\ncase w\nS T : SemigroupCat\nM : MonCat\nf : S ⟶ T\ng : T ⟶ (forget₂ MonCat SemigroupCat).obj M\nx : ↑(adjoinOne.obj S)\n⊢ ↑(↑WithOne.lift (f ≫ g)) x = ↑(WithOne.map f ≫ ↑WithOne.lift g) x\n[PROOFSTEP]\nsimp_rw [WithOne.map]\n[GOAL]\ncase w\nS T : SemigroupCat\nM : MonCat\nf : S ⟶ T\ng : T ⟶ (forget₂ MonCat SemigroupCat).obj M\nx : ↑(adjoinOne.obj S)\n⊢ ↑(↑WithOne.lift (f ≫ g)) x = ↑(↑WithOne.lift (MulHom.comp WithOne.coeMulHom f) ≫ ↑WithOne.lift g) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase w.none\nS T : SemigroupCat\nM : MonCat\nf : S ⟶ T\ng : T ⟶ (forget₂ MonCat SemigroupCat).obj M\n⊢ ↑(↑WithOne.lift (f ≫ g)) none = ↑(↑WithOne.lift (MulHom.comp WithOne.coeMulHom f) ≫ ↑WithOne.lift g) none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase w.some\nS T : SemigroupCat\nM : MonCat\nf : S ⟶ T\ng : T ⟶ (forget₂ MonCat SemigroupCat).obj M\nval✝ : ↑S\n⊢ ↑(↑WithOne.lift (f ≫ g)) (some val✝) =\n ↑(↑WithOne.lift (MulHom.comp WithOne.coeMulHom f) ≫ ↑WithOne.lift g) (some val✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase w.some\nS T : SemigroupCat\nM : MonCat\nf : S ⟶ T\ng : T ⟶ (forget₂ MonCat SemigroupCat).obj M\nval✝ : ↑S\n⊢ ↑(↑WithOne.lift (f ≫ g)) (some val✝) =\n ↑(↑WithOne.lift g) (↑(↑WithOne.lift (MulHom.comp WithOne.coeMulHom f)) (some val✝))\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.MonCat.Adjunctions", "llama_tokens": 1032, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8791467675095292, "lm_q2_score": 0.6825737344123242, "lm_q1q2_score": 0.6000824921955027}}