{"text": "[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : DivisionRing K\ninst\u271d : CharZero K\na b : \u2115\nh : a \u2264 b\n\u22a2 \u2191(choose b a) = \u2191b ! / (\u2191a ! * \u2191(b - a)!)\n[PROOFSTEP]\nhave : \u2200 {n : \u2115}, (n ! : K) \u2260 0 := Nat.cast_ne_zero.2 (factorial_ne_zero _)\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : DivisionRing K\ninst\u271d : CharZero K\na b : \u2115\nh : a \u2264 b\nthis : \u2200 {n : \u2115}, \u2191n ! \u2260 0\n\u22a2 \u2191(choose b a) = \u2191b ! / (\u2191a ! * \u2191(b - a)!)\n[PROOFSTEP]\nrw [eq_div_iff_mul_eq (mul_ne_zero this this)]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : DivisionRing K\ninst\u271d : CharZero K\na b : \u2115\nh : a \u2264 b\nthis : \u2200 {n : \u2115}, \u2191n ! \u2260 0\n\u22a2 \u2191(choose b a) * (\u2191a ! * \u2191(b - a)!) = \u2191b !\n[PROOFSTEP]\nrw_mod_cast [\u2190 mul_assoc, choose_mul_factorial_mul_factorial h]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : DivisionRing K\ninst\u271d : CharZero K\na b : \u2115\n\u22a2 \u2191(choose (a + b) a) = \u2191(a + b)! / (\u2191a ! * \u2191b !)\n[PROOFSTEP]\nrw [cast_choose K (_root_.le_add_right le_rfl), add_tsub_cancel_left]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : DivisionRing K\ninst\u271d : CharZero K\na b : \u2115\n\u22a2 \u2191(choose a b) = Polynomial.eval (\u2191(a - (b - 1))) (pochhammer K b) / \u2191b !\n[PROOFSTEP]\nrw [eq_div_iff_mul_eq (cast_ne_zero.2 b.factorial_ne_zero : (b ! : K) \u2260 0), \u2190 cast_mul, mul_comm, \u2190\n  descFactorial_eq_factorial_mul_choose, \u2190 cast_descFactorial]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : DivisionRing K\ninst\u271d : CharZero K\na : \u2115\n\u22a2 \u2191(choose a 2) = \u2191a * (\u2191a - 1) / 2\n[PROOFSTEP]\nrw [\u2190 cast_descFactorial_two, descFactorial_eq_factorial_mul_choose, factorial_two, mul_comm, cast_mul, cast_two,\n  eq_div_iff_mul_eq (two_ne_zero : (2 : K) \u2260 0)]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Choose.Cast", "llama_tokens": 770, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240756264639, "lm_q2_score": 0.8080672112416737, "lm_q1q2_score": 0.6991592058906316}}
{"text": "[GOAL]\nn : \u2115\n\u22a2 \u2191n = 1 \u2194 Odd n\n[PROOFSTEP]\nrw [\u2190 @Nat.cast_one (ZMod 2), ZMod.eq_iff_modEq_nat, Nat.odd_iff, Nat.ModEq]\n[GOAL]\nn : \u2115\n\u22a2 n % 2 = 1 % 2 \u2194 n % 2 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\n\u22a2 \u2191n \u2260 0 \u2194 Odd n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : \u2115\n\u22a2 \u2191n \u2260 0 \u2192 Odd n\n[PROOFSTEP]\ncontrapose\n[GOAL]\ncase mp\nn : \u2115\n\u22a2 \u00acOdd n \u2192 \u00ac\u2191n \u2260 0\n[PROOFSTEP]\nsimp [eq_zero_iff_even]\n[GOAL]\ncase mpr\nn : \u2115\n\u22a2 Odd n \u2192 \u2191n \u2260 0\n[PROOFSTEP]\ncontrapose\n[GOAL]\ncase mpr\nn : \u2115\n\u22a2 \u00ac\u2191n \u2260 0 \u2192 \u00acOdd n\n[PROOFSTEP]\nsimp [eq_zero_iff_even]\n", "meta": {"mathlib_filename": "Mathlib.Data.ZMod.Parity", "llama_tokens": 315, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9184802350995703, "lm_q2_score": 0.7606506418255928, "lm_q1q2_score": 0.6986425803326096}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DivisionRing \u03b1\nn\u271d : \u2124\na : \u03b1\nn : \u2124\n\u22a2 (-a) ^ bit1 n = -a ^ bit1 n\n[PROOFSTEP]\nrw [zpow_bit1', zpow_bit1', neg_mul_neg, neg_mul_eq_mul_neg]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DivisionRing \u03b1\nn : \u2124\nh : Odd n\na : \u03b1\n\u22a2 (-a) ^ n = -a ^ n\n[PROOFSTEP]\nobtain \u27e8k, rfl\u27e9 := h.exists_bit1\n[GOAL]\ncase intro\n\u03b1 : Type u_1\ninst\u271d : DivisionRing \u03b1\na : \u03b1\nk : \u2124\nh : Odd (bit1 k)\n\u22a2 (-a) ^ bit1 k = -a ^ bit1 k\n[PROOFSTEP]\nexact zpow_bit1_neg _ _\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DivisionRing \u03b1\nn : \u2124\nh : Odd n\n\u22a2 (-1) ^ n = -1\n[PROOFSTEP]\nrw [h.neg_zpow, one_zpow]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Field.Power", "llama_tokens": 310, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9196425355825848, "lm_q2_score": 0.7577943712746406, "lm_q1q2_score": 0.6968999370492212}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : Module.Free R M\ninst\u271d\u00b9 : Module.Finite R M\ninst\u271d : Nontrivial M\n\u22a2 \u2191LinearMap.det 0 = 0\n[PROOFSTEP]\nletI : Nonempty (Module.Free.ChooseBasisIndex R M) := (Module.Free.chooseBasis R M).index_nonempty\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : Module.Free R M\ninst\u271d\u00b9 : Module.Finite R M\ninst\u271d : Nontrivial M\nthis : Nonempty (Module.Free.ChooseBasisIndex R M) := Basis.index_nonempty (Module.Free.chooseBasis R M)\n\u22a2 \u2191LinearMap.det 0 = 0\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : Module.Free R M\ninst\u271d\u00b9 : Module.Finite R M\ninst\u271d : Nontrivial M\nthis : Nonempty (Module.Free.ChooseBasisIndex R M) := Basis.index_nonempty (Module.Free.chooseBasis R M)\n\u271d : Nontrivial R\n\u22a2 \u2191LinearMap.det 0 = 0\n[PROOFSTEP]\nexact LinearMap.det_zero' (Module.Free.chooseBasis R M)\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.FreeModule.Determinant", "llama_tokens": 463, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9263037384317887, "lm_q2_score": 0.7520125737597972, "lm_q1q2_score": 0.6965920584214115}}
{"text": "[GOAL]\nF : Type u_1\ninst\u271d\u00b2 : Field F\ninst\u271d\u00b9 : Finite F\ninst\u271d : Algebra (ZMod (ringChar F)) F\na : F\nha : a \u2260 0\n\u22a2 \u2203 b, \u2191(Algebra.trace (ZMod (ringChar F)) F) (a * b) \u2260 0\n[PROOFSTEP]\nhaveI : Fact (ringChar F).Prime := \u27e8CharP.char_is_prime F _\u27e9\n[GOAL]\nF : Type u_1\ninst\u271d\u00b2 : Field F\ninst\u271d\u00b9 : Finite F\ninst\u271d : Algebra (ZMod (ringChar F)) F\na : F\nha : a \u2260 0\nthis : Fact (Nat.Prime (ringChar F))\n\u22a2 \u2203 b, \u2191(Algebra.trace (ZMod (ringChar F)) F) (a * b) \u2260 0\n[PROOFSTEP]\nhave htr := traceForm_nondegenerate (ZMod (ringChar F)) F a\n[GOAL]\nF : Type u_1\ninst\u271d\u00b2 : Field F\ninst\u271d\u00b9 : Finite F\ninst\u271d : Algebra (ZMod (ringChar F)) F\na : F\nha : a \u2260 0\nthis : Fact (Nat.Prime (ringChar F))\nhtr : (\u2200 (n : F), BilinForm.bilin (Algebra.traceForm (ZMod (ringChar F)) F) a n = 0) \u2192 a = 0\n\u22a2 \u2203 b, \u2191(Algebra.trace (ZMod (ringChar F)) F) (a * b) \u2260 0\n[PROOFSTEP]\nsimp_rw [Algebra.traceForm_apply] at htr \n[GOAL]\nF : Type u_1\ninst\u271d\u00b2 : Field F\ninst\u271d\u00b9 : Finite F\ninst\u271d : Algebra (ZMod (ringChar F)) F\na : F\nha : a \u2260 0\nthis : Fact (Nat.Prime (ringChar F))\nhtr : (\u2200 (n : F), \u2191(Algebra.trace (ZMod (ringChar F)) F) (a * n) = 0) \u2192 a = 0\n\u22a2 \u2203 b, \u2191(Algebra.trace (ZMod (ringChar F)) F) (a * b) \u2260 0\n[PROOFSTEP]\nby_contra' hf\n[GOAL]\nF : Type u_1\ninst\u271d\u00b2 : Field F\ninst\u271d\u00b9 : Finite F\ninst\u271d : Algebra (ZMod (ringChar F)) F\na : F\nha : a \u2260 0\nthis : Fact (Nat.Prime (ringChar F))\nhtr : (\u2200 (n : F), \u2191(Algebra.trace (ZMod (ringChar F)) F) (a * n) = 0) \u2192 a = 0\nhf : \u2200 (b : F), \u2191(Algebra.trace (ZMod (ringChar F)) F) (a * b) = 0\n\u22a2 False\n[PROOFSTEP]\nexact ha (htr hf)\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Finite.Trace", "llama_tokens": 771, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8840392817460332, "lm_q2_score": 0.7879311956428947, "lm_q1q2_score": 0.6965621282614378}}
{"text": "[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nx : \u2102\n\u22a2 HasDerivAt exp (exp x) x\n[PROOFSTEP]\nrw [hasDerivAt_iff_isLittleO_nhds_zero]\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nx : \u2102\n\u22a2 (fun h => exp (x + h) - exp x - h \u2022 exp x) =o[\ud835\udcdd 0] fun h => h\n[PROOFSTEP]\nhave : (1 : \u2115) < 2 := by norm_num\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nx : \u2102\n\u22a2 1 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nx : \u2102\nthis : 1 < 2\n\u22a2 (fun h => exp (x + h) - exp x - h \u2022 exp x) =o[\ud835\udcdd 0] fun h => h\n[PROOFSTEP]\nrefine' (IsBigO.of_bound \u2016exp x\u2016 _).trans_isLittleO (isLittleO_pow_id this)\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nx : \u2102\nthis : 1 < 2\n\u22a2 \u2200\u1da0 (x_1 : \u2102) in \ud835\udcdd 0, \u2016exp (x + x_1) - exp x - x_1 \u2022 exp x\u2016 \u2264 \u2016exp x\u2016 * \u2016x_1 ^ 2\u2016\n[PROOFSTEP]\nfilter_upwards [Metric.ball_mem_nhds (0 : \u2102) zero_lt_one]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nx : \u2102\nthis : 1 < 2\n\u22a2 \u2200 (a : \u2102), a \u2208 Metric.ball 0 1 \u2192 \u2016exp (x + a) - exp x - a \u2022 exp x\u2016 \u2264 \u2016exp x\u2016 * \u2016a ^ 2\u2016\n[PROOFSTEP]\nsimp only [Metric.mem_ball, dist_zero_right, norm_pow]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nx : \u2102\nthis : 1 < 2\n\u22a2 \u2200 (a : \u2102), \u2016a\u2016 < 1 \u2192 \u2016exp (x + a) - exp x - a \u2022 exp x\u2016 \u2264 \u2016exp x\u2016 * \u2016a\u2016 ^ 2\n[PROOFSTEP]\nexact fun z hz => exp_bound_sq x z hz.le\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nn : \u2115\n\u22a2 deriv^[n + 1] exp = exp\n[PROOFSTEP]\nrw [iterate_succ_apply, deriv_exp, iter_deriv_exp n]\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\n\u22a2 \u2200 {n : \u2115\u221e}, ContDiff \ud835\udd5c n exp\n[PROOFSTEP]\nrefine' @(contDiff_all_iff_nat.2 fun n => ?_)\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nn : \u2115\n\u22a2 ContDiff \ud835\udd5c (\u2191n) exp\n[PROOFSTEP]\nhave : ContDiff \u2102 (\u2191n) exp := by\n  induction' n with n ihn\n  \u00b7 exact contDiff_zero.2 continuous_exp\n  \u00b7 rw [contDiff_succ_iff_deriv]\n    use differentiable_exp\n    rwa [deriv_exp]\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nn : \u2115\n\u22a2 ContDiff \u2102 (\u2191n) exp\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\n\u22a2 ContDiff \u2102 (\u2191Nat.zero) exp\n[PROOFSTEP]\nexact contDiff_zero.2 continuous_exp\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nn : \u2115\nihn : ContDiff \u2102 (\u2191n) exp\n\u22a2 ContDiff \u2102 (\u2191(Nat.succ n)) exp\n[PROOFSTEP]\nrw [contDiff_succ_iff_deriv]\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nn : \u2115\nihn : ContDiff \u2102 (\u2191n) exp\n\u22a2 Differentiable \u2102 exp \u2227 ContDiff \u2102 (\u2191n) (deriv exp)\n[PROOFSTEP]\nuse differentiable_exp\n[GOAL]\ncase right\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nn : \u2115\nihn : ContDiff \u2102 (\u2191n) exp\n\u22a2 ContDiff \u2102 (\u2191n) (deriv exp)\n[PROOFSTEP]\nrwa [deriv_exp]\n[GOAL]\n\ud835\udd5c : Type u_1\ninst\u271d\u00b9 : NontriviallyNormedField \ud835\udd5c\ninst\u271d : NormedAlgebra \ud835\udd5c \u2102\nn : \u2115\nthis : ContDiff \u2102 (\u2191n) exp\n\u22a2 ContDiff \ud835\udd5c (\u2191n) exp\n[PROOFSTEP]\nexact this.restrict_scalars \ud835\udd5c\n[GOAL]\nx y z : \u211d\nn : \u2115\n\u22a2 deriv^[n + 1] exp = exp\n[PROOFSTEP]\nrw [iterate_succ_apply, deriv_exp, iter_deriv_exp n]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.ExpDeriv", "llama_tokens": 1730, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8774767874818408, "lm_q2_score": 0.7931059536292271, "lm_q1q2_score": 0.6959320643232959}}
{"text": "[GOAL]\nG : Type u_1\n\u03b1 : Type u_2\ninst\u271d\u2074 : Group G\ninst\u271d\u00b3 : MulAction G \u03b1\ninst\u271d\u00b2 : MeasurableSpace G\ninst\u271d\u00b9 : MeasurableSpace \u03b1\ninst\u271d : MeasurableSMul G \u03b1\ns : Set \u03b1\nhs : MeasurableSet s\na : G\n\u22a2 MeasurableSet (a \u2022 s)\n[PROOFSTEP]\nrw [\u2190 preimage_smul_inv]\n[GOAL]\nG : Type u_1\n\u03b1 : Type u_2\ninst\u271d\u2074 : Group G\ninst\u271d\u00b3 : MulAction G \u03b1\ninst\u271d\u00b2 : MeasurableSpace G\ninst\u271d\u00b9 : MeasurableSpace \u03b1\ninst\u271d : MeasurableSMul G \u03b1\ns : Set \u03b1\nhs : MeasurableSet s\na : G\n\u22a2 MeasurableSet ((fun x => a\u207b\u00b9 \u2022 x) \u207b\u00b9' s)\n[PROOFSTEP]\nexact measurable_const_smul _ hs\n[GOAL]\nG\u2080 : Type u_1\n\u03b1 : Type u_2\ninst\u271d\u2074 : GroupWithZero G\u2080\ninst\u271d\u00b3 : MulAction G\u2080 \u03b1\ninst\u271d\u00b2 : MeasurableSpace G\u2080\ninst\u271d\u00b9 : MeasurableSpace \u03b1\ninst\u271d : MeasurableSMul G\u2080 \u03b1\ns : Set \u03b1\nhs : MeasurableSet s\na : G\u2080\nha : a \u2260 0\n\u22a2 MeasurableSet (a \u2022 s)\n[PROOFSTEP]\nrw [\u2190 preimage_smul_inv\u2080 ha]\n[GOAL]\nG\u2080 : Type u_1\n\u03b1 : Type u_2\ninst\u271d\u2074 : GroupWithZero G\u2080\ninst\u271d\u00b3 : MulAction G\u2080 \u03b1\ninst\u271d\u00b2 : MeasurableSpace G\u2080\ninst\u271d\u00b9 : MeasurableSpace \u03b1\ninst\u271d : MeasurableSMul G\u2080 \u03b1\ns : Set \u03b1\nhs : MeasurableSet s\na : G\u2080\nha : a \u2260 0\n\u22a2 MeasurableSet ((fun x => a\u207b\u00b9 \u2022 x) \u207b\u00b9' s)\n[PROOFSTEP]\nexact measurable_const_smul _ hs\n[GOAL]\nG\u2080 : Type u_1\n\u03b1 : Type u_2\ninst\u271d\u2076 : GroupWithZero G\u2080\ninst\u271d\u2075 : Zero \u03b1\ninst\u271d\u2074 : MulActionWithZero G\u2080 \u03b1\ninst\u271d\u00b3 : MeasurableSpace G\u2080\ninst\u271d\u00b2 : MeasurableSpace \u03b1\ninst\u271d\u00b9 : MeasurableSMul G\u2080 \u03b1\ninst\u271d : MeasurableSingletonClass \u03b1\ns : Set \u03b1\nhs : MeasurableSet s\na : G\u2080\n\u22a2 MeasurableSet (a \u2022 s)\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nG\u2080 : Type u_1\n\u03b1 : Type u_2\ninst\u271d\u2076 : GroupWithZero G\u2080\ninst\u271d\u2075 : Zero \u03b1\ninst\u271d\u2074 : MulActionWithZero G\u2080 \u03b1\ninst\u271d\u00b3 : MeasurableSpace G\u2080\ninst\u271d\u00b2 : MeasurableSpace \u03b1\ninst\u271d\u00b9 : MeasurableSMul G\u2080 \u03b1\ninst\u271d : MeasurableSingletonClass \u03b1\ns : Set \u03b1\nhs : MeasurableSet s\n\u22a2 MeasurableSet (0 \u2022 s)\ncase inr\nG\u2080 : Type u_1\n\u03b1 : Type u_2\ninst\u271d\u2076 : GroupWithZero G\u2080\ninst\u271d\u2075 : Zero \u03b1\ninst\u271d\u2074 : MulActionWithZero G\u2080 \u03b1\ninst\u271d\u00b3 : MeasurableSpace G\u2080\ninst\u271d\u00b2 : MeasurableSpace \u03b1\ninst\u271d\u00b9 : MeasurableSMul G\u2080 \u03b1\ninst\u271d : MeasurableSingletonClass \u03b1\ns : Set \u03b1\nhs : MeasurableSet s\na : G\u2080\nha : a \u2260 0\n\u22a2 MeasurableSet (a \u2022 s)\n[PROOFSTEP]\nexacts [(subsingleton_zero_smul_set s).measurableSet, hs.const_smul_of_ne_zero ha]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Group.Pointwise", "llama_tokens": 1036, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9111797075998823, "lm_q2_score": 0.7634837635542924, "lm_q1q2_score": 0.6956709124326578}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : Nontrivial R\ninst\u271d\u00b2 : LinearOrderedCommRing S\nn : Type u_3\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nA : Matrix n n R\nabv : AbsoluteValue R S\nx : S\nhx : \u2200 (i j : n), \u2191abv (A i j) \u2264 x\n\u03c3 : Perm n\nx\u271d : \u03c3 \u2208 univ\n\u22a2 \u2191abv (\u2191Perm.sign \u03c3 \u2022 \u220f i : n, A (\u2191\u03c3 i) i) = \u220f i : n, \u2191abv (A (\u2191\u03c3 i) i)\n[PROOFSTEP]\nrw [abv.map_units_int_smul, abv.map_prod]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : Nontrivial R\ninst\u271d\u00b2 : LinearOrderedCommRing S\nn : Type u_3\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nA : Matrix n n R\nabv : AbsoluteValue R S\nx : S\nhx : \u2200 (i j : n), \u2191abv (A i j) \u2264 x\nx\u271d\u00b9 : Perm n\nx\u271d : x\u271d\u00b9 \u2208 univ\n\u22a2 \u220f _i : n, x = x ^ Fintype.card n\n[PROOFSTEP]\nrw [prod_const, Finset.card_univ]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : Nontrivial R\ninst\u271d\u00b2 : LinearOrderedCommRing S\nn : Type u_3\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nA : Matrix n n R\nabv : AbsoluteValue R S\nx : S\nhx : \u2200 (i j : n), \u2191abv (A i j) \u2264 x\n\u22a2 \u2211 _\u03c3 : Perm n, x ^ Fintype.card n = Nat.factorial (Fintype.card n) \u2022 x ^ Fintype.card n\n[PROOFSTEP]\nrw [sum_const, Finset.card_univ, Fintype.card_perm]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : Nontrivial R\ninst\u271d\u00b2 : LinearOrderedCommRing S\nn : Type u_3\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\n\u03b9 : Type u_4\ns : Finset \u03b9\nA : \u03b9 \u2192 Matrix n n R\nabv : AbsoluteValue R S\nx : S\nhx : \u2200 (k : \u03b9) (i j : n), \u2191abv (A k i j) \u2264 x\ni j : n\n\u22a2 \u2191abv (Finset.sum s (fun k => A k) i j) = \u2191abv (\u2211 k in s, A k i j)\n[PROOFSTEP]\nsimp only [sum_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : Nontrivial R\ninst\u271d\u00b2 : LinearOrderedCommRing S\nn : Type u_3\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\n\u03b9 : Type u_4\ns : Finset \u03b9\nc : \u03b9 \u2192 R\nA : \u03b9 \u2192 Matrix n n R\nabv : AbsoluteValue R S\nx : S\nhx : \u2200 (k : \u03b9) (i j : n), \u2191abv (A k i j) \u2264 x\ny : S\nhy : \u2200 (k : \u03b9), \u2191abv (c k) \u2264 y\n\u22a2 \u2191abv (det (\u2211 k in s, c k \u2022 A k)) \u2264 Nat.factorial (Fintype.card n) \u2022 (card s \u2022 y * x) ^ Fintype.card n\n[PROOFSTEP]\nsimpa only [smul_mul_assoc] using\n  det_sum_le s fun k i j =>\n    calc\n      abv (c k * A k i j) = abv (c k) * abv (A k i j) := abv.map_mul _ _\n      _ \u2264 y * x := mul_le_mul (hy k) (hx k i j) (abv.nonneg _) ((abv.nonneg _).trans (hy k))\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.AbsoluteValue", "llama_tokens": 1186, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8918110368115781, "lm_q2_score": 0.7799929053683038, "lm_q1q2_score": 0.6956062816421822}}
{"text": "[GOAL]\nd : \u2115\nx y a b : \u2124\nh\u2081 : \u2191d \u2223 x\nh\u2082 : \u2191d \u2223 y\nh\u2083 : x * a + y * b = \u2191d\n\u22a2 Int.gcd x y = d\n[PROOFSTEP]\nrefine Nat.dvd_antisymm ?_ (Int.coe_nat_dvd.1 (Int.dvd_gcd h\u2081 h\u2082))\n[GOAL]\nd : \u2115\nx y a b : \u2124\nh\u2081 : \u2191d \u2223 x\nh\u2082 : \u2191d \u2223 y\nh\u2083 : x * a + y * b = \u2191d\n\u22a2 Int.gcd x y \u2223 d\n[PROOFSTEP]\nrw [\u2190 Int.coe_nat_dvd, \u2190 h\u2083]\n[GOAL]\nd : \u2115\nx y a b : \u2124\nh\u2081 : \u2191d \u2223 x\nh\u2082 : \u2191d \u2223 y\nh\u2083 : x * a + y * b = \u2191d\n\u22a2 \u2191(Int.gcd x y) \u2223 x * a + y * b\n[PROOFSTEP]\napply dvd_add\n[GOAL]\ncase h\u2081\nd : \u2115\nx y a b : \u2124\nh\u2081 : \u2191d \u2223 x\nh\u2082 : \u2191d \u2223 y\nh\u2083 : x * a + y * b = \u2191d\n\u22a2 \u2191(Int.gcd x y) \u2223 x * a\n[PROOFSTEP]\nexact (Int.gcd_dvd_left _ _).mul_right _\n[GOAL]\ncase h\u2082\nd : \u2115\nx y a b : \u2124\nh\u2081 : \u2191d \u2223 x\nh\u2082 : \u2191d \u2223 y\nh\u2083 : x * a + y * b = \u2191d\n\u22a2 \u2191(Int.gcd x y) \u2223 y * b\n[PROOFSTEP]\nexact (Int.gcd_dvd_right _ _).mul_right _\n[GOAL]\nd x y a b : \u2115\nhu : x % d = 0\nhv : y % d = 0\nh : x * a = y * b + d\n\u22a2 Nat.gcd x y = d\n[PROOFSTEP]\nrw [\u2190 Int.coe_nat_gcd]\n[GOAL]\nd x y a b : \u2115\nhu : x % d = 0\nhv : y % d = 0\nh : x * a = y * b + d\n\u22a2 Int.gcd \u2191x \u2191y = d\n[PROOFSTEP]\napply\n  int_gcd_helper' a (-b) (Int.coe_nat_dvd.mpr (Nat.dvd_of_mod_eq_zero hu))\n    (Int.coe_nat_dvd.mpr (Nat.dvd_of_mod_eq_zero hv))\n[GOAL]\nd x y a b : \u2115\nhu : x % d = 0\nhv : y % d = 0\nh : x * a = y * b + d\n\u22a2 \u2191x * \u2191a + \u2191y * -\u2191b = \u2191d\n[PROOFSTEP]\nrw [mul_neg, \u2190 sub_eq_add_neg, sub_eq_iff_eq_add']\n[GOAL]\nd x y a b : \u2115\nhu : x % d = 0\nhv : y % d = 0\nh : x * a = y * b + d\n\u22a2 \u2191x * \u2191a = \u2191y * \u2191b + \u2191d\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nx y d m : \u2115\nhd : Nat.gcd x y = d\nd0 : Nat.beq d 0 = false\ndm : x * y = d * m\n\u22a2 (fun x x_1 => x * x_1) d (Nat.lcm x y) = (fun x x_1 => x * x_1) d m\n[PROOFSTEP]\ndsimp only\n  -- Porting note: the `dsimp only` was not necessary in Lean3.\n[GOAL]\nx y d m : \u2115\nhd : Nat.gcd x y = d\nd0 : Nat.beq d 0 = false\ndm : x * y = d * m\n\u22a2 d * Nat.lcm x y = d * m\n[PROOFSTEP]\nrw [\u2190 dm, \u2190 hd, Nat.gcd_mul_lcm]\n[GOAL]\nx y : \u2124\nx' y' d : \u2115\nhx : Int.natAbs x = x'\nhy : Int.natAbs y = y'\nh : Nat.gcd x' y' = d\n\u22a2 Int.gcd x y = d\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nx y : \u2124\n\u22a2 Int.gcd x y = Nat.gcd (Int.natAbs x) (Int.natAbs y)\n[PROOFSTEP]\nrw [Int.gcd_def]\n[GOAL]\nx y : \u2124\nx' y' d : \u2115\nhx : Int.natAbs x = x'\nhy : Int.natAbs y = y'\nh : Nat.lcm x' y' = d\n\u22a2 Int.lcm x y = d\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nx y : \u2124\n\u22a2 Int.lcm x y = Nat.lcm (Int.natAbs x) (Int.natAbs y)\n[PROOFSTEP]\nrw [Int.lcm_def]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.NormNum.GCD", "llama_tokens": 1369, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8887587817066392, "lm_q2_score": 0.7826624840223698, "lm_q1q2_score": 0.6955981557872134}}
{"text": "[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nR : Type u_3\nM : Type u_4\n\u03b9 : Type u_5\ninst\u271d\u00b2 : Semiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nr s\u271d : R\nx y : M\ns : Multiset R\nt : Multiset M\n\u22a2 sum s \u2022 sum t = sum (map (fun p => p.fst \u2022 p.snd) (s \u00d7\u02e2 t))\n[PROOFSTEP]\ninduction' s using Multiset.induction with a s ih\n[GOAL]\ncase empty\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nR : Type u_3\nM : Type u_4\n\u03b9 : Type u_5\ninst\u271d\u00b2 : Semiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nr s : R\nx y : M\nt : Multiset M\n\u22a2 sum 0 \u2022 sum t = sum (map (fun p => p.fst \u2022 p.snd) (0 \u00d7\u02e2 t))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nR : Type u_3\nM : Type u_4\n\u03b9 : Type u_5\ninst\u271d\u00b2 : Semiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nr s\u271d : R\nx y : M\nt : Multiset M\na : R\ns : Multiset R\nih : sum s \u2022 sum t = sum (map (fun p => p.fst \u2022 p.snd) (s \u00d7\u02e2 t))\n\u22a2 sum (a ::\u2098 s) \u2022 sum t = sum (map (fun p => p.fst \u2022 p.snd) ((a ::\u2098 s) \u00d7\u02e2 t))\n[PROOFSTEP]\nsimp [add_smul, ih, \u2190 Multiset.smul_sum]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nR : Type u_3\nM : Type u_4\n\u03b9 : Type u_5\ninst\u271d\u00b2 : Semiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nr s\u271d : R\nx y : M\nf : \u03b1 \u2192 R\ng : \u03b2 \u2192 M\ns : Finset \u03b1\nt : Finset \u03b2\n\u22a2 (\u2211 i in s, f i) \u2022 \u2211 i in t, g i = \u2211 p in s \u00d7\u02e2 t, f p.fst \u2022 g p.snd\n[PROOFSTEP]\nrw [Finset.sum_product, Finset.sum_smul, Finset.sum_congr rfl]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nR : Type u_3\nM : Type u_4\n\u03b9 : Type u_5\ninst\u271d\u00b2 : Semiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nr s\u271d : R\nx y : M\nf : \u03b1 \u2192 R\ng : \u03b2 \u2192 M\ns : Finset \u03b1\nt : Finset \u03b2\n\u22a2 \u2200 (x : \u03b1), x \u2208 s \u2192 f x \u2022 \u2211 i in t, g i = \u2211 y in t, f (x, y).fst \u2022 g (x, y).snd\n[PROOFSTEP]\nintros\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nR : Type u_3\nM : Type u_4\n\u03b9 : Type u_5\ninst\u271d\u00b2 : Semiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nr s\u271d : R\nx y : M\nf : \u03b1 \u2192 R\ng : \u03b2 \u2192 M\ns : Finset \u03b1\nt : Finset \u03b2\nx\u271d : \u03b1\na\u271d : x\u271d \u2208 s\n\u22a2 f x\u271d \u2022 \u2211 i in t, g i = \u2211 y in t, f (x\u271d, y).fst \u2022 g (x\u271d, y).snd\n[PROOFSTEP]\nrw [Finset.smul_sum]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nR : Type u_3\nM : Type u_4\n\u03b9 : Type u_5\ninst\u271d : CommSemiring R\ns : Finset \u03b1\n\u22a2 \u2191(card s) = \u2211 a in s, 1\n[PROOFSTEP]\nrw [Finset.sum_const, Nat.smul_one_eq_coe]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.BigOperators", "llama_tokens": 1155, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.863391617003942, "lm_q2_score": 0.8056321866478978, "lm_q1q2_score": 0.6955760763403501}}
{"text": "[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\n\u22a2 \u2016U i j\u2016 \u2264 1\n[PROOFSTEP]\nhave norm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x, \u2016U i x\u2016 ^ 2 :=\n  by\n  apply Multiset.single_le_sum\n  \u00b7 intro x h_x\n    rw [Multiset.mem_map] at h_x \n    cases' h_x with a h_a\n    rw [\u2190 h_a.2]\n    apply sq_nonneg\n  \u00b7 rw [Multiset.mem_map]\n    use j\n    simp only [eq_self_iff_true, Finset.mem_univ_val, and_self_iff, sq_eq_sq]\n      -- The L2 norm of a row is a diagonal entry of U * U\u1d34\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\n\u22a2 \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\n[PROOFSTEP]\napply Multiset.single_le_sum\n[GOAL]\ncase a\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\n\u22a2 \u2200 (x : \u211d), x \u2208 Multiset.map (fun x => \u2016U i x\u2016 ^ 2) Finset.univ.val \u2192 0 \u2264 x\n[PROOFSTEP]\nintro x h_x\n[GOAL]\ncase a\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nx : \u211d\nh_x : x \u2208 Multiset.map (fun x => \u2016U i x\u2016 ^ 2) Finset.univ.val\n\u22a2 0 \u2264 x\n[PROOFSTEP]\nrw [Multiset.mem_map] at h_x \n[GOAL]\ncase a\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nx : \u211d\nh_x : \u2203 a, a \u2208 Finset.univ.val \u2227 \u2016U i a\u2016 ^ 2 = x\n\u22a2 0 \u2264 x\n[PROOFSTEP]\ncases' h_x with a h_a\n[GOAL]\ncase a.intro\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nx : \u211d\na : n\nh_a : a \u2208 Finset.univ.val \u2227 \u2016U i a\u2016 ^ 2 = x\n\u22a2 0 \u2264 x\n[PROOFSTEP]\nrw [\u2190 h_a.2]\n[GOAL]\ncase a.intro\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nx : \u211d\na : n\nh_a : a \u2208 Finset.univ.val \u2227 \u2016U i a\u2016 ^ 2 = x\n\u22a2 0 \u2264 \u2016U i a\u2016 ^ 2\n[PROOFSTEP]\napply sq_nonneg\n[GOAL]\ncase a\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\n\u22a2 \u2016U i j\u2016 ^ 2 \u2208 Multiset.map (fun x => \u2016U i x\u2016 ^ 2) Finset.univ.val\n[PROOFSTEP]\nrw [Multiset.mem_map]\n[GOAL]\ncase a\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\n\u22a2 \u2203 a, a \u2208 Finset.univ.val \u2227 \u2016U i a\u2016 ^ 2 = \u2016U i j\u2016 ^ 2\n[PROOFSTEP]\nuse j\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\n\u22a2 j \u2208 Finset.univ.val \u2227 \u2016U i j\u2016 ^ 2 = \u2016U i j\u2016 ^ 2\n[PROOFSTEP]\nsimp only [eq_self_iff_true, Finset.mem_univ_val, and_self_iff, sq_eq_sq]\n  -- The L2 norm of a row is a diagonal entry of U * U\u1d34\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\n\u22a2 \u2016U i j\u2016 \u2264 1\n[PROOFSTEP]\nhave diag_eq_norm_sum : (U * U\u1d34) i i = \u2211 x : n, \u2016U i x\u2016 ^ 2 := by\n  simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, \u2190 starRingEnd_apply, IsROrC.mul_conj, IsROrC.normSq_eq_def',\n    IsROrC.ofReal_pow];\n  norm_cast\n    -- The L2 norm of a row is a diagonal entry of U * U\u1d34, real part\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\n\u22a2 (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\n[PROOFSTEP]\nsimp only [Matrix.mul_apply, Matrix.conjTranspose_apply, \u2190 starRingEnd_apply, IsROrC.mul_conj, IsROrC.normSq_eq_def',\n  IsROrC.ofReal_pow]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\n\u22a2 \u2211 x : n, \u2191\u2016U i x\u2016 ^ 2 = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\n[PROOFSTEP]\nnorm_cast\n  -- The L2 norm of a row is a diagonal entry of U * U\u1d34, real part\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\n\u22a2 \u2016U i j\u2016 \u2264 1\n[PROOFSTEP]\nhave re_diag_eq_norm_sum : IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2 :=\n  by\n  rw [IsROrC.ext_iff] at diag_eq_norm_sum \n  rw [diag_eq_norm_sum.1]\n  norm_cast\n    -- Since U is unitary, the diagonal entries of U * U\u1d34 are all 1\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\n\u22a2 \u2191IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2\n[PROOFSTEP]\nrw [IsROrC.ext_iff] at diag_eq_norm_sum \n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum\u271d : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\ndiag_eq_norm_sum :\n  \u2191IsROrC.re ((U * U\u1d34) i i) = \u2191IsROrC.re \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2) \u2227\n    \u2191IsROrC.im ((U * U\u1d34) i i) = \u2191IsROrC.im \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\n\u22a2 \u2191IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2\n[PROOFSTEP]\nrw [diag_eq_norm_sum.1]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum\u271d : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\ndiag_eq_norm_sum :\n  \u2191IsROrC.re ((U * U\u1d34) i i) = \u2191IsROrC.re \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2) \u2227\n    \u2191IsROrC.im ((U * U\u1d34) i i) = \u2191IsROrC.im \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\n\u22a2 \u2191IsROrC.re \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2) = \u2211 x : n, \u2016U i x\u2016 ^ 2\n[PROOFSTEP]\nnorm_cast\n  -- Since U is unitary, the diagonal entries of U * U\u1d34 are all 1\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\nre_diag_eq_norm_sum : \u2191IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2\n\u22a2 \u2016U i j\u2016 \u2264 1\n[PROOFSTEP]\nhave mul_eq_one : U * U\u1d34 = 1 := unitary.mul_star_self_of_mem hU\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\nre_diag_eq_norm_sum : \u2191IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2\nmul_eq_one : U * U\u1d34 = 1\n\u22a2 \u2016U i j\u2016 \u2264 1\n[PROOFSTEP]\nhave diag_eq_one : IsROrC.re ((U * U\u1d34) i i) = 1 := by\n  simp only [mul_eq_one, eq_self_iff_true, Matrix.one_apply_eq, IsROrC.one_re]\n    -- Putting it all together\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\nre_diag_eq_norm_sum : \u2191IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2\nmul_eq_one : U * U\u1d34 = 1\n\u22a2 \u2191IsROrC.re ((U * U\u1d34) i i) = 1\n[PROOFSTEP]\nsimp only [mul_eq_one, eq_self_iff_true, Matrix.one_apply_eq, IsROrC.one_re]\n  -- Putting it all together\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\nre_diag_eq_norm_sum : \u2191IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2\nmul_eq_one : U * U\u1d34 = 1\ndiag_eq_one : \u2191IsROrC.re ((U * U\u1d34) i i) = 1\n\u22a2 \u2016U i j\u2016 \u2264 1\n[PROOFSTEP]\nrw [\u2190 sq_le_one_iff (norm_nonneg (U i j)), \u2190 diag_eq_one, re_diag_eq_norm_sum]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni j : n\nnorm_sum : \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\ndiag_eq_norm_sum : (U * U\u1d34) i i = \u2191(\u2211 x : n, \u2016U i x\u2016 ^ 2)\nre_diag_eq_norm_sum : \u2191IsROrC.re ((U * U\u1d34) i i) = \u2211 x : n, \u2016U i x\u2016 ^ 2\nmul_eq_one : U * U\u1d34 = 1\ndiag_eq_one : \u2191IsROrC.re ((U * U\u1d34) i i) = 1\n\u22a2 \u2016U i j\u2016 ^ 2 \u2264 \u2211 x : n, \u2016U i x\u2016 ^ 2\n[PROOFSTEP]\nexact norm_sum\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\n\u22a2 \u2016U\u2016 \u2264 1\n[PROOFSTEP]\nconv =>\n  -- Porting note: was `simp_rw [pi_norm_le_iff_of_nonneg zero_le_one]`\n  rw [pi_norm_le_iff_of_nonneg zero_le_one]\n  intro\n  rw [pi_norm_le_iff_of_nonneg zero_le_one]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\n| \u2016U\u2016 \u2264 1\n[PROOFSTEP]\n  rw [pi_norm_le_iff_of_nonneg zero_le_one]\n  intro\n  rw [pi_norm_le_iff_of_nonneg zero_le_one]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\n| \u2016U\u2016 \u2264 1\n[PROOFSTEP]\n  rw [pi_norm_le_iff_of_nonneg zero_le_one]\n  intro\n  rw [pi_norm_le_iff_of_nonneg zero_le_one]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\n| \u2016U\u2016 \u2264 1\n[PROOFSTEP]\nrw [pi_norm_le_iff_of_nonneg zero_le_one]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\n| \u2200 (i : n), \u2016U i\u2016 \u2264 1\n[PROOFSTEP]\nintro\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni\u271d : n\n| \u2016U i\u271d\u2016 \u2264 1\n[PROOFSTEP]\nrw [pi_norm_le_iff_of_nonneg zero_le_one]\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\n\u22a2 \u2200 (i i_1 : n), \u2016U i i_1\u2016 \u2264 1\n[PROOFSTEP]\nintros\n[GOAL]\n\ud835\udd5c : Type u_1\nm : Type u_2\nn : Type u_3\nE : Type u_4\ninst\u271d\u00b2 : IsROrC \ud835\udd5c\ninst\u271d\u00b9 : Fintype n\ninst\u271d : DecidableEq n\nU : Matrix n n \ud835\udd5c\nhU : U \u2208 Matrix.unitaryGroup n \ud835\udd5c\ni\u271d\u00b9 i\u271d : n\n\u22a2 \u2016U i\u271d\u00b9 i\u271d\u2016 \u2264 1\n[PROOFSTEP]\nexact entry_norm_bound_of_unitary hU _ _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Star.Matrix", "llama_tokens": 6349, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8947894717137996, "lm_q2_score": 0.7772998560157665, "lm_q1q2_score": 0.6955197275275602}}
{"text": "[GOAL]\n\u22a2 DecidableRel fun x x_1 => x \u2264 x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n\u22a2 DecidableEq \u2124\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n\u22a2 DecidableRel fun x x_1 => x < x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b : \u2124\nh : a * b = 0\nhlt\u2081 : 0 < a\nhlt\u2082 : 0 < b\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nhave : 0 < a * b := Int.mul_pos hlt\u2081 hlt\u2082\n[GOAL]\na b : \u2124\nh : a * b = 0\nhlt\u2081 : 0 < a\nhlt\u2082 : 0 < b\nthis : 0 < a * b\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\na b : \u2124\nh : a * b = 0\nhlt\u2081 : 0 < a\nhlt\u2082 : 0 < b\nthis : 0 < 0\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nexact absurd this (lt_irrefl _)\n[GOAL]\na b : \u2124\nh : a * b = 0\nhlt\u2081 : 0 < a\nhgt\u2082 : b < 0\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nhave : 0 > a * b := Int.mul_neg_of_pos_of_neg hlt\u2081 hgt\u2082\n[GOAL]\na b : \u2124\nh : a * b = 0\nhlt\u2081 : 0 < a\nhgt\u2082 : b < 0\nthis : 0 > a * b\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\na b : \u2124\nh : a * b = 0\nhlt\u2081 : 0 < a\nhgt\u2082 : b < 0\nthis : 0 > 0\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nexact absurd this (lt_irrefl _)\n[GOAL]\na b : \u2124\nh : a * b = 0\nhgt\u2081 : a < 0\nhlt\u2082 : 0 < b\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nhave : 0 > a * b := Int.mul_neg_of_neg_of_pos hgt\u2081 hlt\u2082\n[GOAL]\na b : \u2124\nh : a * b = 0\nhgt\u2081 : a < 0\nhlt\u2082 : 0 < b\nthis : 0 > a * b\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\na b : \u2124\nh : a * b = 0\nhgt\u2081 : a < 0\nhlt\u2082 : 0 < b\nthis : 0 > 0\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nexact absurd this (lt_irrefl _)\n[GOAL]\na b : \u2124\nh : a * b = 0\nhgt\u2081 : a < 0\nhgt\u2082 : b < 0\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nhave : 0 < a * b := Int.mul_pos_of_neg_of_neg hgt\u2081 hgt\u2082\n[GOAL]\na b : \u2124\nh : a * b = 0\nhgt\u2081 : a < 0\nhgt\u2082 : b < 0\nthis : 0 < a * b\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\na b : \u2124\nh : a * b = 0\nhgt\u2081 : a < 0\nhgt\u2082 : b < 0\nthis : 0 < 0\n\u22a2 a = 0 \u2228 b = 0\n[PROOFSTEP]\nexact absurd this (lt_irrefl _)\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Int.Order", "llama_tokens": 1038, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8824278664544911, "lm_q2_score": 0.7879311931529758, "lm_q1q2_score": 0.695292441686922}}
{"text": "[GOAL]\nn : \u2115\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf : Fin n \u2192 \u03b1\nP : (Fin n \u2192 \u03b1) \u2192 Prop\nhf : P f\nh :\n  \u2200 (\u03c3 : Equiv.Perm (Fin n)) (i j : Fin n),\n    i < j \u2192 (f \u2218 \u2191\u03c3) j < (f \u2218 \u2191\u03c3) i \u2192 P (f \u2218 \u2191\u03c3) \u2192 P (f \u2218 \u2191\u03c3 \u2218 \u2191(Equiv.swap i j))\n\u22a2 P (f \u2218 \u2191(sort f))\n[PROOFSTEP]\nletI := @Preorder.lift _ (Lex (Fin n \u2192 \u03b1)) _ fun \u03c3 : Equiv.Perm (Fin n) => toLex (f \u2218 \u03c3)\n[GOAL]\nn : \u2115\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf : Fin n \u2192 \u03b1\nP : (Fin n \u2192 \u03b1) \u2192 Prop\nhf : P f\nh :\n  \u2200 (\u03c3 : Equiv.Perm (Fin n)) (i j : Fin n),\n    i < j \u2192 (f \u2218 \u2191\u03c3) j < (f \u2218 \u2191\u03c3) i \u2192 P (f \u2218 \u2191\u03c3) \u2192 P (f \u2218 \u2191\u03c3 \u2218 \u2191(Equiv.swap i j))\nthis : Preorder (Equiv.Perm (Fin n)) := Preorder.lift fun \u03c3 => \u2191toLex (f \u2218 \u2191\u03c3)\n\u22a2 P (f \u2218 \u2191(sort f))\n[PROOFSTEP]\nrefine'\n  @WellFounded.induction_bot' _ _ _ (IsWellFounded.wf : WellFounded (\u00b7 < \u00b7)) (Equiv.refl _) (sort f) P (fun \u03c3 => f \u2218 \u03c3)\n    (fun \u03c3 h\u03c3 hf\u03c3 => _) hf\n[GOAL]\nn : \u2115\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf : Fin n \u2192 \u03b1\nP : (Fin n \u2192 \u03b1) \u2192 Prop\nhf : P f\nh :\n  \u2200 (\u03c3 : Equiv.Perm (Fin n)) (i j : Fin n),\n    i < j \u2192 (f \u2218 \u2191\u03c3) j < (f \u2218 \u2191\u03c3) i \u2192 P (f \u2218 \u2191\u03c3) \u2192 P (f \u2218 \u2191\u03c3 \u2218 \u2191(Equiv.swap i j))\nthis : Preorder (Equiv.Perm (Fin n)) := Preorder.lift fun \u03c3 => \u2191toLex (f \u2218 \u2191\u03c3)\n\u03c3 : Fin n \u2243 Fin n\nh\u03c3 : (fun \u03c3 => f \u2218 \u2191\u03c3) \u03c3 \u2260 (fun \u03c3 => f \u2218 \u2191\u03c3) (sort f)\nhf\u03c3 : P ((fun \u03c3 => f \u2218 \u2191\u03c3) \u03c3)\n\u22a2 \u2203 c, c < \u03c3 \u2227 P ((fun \u03c3 => f \u2218 \u2191\u03c3) c)\n[PROOFSTEP]\nobtain \u27e8i, j, hij\u2081, hij\u2082\u27e9 := antitone_pair_of_not_sorted' h\u03c3\n[GOAL]\ncase intro.intro.intro\nn : \u2115\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf : Fin n \u2192 \u03b1\nP : (Fin n \u2192 \u03b1) \u2192 Prop\nhf : P f\nh :\n  \u2200 (\u03c3 : Equiv.Perm (Fin n)) (i j : Fin n),\n    i < j \u2192 (f \u2218 \u2191\u03c3) j < (f \u2218 \u2191\u03c3) i \u2192 P (f \u2218 \u2191\u03c3) \u2192 P (f \u2218 \u2191\u03c3 \u2218 \u2191(Equiv.swap i j))\nthis : Preorder (Equiv.Perm (Fin n)) := Preorder.lift fun \u03c3 => \u2191toLex (f \u2218 \u2191\u03c3)\n\u03c3 : Fin n \u2243 Fin n\nh\u03c3 : (fun \u03c3 => f \u2218 \u2191\u03c3) \u03c3 \u2260 (fun \u03c3 => f \u2218 \u2191\u03c3) (sort f)\nhf\u03c3 : P ((fun \u03c3 => f \u2218 \u2191\u03c3) \u03c3)\ni j : Fin n\nhij\u2081 : i < j\nhij\u2082 : (f \u2218 \u2191\u03c3) j < (f \u2218 \u2191\u03c3) i\n\u22a2 \u2203 c, c < \u03c3 \u2227 P ((fun \u03c3 => f \u2218 \u2191\u03c3) c)\n[PROOFSTEP]\nexact \u27e8\u03c3 * Equiv.swap i j, Pi.lex_desc hij\u2081.le hij\u2082, h \u03c3 i j hij\u2081 hij\u2082 hf\u03c3\u27e9\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.Tuple.BubbleSortInduction", "llama_tokens": 1103, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9032942067038784, "lm_q2_score": 0.7690802264851919, "lm_q1q2_score": 0.6947057130745805}}
{"text": "[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\n\u22a2 \u2200 (n : \u2115),\n    (\u2200 (m : \u2115), m < n \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts) \u2192\n      \u2203 conts, continuantsAux (of v) n = Pair.map Rat.cast conts\n[PROOFSTEP]\nclear n\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\n\u22a2 \u2200 (n : \u2115),\n    (\u2200 (m : \u2115), m < n \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts) \u2192\n      \u2203 conts, continuantsAux (of v) n = Pair.map Rat.cast conts\n[PROOFSTEP]\nlet g := of v\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\n\u22a2 \u2200 (n : \u2115),\n    (\u2200 (m : \u2115), m < n \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts) \u2192\n      \u2203 conts, continuantsAux (of v) n = Pair.map Rat.cast conts\n[PROOFSTEP]\nintro n IH\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < n \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 \u2203 conts, continuantsAux (of v) n = Pair.map Rat.cast conts\n[PROOFSTEP]\nrcases n with\n  (_ | _ | n)\n    -- n = 0\n[GOAL]\ncase zero\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 \u2203 conts, continuantsAux (of v) Nat.zero = Pair.map Rat.cast conts\n[PROOFSTEP]\nsuffices \u2203 gp : Pair \u211a, Pair.mk (1 : K) 0 = gp.map (\u2191) by simpa [continuantsAux]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\nthis : \u2203 gp, { a := 1, b := 0 } = Pair.map Rat.cast gp\n\u22a2 \u2203 conts, continuantsAux (of v) Nat.zero = Pair.map Rat.cast conts\n[PROOFSTEP]\nsimpa [continuantsAux]\n[GOAL]\ncase zero\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 \u2203 gp, { a := 1, b := 0 } = Pair.map Rat.cast gp\n[PROOFSTEP]\nuse Pair.mk 1 0\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 { a := 1, b := 0 } = Pair.map Rat.cast { a := 1, b := 0 }\n[PROOFSTEP]\nsimp\n  -- n = 1\n[GOAL]\ncase succ.zero\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.succ Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ Nat.zero) = Pair.map Rat.cast conts\n[PROOFSTEP]\nsuffices \u2203 conts : Pair \u211a, Pair.mk g.h 1 = conts.map (\u2191) by simpa [continuantsAux]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.succ Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\nthis : \u2203 conts, { a := g.h, b := 1 } = Pair.map Rat.cast conts\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ Nat.zero) = Pair.map Rat.cast conts\n[PROOFSTEP]\nsimpa [continuantsAux]\n[GOAL]\ncase succ.zero\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.succ Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 \u2203 conts, { a := g.h, b := 1 } = Pair.map Rat.cast conts\n[PROOFSTEP]\nuse Pair.mk \u230av\u230b 1\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nIH : \u2200 (m : \u2115), m < Nat.succ Nat.zero \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 { a := g.h, b := 1 } = Pair.map Rat.cast { a := \u2191\u230av\u230b, b := 1 }\n[PROOFSTEP]\nsimp\n  -- 2 \u2264 n\n[GOAL]\ncase succ.succ\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast conts\n[PROOFSTEP]\ncases' IH (n + 1) <| lt_add_one (n + 1) with pred_conts pred_conts_eq\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast conts\n[PROOFSTEP]\ncases' s_ppred_nth_eq : g.s.get? n with gp_n\n[GOAL]\ncase succ.succ.intro.none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = none\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast conts\n[PROOFSTEP]\nuse pred_conts\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = none\n\u22a2 continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast pred_conts\n[PROOFSTEP]\nhave : g.continuantsAux (n + 2) = g.continuantsAux (n + 1) :=\n  continuantsAux_stable_of_terminated (n + 1).le_succ s_ppred_nth_eq\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = none\nthis : continuantsAux g (n + 2) = continuantsAux g (n + 1)\n\u22a2 continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast pred_conts\n[PROOFSTEP]\nsimp only [this, pred_conts_eq]\n  -- option.some\n[GOAL]\ncase succ.succ.intro.some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast conts\n[PROOFSTEP]\ncases' IH n <| lt_of_le_of_lt n.le_succ <| lt_add_one <| n + 1 with ppred_conts ppred_conts_eq\n[GOAL]\ncase succ.succ.intro.some.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\nppred_conts : Pair \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast ppred_conts\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast conts\n[PROOFSTEP]\nobtain \u27e8a_eq_one, z, b_eq_z\u27e9 : gp_n.a = 1 \u2227 \u2203 z : \u2124, gp_n.b = (z : K)\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\nppred_conts : Pair \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast ppred_conts\n\u22a2 gp_n.a = 1 \u2227 \u2203 z, gp_n.b = \u2191z\ncase succ.succ.intro.some.intro.intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\nppred_conts : Pair \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast ppred_conts\na_eq_one : gp_n.a = 1\nz : \u2124\nb_eq_z : gp_n.b = \u2191z\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast conts\n[PROOFSTEP]\nexact of_part_num_eq_one_and_exists_int_part_denom_eq s_ppred_nth_eq\n[GOAL]\ncase succ.succ.intro.some.intro.intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\nppred_conts : Pair \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast ppred_conts\na_eq_one : gp_n.a = 1\nz : \u2124\nb_eq_z : gp_n.b = \u2191z\n\u22a2 \u2203 conts, continuantsAux (of v) (Nat.succ (Nat.succ n)) = Pair.map Rat.cast conts\n[PROOFSTEP]\nsimp only [a_eq_one, b_eq_z, continuantsAux_recurrence s_ppred_nth_eq ppred_conts_eq pred_conts_eq]\n[GOAL]\ncase succ.succ.intro.some.intro.intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\nppred_conts : Pair \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast ppred_conts\na_eq_one : gp_n.a = 1\nz : \u2124\nb_eq_z : gp_n.b = \u2191z\n\u22a2 \u2203 conts,\n    { a := \u2191z * (Pair.map Rat.cast pred_conts).a + 1 * (Pair.map Rat.cast ppred_conts).a,\n        b := \u2191z * (Pair.map Rat.cast pred_conts).b + 1 * (Pair.map Rat.cast ppred_conts).b } =\n      Pair.map Rat.cast conts\n[PROOFSTEP]\nuse nextContinuants 1 (z : \u211a) ppred_conts pred_conts\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\nppred_conts : Pair \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast ppred_conts\na_eq_one : gp_n.a = 1\nz : \u2124\nb_eq_z : gp_n.b = \u2191z\n\u22a2 { a := \u2191z * (Pair.map Rat.cast pred_conts).a + 1 * (Pair.map Rat.cast ppred_conts).a,\n      b := \u2191z * (Pair.map Rat.cast pred_conts).b + 1 * (Pair.map Rat.cast ppred_conts).b } =\n    Pair.map Rat.cast (nextContinuants 1 (\u2191z) ppred_conts pred_conts)\n[PROOFSTEP]\ncases ppred_conts\n[GOAL]\ncase h.mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\npred_conts : Pair \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast pred_conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\na_eq_one : gp_n.a = 1\nz : \u2124\nb_eq_z : gp_n.b = \u2191z\na\u271d b\u271d : \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast { a := a\u271d, b := b\u271d }\n\u22a2 { a := \u2191z * (Pair.map Rat.cast pred_conts).a + 1 * (Pair.map Rat.cast { a := a\u271d, b := b\u271d }).a,\n      b := \u2191z * (Pair.map Rat.cast pred_conts).b + 1 * (Pair.map Rat.cast { a := a\u271d, b := b\u271d }).b } =\n    Pair.map Rat.cast (nextContinuants 1 \u2191z { a := a\u271d, b := b\u271d } pred_conts)\n[PROOFSTEP]\ncases pred_conts\n[GOAL]\ncase h.mk.mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\ng : GeneralizedContinuedFraction K := of v\nn : \u2115\nIH : \u2200 (m : \u2115), m < Nat.succ (Nat.succ n) \u2192 \u2203 conts, continuantsAux (of v) m = Pair.map Rat.cast conts\ngp_n : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp_n\na_eq_one : gp_n.a = 1\nz : \u2124\nb_eq_z : gp_n.b = \u2191z\na\u271d\u00b9 b\u271d\u00b9 : \u211a\nppred_conts_eq : continuantsAux (of v) n = Pair.map Rat.cast { a := a\u271d\u00b9, b := b\u271d\u00b9 }\na\u271d b\u271d : \u211a\npred_conts_eq : continuantsAux (of v) (n + 1) = Pair.map Rat.cast { a := a\u271d, b := b\u271d }\n\u22a2 { a := \u2191z * (Pair.map Rat.cast { a := a\u271d, b := b\u271d }).a + 1 * (Pair.map Rat.cast { a := a\u271d\u00b9, b := b\u271d\u00b9 }).a,\n      b := \u2191z * (Pair.map Rat.cast { a := a\u271d, b := b\u271d }).b + 1 * (Pair.map Rat.cast { a := a\u271d\u00b9, b := b\u271d\u00b9 }).b } =\n    Pair.map Rat.cast (nextContinuants 1 \u2191z { a := a\u271d\u00b9, b := b\u271d\u00b9 } { a := a\u271d, b := b\u271d })\n[PROOFSTEP]\nsimp [nextContinuants, nextNumerator, nextDenominator]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\n\u22a2 \u2203 conts, continuants (of v) n = Pair.map Rat.cast conts\n[PROOFSTEP]\nrw [nth_cont_eq_succ_nth_cont_aux]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\n\u22a2 \u2203 conts, continuantsAux (of v) (n + 1) = Pair.map Rat.cast conts\n[PROOFSTEP]\nexact exists_gcf_pair_rat_eq_of_nth_conts_aux v <| n + 1\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\n\u22a2 \u2203 q, numerators (of v) n = \u2191q\n[PROOFSTEP]\nrcases exists_gcf_pair_rat_eq_nth_conts v n with \u27e8\u27e8a, _\u27e9, nth_cont_eq\u27e9\n[GOAL]\ncase intro.mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\na b\u271d : \u211a\nnth_cont_eq : continuants (of v) n = Pair.map Rat.cast { a := a, b := b\u271d }\n\u22a2 \u2203 q, numerators (of v) n = \u2191q\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\na b\u271d : \u211a\nnth_cont_eq : continuants (of v) n = Pair.map Rat.cast { a := a, b := b\u271d }\n\u22a2 numerators (of v) n = \u2191a\n[PROOFSTEP]\nsimp [num_eq_conts_a, nth_cont_eq]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\n\u22a2 \u2203 q, denominators (of v) n = \u2191q\n[PROOFSTEP]\nrcases exists_gcf_pair_rat_eq_nth_conts v n with \u27e8\u27e8_, b\u27e9, nth_cont_eq\u27e9\n[GOAL]\ncase intro.mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\na\u271d b : \u211a\nnth_cont_eq : continuants (of v) n = Pair.map Rat.cast { a := a\u271d, b := b }\n\u22a2 \u2203 q, denominators (of v) n = \u2191q\n[PROOFSTEP]\nuse b\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\na\u271d b : \u211a\nnth_cont_eq : continuants (of v) n = Pair.map Rat.cast { a := a\u271d, b := b }\n\u22a2 denominators (of v) n = \u2191b\n[PROOFSTEP]\nsimp [denom_eq_conts_b, nth_cont_eq]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\n\u22a2 \u2203 q, convergents (of v) n = \u2191q\n[PROOFSTEP]\nrcases exists_rat_eq_nth_numerator v n with \u27e8A\u2099, nth_num_eq\u27e9\n[GOAL]\ncase intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\nA\u2099 : \u211a\nnth_num_eq : numerators (of v) n = \u2191A\u2099\n\u22a2 \u2203 q, convergents (of v) n = \u2191q\n[PROOFSTEP]\nrcases exists_rat_eq_nth_denominator v n with \u27e8B\u2099, nth_denom_eq\u27e9\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\nA\u2099 : \u211a\nnth_num_eq : numerators (of v) n = \u2191A\u2099\nB\u2099 : \u211a\nnth_denom_eq : denominators (of v) n = \u2191B\u2099\n\u22a2 \u2203 q, convergents (of v) n = \u2191q\n[PROOFSTEP]\nuse A\u2099 / B\u2099\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\nA\u2099 : \u211a\nnth_num_eq : numerators (of v) n = \u2191A\u2099\nB\u2099 : \u211a\nnth_denom_eq : denominators (of v) n = \u2191B\u2099\n\u22a2 convergents (of v) n = \u2191(A\u2099 / B\u2099)\n[PROOFSTEP]\nsimp [nth_num_eq, nth_denom_eq, convergent_eq_num_div_denom]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\nterminates : Terminates (of v)\n\u22a2 \u2203 q, v = \u2191q\n[PROOFSTEP]\nobtain \u27e8n, v_eq_conv\u27e9 : \u2203 n, v = (of v).convergents n\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn : \u2115\nterminates : Terminates (of v)\n\u22a2 \u2203 n, v = convergents (of v) n\ncase intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn\u271d : \u2115\nterminates : Terminates (of v)\nn : \u2115\nv_eq_conv : v = convergents (of v) n\n\u22a2 \u2203 q, v = \u2191q\n[PROOFSTEP]\nexact of_correctness_of_terminates terminates\n[GOAL]\ncase intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn\u271d : \u2115\nterminates : Terminates (of v)\nn : \u2115\nv_eq_conv : v = convergents (of v) n\n\u22a2 \u2203 q, v = \u2191q\n[PROOFSTEP]\nobtain \u27e8q, conv_eq_q\u27e9 : \u2203 q : \u211a, (of v).convergents n = (\u2191q : K)\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn\u271d : \u2115\nterminates : Terminates (of v)\nn : \u2115\nv_eq_conv : v = convergents (of v) n\n\u22a2 \u2203 q, convergents (of v) n = \u2191q\ncase intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn\u271d : \u2115\nterminates : Terminates (of v)\nn : \u2115\nv_eq_conv : v = convergents (of v) n\nq : \u211a\nconv_eq_q : convergents (of v) n = \u2191q\n\u22a2 \u2203 q, v = \u2191q\n[PROOFSTEP]\nexact exists_rat_eq_nth_convergent v n\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn\u271d : \u2115\nterminates : Terminates (of v)\nn : \u2115\nv_eq_conv : v = convergents (of v) n\nq : \u211a\nconv_eq_q : convergents (of v) n = \u2191q\n\u22a2 \u2203 q, v = \u2191q\n[PROOFSTEP]\nhave : v = (\u2191q : K) := Eq.trans v_eq_conv conv_eq_q\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nn\u271d : \u2115\nterminates : Terminates (of v)\nn : \u2115\nv_eq_conv : v = convergents (of v) n\nq : \u211a\nconv_eq_q : convergents (of v) n = \u2191q\nthis : v = \u2191q\n\u22a2 \u2203 q, v = \u2191q\n[PROOFSTEP]\nuse q, this\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 mapFr Rat.cast (IntFractPair.of q) = IntFractPair.of v\n[PROOFSTEP]\nsimp [IntFractPair.of, v_eq_q]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream v n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q Nat.zero) = IntFractPair.stream v Nat.zero\ncase succ\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream v n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncase zero =>\n  -- Porting note: was\n      -- simp [IntFractPair.stream, coe_of_rat_eq v_eq_q]simp only [IntFractPair.stream, Option.map_some',\n    coe_of_rat_eq v_eq_q]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q Nat.zero) = IntFractPair.stream v Nat.zero\n[PROOFSTEP]\ncase zero =>\n  -- Porting note: was\n      -- simp [IntFractPair.stream, coe_of_rat_eq v_eq_q]simp only [IntFractPair.stream, Option.map_some',\n    coe_of_rat_eq v_eq_q]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q Nat.zero) = IntFractPair.stream v Nat.zero\n[PROOFSTEP]\nsimp only [IntFractPair.stream, Option.map_some', coe_of_rat_eq v_eq_q]\n[GOAL]\ncase succ\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream v n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncase succ =>\n  rw [v_eq_q] at IH \n  cases' stream_q_nth_eq : IntFractPair.stream q n with ifp_n\n  case none => simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq]\n  case some =>\n    cases' ifp_n with b fr\n    cases' Decidable.em (fr = 0) with fr_zero fr_ne_zero\n    \u00b7 simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_zero]\n    \u00b7 replace IH : some (IntFractPair.mk b (fr : K)) = IntFractPair.stream (\u2191q) n; \u00b7 rwa [stream_q_nth_eq] at IH \n      have : (fr : K)\u207b\u00b9 = ((fr\u207b\u00b9 : \u211a) : K) := by norm_cast\n      have coe_of_fr := coe_of_rat_eq this\n      simpa [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_ne_zero]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream v n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncase succ =>\n  rw [v_eq_q] at IH \n  cases' stream_q_nth_eq : IntFractPair.stream q n with ifp_n\n  case none => simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq]\n  case some =>\n    cases' ifp_n with b fr\n    cases' Decidable.em (fr = 0) with fr_zero fr_ne_zero\n    \u00b7 simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_zero]\n    \u00b7 replace IH : some (IntFractPair.mk b (fr : K)) = IntFractPair.stream (\u2191q) n; \u00b7 rwa [stream_q_nth_eq] at IH \n      have : (fr : K)\u207b\u00b9 = ((fr\u207b\u00b9 : \u211a) : K) := by norm_cast\n      have coe_of_fr := coe_of_rat_eq this\n      simpa [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_ne_zero]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream v n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\nrw [v_eq_q] at IH \n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncases' stream_q_nth_eq : IntFractPair.stream q n with ifp_n\n[GOAL]\ncase none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nstream_q_nth_eq : IntFractPair.stream q n = none\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\ncase some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nifp_n : IntFractPair \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some ifp_n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncase none => simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nstream_q_nth_eq : IntFractPair.stream q n = none\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncase none => simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nstream_q_nth_eq : IntFractPair.stream q n = none\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\nsimp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq]\n[GOAL]\ncase some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nifp_n : IntFractPair \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some ifp_n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncase some =>\n  cases' ifp_n with b fr\n  cases' Decidable.em (fr = 0) with fr_zero fr_ne_zero\n  \u00b7 simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_zero]\n  \u00b7 replace IH : some (IntFractPair.mk b (fr : K)) = IntFractPair.stream (\u2191q) n; \u00b7 rwa [stream_q_nth_eq] at IH \n    have : (fr : K)\u207b\u00b9 = ((fr\u207b\u00b9 : \u211a) : K) := by norm_cast\n    have coe_of_fr := coe_of_rat_eq this\n    simpa [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_ne_zero]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nifp_n : IntFractPair \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some ifp_n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncase some =>\n  cases' ifp_n with b fr\n  cases' Decidable.em (fr = 0) with fr_zero fr_ne_zero\n  \u00b7 simp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_zero]\n  \u00b7 replace IH : some (IntFractPair.mk b (fr : K)) = IntFractPair.stream (\u2191q) n; \u00b7 rwa [stream_q_nth_eq] at IH \n    have : (fr : K)\u207b\u00b9 = ((fr\u207b\u00b9 : \u211a) : K) := by norm_cast\n    have coe_of_fr := coe_of_rat_eq this\n    simpa [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_ne_zero]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nifp_n : IntFractPair \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some ifp_n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncases' ifp_n with b fr\n[GOAL]\ncase mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\ncases' Decidable.em (fr = 0) with fr_zero fr_ne_zero\n[GOAL]\ncase mk.inl\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\nfr_zero : fr = 0\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\nsimp [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_zero]\n[GOAL]\ncase mk.inr\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\nfr_ne_zero : \u00acfr = 0\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\nreplace IH : some (IntFractPair.mk b (fr : K)) = IntFractPair.stream (\u2191q) n\n[GOAL]\ncase IH\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nIH : Option.map (mapFr Rat.cast) (IntFractPair.stream q n) = IntFractPair.stream (\u2191q) n\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\nfr_ne_zero : \u00acfr = 0\n\u22a2 some { b := b, fr := \u2191fr } = IntFractPair.stream (\u2191q) n\n[PROOFSTEP]\nrwa [stream_q_nth_eq] at IH \n[GOAL]\ncase mk.inr\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\nfr_ne_zero : \u00acfr = 0\nIH : some { b := b, fr := \u2191fr } = IntFractPair.stream (\u2191q) n\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\nhave : (fr : K)\u207b\u00b9 = ((fr\u207b\u00b9 : \u211a) : K) := by norm_cast\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\nfr_ne_zero : \u00acfr = 0\nIH : some { b := b, fr := \u2191fr } = IntFractPair.stream (\u2191q) n\n\u22a2 (\u2191fr)\u207b\u00b9 = \u2191fr\u207b\u00b9\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase mk.inr\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\nfr_ne_zero : \u00acfr = 0\nIH : some { b := b, fr := \u2191fr } = IntFractPair.stream (\u2191q) n\nthis : (\u2191fr)\u207b\u00b9 = \u2191fr\u207b\u00b9\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\nhave coe_of_fr := coe_of_rat_eq this\n[GOAL]\ncase mk.inr\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\nb : \u2124\nfr : \u211a\nstream_q_nth_eq : IntFractPair.stream q n = some { b := b, fr := fr }\nfr_ne_zero : \u00acfr = 0\nIH : some { b := b, fr := \u2191fr } = IntFractPair.stream (\u2191q) n\nthis : (\u2191fr)\u207b\u00b9 = \u2191fr\u207b\u00b9\ncoe_of_fr : mapFr Rat.cast (IntFractPair.of fr\u207b\u00b9) = IntFractPair.of (\u2191fr)\u207b\u00b9\n\u22a2 Option.map (mapFr Rat.cast) (IntFractPair.stream q (Nat.succ n)) = IntFractPair.stream v (Nat.succ n)\n[PROOFSTEP]\nsimpa [IntFractPair.stream, IH.symm, v_eq_q, stream_q_nth_eq, fr_ne_zero]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Stream'.map (Option.map (mapFr Rat.cast)) (IntFractPair.stream q) = IntFractPair.stream v\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\n\u22a2 Stream'.map (Option.map (mapFr Rat.cast)) (IntFractPair.stream q) n = IntFractPair.stream v n\n[PROOFSTEP]\nexact IntFractPair.coe_stream_nth_rat_eq v_eq_q n\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 \u2191(of q).h = (of v).h\n[PROOFSTEP]\nunfold of IntFractPair.seq1\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 \u2191(match\n          (IntFractPair.of q,\n            Stream'.Seq.tail\n              { val := IntFractPair.stream q, property := (_ : Stream'.IsSeq (IntFractPair.stream q)) }) with\n        | (h, s) => { h := \u2191h.b, s := Stream'.Seq.map (fun p => { a := 1, b := \u2191p.b }) s }).h =\n    (match\n        (IntFractPair.of v,\n          Stream'.Seq.tail\n            { val := IntFractPair.stream v, property := (_ : Stream'.IsSeq (IntFractPair.stream v)) }) with\n      | (h, s) => { h := \u2191h.b, s := Stream'.Seq.map (fun p => { a := 1, b := \u2191p.b }) s }).h\n[PROOFSTEP]\nrw [\u2190 IntFractPair.coe_of_rat_eq v_eq_q]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 \u2191(match\n          (IntFractPair.of q,\n            Stream'.Seq.tail\n              { val := IntFractPair.stream q, property := (_ : Stream'.IsSeq (IntFractPair.stream q)) }) with\n        | (h, s) => { h := \u2191h.b, s := Stream'.Seq.map (fun p => { a := 1, b := \u2191p.b }) s }).h =\n    (match\n        (IntFractPair.mapFr Rat.cast (IntFractPair.of q),\n          Stream'.Seq.tail\n            { val := IntFractPair.stream v, property := (_ : Stream'.IsSeq (IntFractPair.stream v)) }) with\n      | (h, s) => { h := \u2191h.b, s := Stream'.Seq.map (fun p => { a := 1, b := \u2191p.b }) s }).h\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (Pair.map Rat.cast) (Stream'.Seq.get? (of q).s n) = Stream'.Seq.get? (of v).s n\n[PROOFSTEP]\nsimp only [of, IntFractPair.seq1, Stream'.Seq.map_get?, Stream'.Seq.get?_tail]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (Pair.map Rat.cast)\n      (Option.map (fun p => { a := 1, b := \u2191p.b })\n        (Stream'.Seq.get? { val := IntFractPair.stream q, property := (_ : Stream'.IsSeq (IntFractPair.stream q)) }\n          (n + 1))) =\n    Option.map (fun p => { a := 1, b := \u2191p.b })\n      (Stream'.Seq.get? { val := IntFractPair.stream v, property := (_ : Stream'.IsSeq (IntFractPair.stream v)) }\n        (n + 1))\n[PROOFSTEP]\nsimp only [Stream'.Seq.get?]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (Pair.map Rat.cast) (Option.map (fun p => { a := 1, b := \u2191p.b }) (IntFractPair.stream q (n + 1))) =\n    Option.map (fun p => { a := 1, b := \u2191p.b }) (IntFractPair.stream v (n + 1))\n[PROOFSTEP]\nrw [\u2190 IntFractPair.coe_stream'_rat_eq v_eq_q]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Option.map (Pair.map Rat.cast) (Option.map (fun p => { a := 1, b := \u2191p.b }) (IntFractPair.stream q (n + 1))) =\n    Option.map (fun p => { a := 1, b := \u2191p.b })\n      (Stream'.map (Option.map (IntFractPair.mapFr Rat.cast)) (IntFractPair.stream q) (n + 1))\n[PROOFSTEP]\nrcases succ_nth_stream_eq : IntFractPair.stream q (n + 1) with (_ | \u27e8_, _\u27e9)\n[GOAL]\ncase none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nsucc_nth_stream_eq : IntFractPair.stream q (n + 1) = none\n\u22a2 Option.map (Pair.map Rat.cast) (Option.map (fun p => { a := 1, b := \u2191p.b }) none) =\n    Option.map (fun p => { a := 1, b := \u2191p.b })\n      (Stream'.map (Option.map (IntFractPair.mapFr Rat.cast)) (IntFractPair.stream q) (n + 1))\n[PROOFSTEP]\nsimp [Stream'.map, Stream'.nth, succ_nth_stream_eq]\n[GOAL]\ncase some.mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nb\u271d : \u2124\nfr\u271d : \u211a\nsucc_nth_stream_eq : IntFractPair.stream q (n + 1) = some { b := b\u271d, fr := fr\u271d }\n\u22a2 Option.map (Pair.map Rat.cast) (Option.map (fun p => { a := 1, b := \u2191p.b }) (some { b := b\u271d, fr := fr\u271d })) =\n    Option.map (fun p => { a := 1, b := \u2191p.b })\n      (Stream'.map (Option.map (IntFractPair.mapFr Rat.cast)) (IntFractPair.stream q) (n + 1))\n[PROOFSTEP]\nsimp [Stream'.map, Stream'.nth, succ_nth_stream_eq]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 Stream'.Seq.map (Pair.map Rat.cast) (of q).s = (of v).s\n[PROOFSTEP]\next n\n[GOAL]\ncase h.a\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\na\u271d : Pair K\n\u22a2 a\u271d \u2208 Stream'.Seq.get? (Stream'.Seq.map (Pair.map Rat.cast) (of q).s) n \u2194 a\u271d \u2208 Stream'.Seq.get? (of v).s n\n[PROOFSTEP]\nrw [\u2190 coe_of_s_get?_rat_eq v_eq_q]\n[GOAL]\ncase h.a\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn\u271d n : \u2115\na\u271d : Pair K\n\u22a2 a\u271d \u2208 Stream'.Seq.get? (Stream'.Seq.map (Pair.map Rat.cast) (of q).s) n \u2194\n    a\u271d \u2208 Option.map (Pair.map Rat.cast) (Stream'.Seq.get? (of q).s n)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\n\u22a2 { h := \u2191(of q).h, s := Stream'.Seq.map (Pair.map Rat.cast) (of q).s } = of v\n[PROOFSTEP]\ncases' gcf_v_eq : of v with h s\n[GOAL]\ncase mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : K\ns : Stream'.Seq (Pair K)\ngcf_v_eq : of v = { h := h, s := s }\n\u22a2 { h := \u2191(of q).h, s := Stream'.Seq.map (Pair.map Rat.cast) (of q).s } = { h := h, s := s }\n[PROOFSTEP]\nsubst v\n[GOAL]\ncase mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nh : K\ns : Stream'.Seq (Pair K)\ngcf_v_eq : of \u2191q = { h := h, s := s }\n\u22a2 { h := \u2191(of q).h, s := Stream'.Seq.map (Pair.map Rat.cast) (of q).s } = { h := h, s := s }\n[PROOFSTEP]\nobtain rfl : \u2191\u230a(q : K)\u230b = h := by injection gcf_v_eq\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nh : K\ns : Stream'.Seq (Pair K)\ngcf_v_eq : of \u2191q = { h := h, s := s }\n\u22a2 \u2191\u230a\u2191q\u230b = h\n[PROOFSTEP]\ninjection gcf_v_eq\n[GOAL]\ncase mk\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\ns : Stream'.Seq (Pair K)\ngcf_v_eq : of \u2191q = { h := \u2191\u230a\u2191q\u230b, s := s }\n\u22a2 { h := \u2191(of q).h, s := Stream'.Seq.map (Pair.map Rat.cast) (of q).s } = { h := \u2191\u230a\u2191q\u230b, s := s }\n[PROOFSTEP]\nsimp only [gcf_v_eq, Int.cast_inj, Rat.floor_cast, of_h_eq_floor, eq_self_iff_true, Rat.cast_coe_int, and_self,\n  coe_of_h_rat_eq rfl, coe_of_s_rat_eq rfl]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\n\u22a2 Terminates (of v) \u2194 Terminates (of q)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\n\u22a2 Terminates (of v) \u2192 Terminates (of q)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\n\u22a2 Terminates (of q) \u2192 Terminates (of v)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nh : Terminates (of v)\n\u22a2 Terminates (of q)\n[PROOFSTEP]\ncases' h with n h\n[GOAL]\ncase mpr\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nh : Terminates (of q)\n\u22a2 Terminates (of v)\n[PROOFSTEP]\ncases' h with n h\n[GOAL]\ncase mp.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Stream'.Seq.TerminatedAt (of v).s n\n\u22a2 Terminates (of q)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase mpr.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Stream'.Seq.TerminatedAt (of q).s n\n\u22a2 Terminates (of v)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Stream'.Seq.TerminatedAt (of v).s n\n\u22a2 Stream'.Seq.TerminatedAt (of q).s n\n[PROOFSTEP]\nsimp only [Stream'.Seq.TerminatedAt, (coe_of_s_get?_rat_eq v_eq_q n).symm] at h \u22a2\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Stream'.Seq.TerminatedAt (of q).s n\n\u22a2 Stream'.Seq.TerminatedAt (of v).s n\n[PROOFSTEP]\nsimp only [Stream'.Seq.TerminatedAt, (coe_of_s_get?_rat_eq v_eq_q n).symm] at h \u22a2\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Option.map (Pair.map Rat.cast) (Stream'.Seq.get? (of q).s n) = none\n\u22a2 Stream'.Seq.get? (of q).s n = none\n[PROOFSTEP]\ncases h' : (of q).s.get? n\n[GOAL]\ncase h\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Stream'.Seq.get? (of q).s n = none\n\u22a2 Option.map (Pair.map Rat.cast) (Stream'.Seq.get? (of q).s n) = none\n[PROOFSTEP]\ncases h' : (of q).s.get? n\n[GOAL]\ncase h.none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Option.map (Pair.map Rat.cast) (Stream'.Seq.get? (of q).s n) = none\nh' : Stream'.Seq.get? (of q).s n = none\n\u22a2 none = none\n[PROOFSTEP]\nsimp only [h'] at h \n[GOAL]\ncase h.some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Option.map (Pair.map Rat.cast) (Stream'.Seq.get? (of q).s n) = none\nval\u271d : Pair \u211a\nh' : Stream'.Seq.get? (of q).s n = some val\u271d\n\u22a2 some val\u271d = none\n[PROOFSTEP]\nsimp only [h'] at h \n[GOAL]\ncase h.none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh h' : Stream'.Seq.get? (of q).s n = none\n\u22a2 Option.map (Pair.map Rat.cast) none = none\n[PROOFSTEP]\nsimp only [h'] at h \n[GOAL]\ncase h.some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh : Stream'.Seq.get? (of q).s n = none\nval\u271d : Pair \u211a\nh' : Stream'.Seq.get? (of q).s n = some val\u271d\n\u22a2 Option.map (Pair.map Rat.cast) (some val\u271d) = none\n[PROOFSTEP]\nsimp only [h'] at h \n[GOAL]\ncase h.none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh' : Stream'.Seq.get? (of q).s n = none\nh : Option.map (Pair.map Rat.cast) none = none\n\u22a2 none = none\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase h.some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nval\u271d : Pair \u211a\nh' : Stream'.Seq.get? (of q).s n = some val\u271d\nh : Option.map (Pair.map Rat.cast) (some val\u271d) = none\n\u22a2 some val\u271d = none\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase h.none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nv\u271d : K\nq\u271d : \u211a\nv_eq_q\u271d : v\u271d = \u2191q\u271d\nn\u271d : \u2115\nv : K\nq : \u211a\nv_eq_q : v = \u2191q\nn : \u2115\nh' : Stream'.Seq.get? (of q).s n = none\nh : True\n\u22a2 Option.map (Pair.map Rat.cast) none = none\n[PROOFSTEP]\ntrivial\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\n\u22a2 ifp_succ_n.fr.num < ifp_n.fr.num\n[PROOFSTEP]\nobtain \u27e8ifp_n', stream_nth_eq', ifp_n_fract_ne_zero, IntFractPair.of_eq_ifp_succ_n\u27e9 :\n  \u2203 ifp_n', IntFractPair.stream q n = some ifp_n' \u2227 ifp_n'.fr \u2260 0 \u2227 IntFractPair.of ifp_n'.fr\u207b\u00b9 = ifp_succ_n\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\n\u22a2 \u2203 ifp_n', IntFractPair.stream q n = some ifp_n' \u2227 ifp_n'.fr \u2260 0 \u2227 IntFractPair.of ifp_n'.fr\u207b\u00b9 = ifp_succ_n\ncase intro.intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nifp_n' : IntFractPair \u211a\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n'\nifp_n_fract_ne_zero : ifp_n'.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n'.fr\u207b\u00b9 = ifp_succ_n\n\u22a2 ifp_succ_n.fr.num < ifp_n.fr.num\n[PROOFSTEP]\nexact succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nifp_n' : IntFractPair \u211a\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n'\nifp_n_fract_ne_zero : ifp_n'.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n'.fr\u207b\u00b9 = ifp_succ_n\n\u22a2 ifp_succ_n.fr.num < ifp_n.fr.num\n[PROOFSTEP]\nhave : ifp_n = ifp_n' := by injection Eq.trans stream_nth_eq.symm stream_nth_eq'\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nifp_n' : IntFractPair \u211a\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n'\nifp_n_fract_ne_zero : ifp_n'.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n'.fr\u207b\u00b9 = ifp_succ_n\n\u22a2 ifp_n = ifp_n'\n[PROOFSTEP]\ninjection Eq.trans stream_nth_eq.symm stream_nth_eq'\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nifp_n' : IntFractPair \u211a\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n'\nifp_n_fract_ne_zero : ifp_n'.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n'.fr\u207b\u00b9 = ifp_succ_n\nthis : ifp_n = ifp_n'\n\u22a2 ifp_succ_n.fr.num < ifp_n.fr.num\n[PROOFSTEP]\ncases this\n[GOAL]\ncase intro.intro.intro.refl\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n\nifp_n_fract_ne_zero : ifp_n.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr\u207b\u00b9 = ifp_succ_n\n\u22a2 ifp_succ_n.fr.num < ifp_n.fr.num\n[PROOFSTEP]\nrw [\u2190 IntFractPair.of_eq_ifp_succ_n]\n[GOAL]\ncase intro.intro.intro.refl\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n\nifp_n_fract_ne_zero : ifp_n.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr\u207b\u00b9 = ifp_succ_n\n\u22a2 (IntFractPair.of ifp_n.fr\u207b\u00b9).fr.num < ifp_n.fr.num\n[PROOFSTEP]\ncases' nth_stream_fr_nonneg_lt_one stream_nth_eq with zero_le_ifp_n_fract ifp_n_fract_lt_one\n[GOAL]\ncase intro.intro.intro.refl.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n\nifp_n_fract_ne_zero : ifp_n.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr\u207b\u00b9 = ifp_succ_n\nzero_le_ifp_n_fract : 0 \u2264 ifp_n.fr\nifp_n_fract_lt_one : ifp_n.fr < 1\n\u22a2 (IntFractPair.of ifp_n.fr\u207b\u00b9).fr.num < ifp_n.fr.num\n[PROOFSTEP]\nhave : 0 < ifp_n.fr := lt_of_le_of_ne zero_le_ifp_n_fract <| ifp_n_fract_ne_zero.symm\n[GOAL]\ncase intro.intro.intro.refl.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_n ifp_succ_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nstream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n\nstream_nth_eq' : IntFractPair.stream q n = some ifp_n\nifp_n_fract_ne_zero : ifp_n.fr \u2260 0\nIntFractPair.of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr\u207b\u00b9 = ifp_succ_n\nzero_le_ifp_n_fract : 0 \u2264 ifp_n.fr\nifp_n_fract_lt_one : ifp_n.fr < 1\nthis : 0 < ifp_n.fr\n\u22a2 (IntFractPair.of ifp_n.fr\u207b\u00b9).fr.num < ifp_n.fr.num\n[PROOFSTEP]\nexact of_inv_fr_num_lt_num_of_pos this\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a},\n    IntFractPair.stream q Nat.zero = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191Nat.zero\ncase succ\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a},\n    IntFractPair.stream q (Nat.succ n) = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191(Nat.succ n)\n[PROOFSTEP]\ncase zero =>\n  intro ifp_zero stream_zero_eq\n  have : IntFractPair.of q = ifp_zero := by injection stream_zero_eq\n  simp [le_refl, this.symm]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a},\n    IntFractPair.stream q Nat.zero = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191Nat.zero\n[PROOFSTEP]\ncase zero =>\n  intro ifp_zero stream_zero_eq\n  have : IntFractPair.of q = ifp_zero := by injection stream_zero_eq\n  simp [le_refl, this.symm]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a},\n    IntFractPair.stream q Nat.zero = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191Nat.zero\n[PROOFSTEP]\nintro ifp_zero stream_zero_eq\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_zero : IntFractPair \u211a\nstream_zero_eq : IntFractPair.stream q Nat.zero = some ifp_zero\n\u22a2 ifp_zero.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191Nat.zero\n[PROOFSTEP]\nhave : IntFractPair.of q = ifp_zero := by injection stream_zero_eq\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_zero : IntFractPair \u211a\nstream_zero_eq : IntFractPair.stream q Nat.zero = some ifp_zero\n\u22a2 IntFractPair.of q = ifp_zero\n[PROOFSTEP]\ninjection stream_zero_eq\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn : \u2115\nifp_zero : IntFractPair \u211a\nstream_zero_eq : IntFractPair.stream q Nat.zero = some ifp_zero\nthis : IntFractPair.of q = ifp_zero\n\u22a2 ifp_zero.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191Nat.zero\n[PROOFSTEP]\nsimp [le_refl, this.symm]\n[GOAL]\ncase succ\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a},\n    IntFractPair.stream q (Nat.succ n) = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191(Nat.succ n)\n[PROOFSTEP]\ncase succ =>\n  intro ifp_succ_n stream_succ_nth_eq\n  suffices ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - n\n    by\n    rw [Int.ofNat_succ, sub_add_eq_sub_sub]\n    solve_by_elim [le_sub_right_of_add_le]\n  rcases succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq with \u27e8ifp_n, stream_nth_eq, -\u27e9\n  have : ifp_succ_n.fr.num < ifp_n.fr.num := stream_succ_nth_fr_num_lt_nth_fr_num_rat stream_nth_eq stream_succ_nth_eq\n  have : ifp_succ_n.fr.num + 1 \u2264 ifp_n.fr.num := Int.add_one_le_of_lt this\n  exact le_trans this (IH stream_nth_eq)\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a},\n    IntFractPair.stream q (Nat.succ n) = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191(Nat.succ n)\n[PROOFSTEP]\ncase succ =>\n  intro ifp_succ_n stream_succ_nth_eq\n  suffices ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - n\n    by\n    rw [Int.ofNat_succ, sub_add_eq_sub_sub]\n    solve_by_elim [le_sub_right_of_add_le]\n  rcases succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq with \u27e8ifp_n, stream_nth_eq, -\u27e9\n  have : ifp_succ_n.fr.num < ifp_n.fr.num := stream_succ_nth_fr_num_lt_nth_fr_num_rat stream_nth_eq stream_succ_nth_eq\n  have : ifp_succ_n.fr.num + 1 \u2264 ifp_n.fr.num := Int.add_one_le_of_lt this\n  exact le_trans this (IH stream_nth_eq)\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\n\u22a2 \u2200 {ifp_n : IntFractPair \u211a},\n    IntFractPair.stream q (Nat.succ n) = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191(Nat.succ n)\n[PROOFSTEP]\nintro ifp_succ_n stream_succ_nth_eq\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\nifp_succ_n : IntFractPair \u211a\nstream_succ_nth_eq : IntFractPair.stream q (Nat.succ n) = some ifp_succ_n\n\u22a2 ifp_succ_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191(Nat.succ n)\n[PROOFSTEP]\nsuffices ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - n\n  by\n  rw [Int.ofNat_succ, sub_add_eq_sub_sub]\n  solve_by_elim [le_sub_right_of_add_le]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\nifp_succ_n : IntFractPair \u211a\nstream_succ_nth_eq : IntFractPair.stream q (Nat.succ n) = some ifp_succ_n\nthis : ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - \u2191n\n\u22a2 ifp_succ_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191(Nat.succ n)\n[PROOFSTEP]\nrw [Int.ofNat_succ, sub_add_eq_sub_sub]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\nifp_succ_n : IntFractPair \u211a\nstream_succ_nth_eq : IntFractPair.stream q (Nat.succ n) = some ifp_succ_n\nthis : ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - \u2191n\n\u22a2 ifp_succ_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n - 1\n[PROOFSTEP]\nsolve_by_elim [le_sub_right_of_add_le]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\nifp_succ_n : IntFractPair \u211a\nstream_succ_nth_eq : IntFractPair.stream q (Nat.succ n) = some ifp_succ_n\n\u22a2 ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - \u2191n\n[PROOFSTEP]\nrcases succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq with \u27e8ifp_n, stream_nth_eq, -\u27e9\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\nifp_succ_n : IntFractPair \u211a\nstream_succ_nth_eq : IntFractPair.stream q (Nat.succ n) = some ifp_succ_n\nifp_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\n\u22a2 ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - \u2191n\n[PROOFSTEP]\nhave : ifp_succ_n.fr.num < ifp_n.fr.num := stream_succ_nth_fr_num_lt_nth_fr_num_rat stream_nth_eq stream_succ_nth_eq\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\nifp_succ_n : IntFractPair \u211a\nstream_succ_nth_eq : IntFractPair.stream q (Nat.succ n) = some ifp_succ_n\nifp_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nthis : ifp_succ_n.fr.num < ifp_n.fr.num\n\u22a2 ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - \u2191n\n[PROOFSTEP]\nhave : ifp_succ_n.fr.num + 1 \u2264 ifp_n.fr.num := Int.add_one_le_of_lt this\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq : \u211a\nn\u271d n : \u2115\nIH : \u2200 {ifp_n : IntFractPair \u211a}, IntFractPair.stream q n = some ifp_n \u2192 ifp_n.fr.num \u2264 (IntFractPair.of q).fr.num - \u2191n\nifp_succ_n : IntFractPair \u211a\nstream_succ_nth_eq : IntFractPair.stream q (Nat.succ n) = some ifp_succ_n\nifp_n : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp_n\nthis\u271d : ifp_succ_n.fr.num < ifp_n.fr.num\nthis : ifp_succ_n.fr.num + 1 \u2264 ifp_n.fr.num\n\u22a2 ifp_succ_n.fr.num + 1 \u2264 (IntFractPair.of q).fr.num - \u2191n\n[PROOFSTEP]\nexact le_trans this (IH stream_nth_eq)\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn : \u2115\nq : \u211a\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nlet fract_q_num := (Int.fract q).num\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nlet n := fract_q_num.natAbs + 1\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\ncases' stream_nth_eq : IntFractPair.stream q n with ifp\n[GOAL]\ncase none\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nstream_nth_eq : IntFractPair.stream q n = none\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nuse n, stream_nth_eq\n[GOAL]\ncase some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nifp : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nhave ifp_fr_num_le_q_fr_num_sub_n : ifp.fr.num \u2264 fract_q_num - n := stream_nth_fr_num_le_fr_num_sub_n_rat stream_nth_eq\n[GOAL]\ncase some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nifp : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp\nifp_fr_num_le_q_fr_num_sub_n : ifp.fr.num \u2264 fract_q_num - \u2191n\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nhave : fract_q_num - n = -1 :=\n  by\n  have : 0 \u2264 fract_q_num :=\n    Rat.num_nonneg_iff_zero_le.mpr\n      (Int.fract_nonneg q)\n        -- Porting note: was\n              -- simp [Int.natAbs_of_nonneg this, sub_add_eq_sub_sub_swap, sub_right_comm]\n  simp only [Nat.cast_add, Int.natAbs_of_nonneg this, Nat.cast_one, sub_add_eq_sub_sub_swap, sub_right_comm, sub_self,\n    zero_sub]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nifp : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp\nifp_fr_num_le_q_fr_num_sub_n : ifp.fr.num \u2264 fract_q_num - \u2191n\n\u22a2 fract_q_num - \u2191n = -1\n[PROOFSTEP]\nhave : 0 \u2264 fract_q_num :=\n  Rat.num_nonneg_iff_zero_le.mpr\n    (Int.fract_nonneg q)\n      -- Porting note: was\n            -- simp [Int.natAbs_of_nonneg this, sub_add_eq_sub_sub_swap, sub_right_comm]\n[GOAL]\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nifp : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp\nifp_fr_num_le_q_fr_num_sub_n : ifp.fr.num \u2264 fract_q_num - \u2191n\nthis : 0 \u2264 fract_q_num\n\u22a2 fract_q_num - \u2191n = -1\n[PROOFSTEP]\nsimp only [Nat.cast_add, Int.natAbs_of_nonneg this, Nat.cast_one, sub_add_eq_sub_sub_swap, sub_right_comm, sub_self,\n  zero_sub]\n[GOAL]\ncase some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nifp : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp\nifp_fr_num_le_q_fr_num_sub_n : ifp.fr.num \u2264 fract_q_num - \u2191n\nthis : fract_q_num - \u2191n = -1\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nhave : 0 \u2264 ifp.fr := (nth_stream_fr_nonneg_lt_one stream_nth_eq).left\n[GOAL]\ncase some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nifp : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp\nifp_fr_num_le_q_fr_num_sub_n : ifp.fr.num \u2264 fract_q_num - \u2191n\nthis\u271d : fract_q_num - \u2191n = -1\nthis : 0 \u2264 ifp.fr\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nhave : 0 \u2264 ifp.fr.num := Rat.num_nonneg_iff_zero_le.mpr this\n[GOAL]\ncase some\nK : Type u_1\ninst\u271d\u00b9 : LinearOrderedField K\ninst\u271d : FloorRing K\nq\u271d : \u211a\nn\u271d : \u2115\nq : \u211a\nfract_q_num : \u2124 := (Int.fract q).num\nn : \u2115 := Int.natAbs fract_q_num + 1\nifp : IntFractPair \u211a\nstream_nth_eq : IntFractPair.stream q n = some ifp\nifp_fr_num_le_q_fr_num_sub_n : ifp.fr.num \u2264 fract_q_num - \u2191n\nthis\u271d\u00b9 : fract_q_num - \u2191n = -1\nthis\u271d : 0 \u2264 ifp.fr\nthis : 0 \u2264 ifp.fr.num\n\u22a2 \u2203 n, IntFractPair.stream q n = none\n[PROOFSTEP]\nlinarith\n", "meta": {"mathlib_filename": "Mathlib.Algebra.ContinuedFractions.Computation.TerminatesIffRat", "llama_tokens": 30015, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8757869851639066, "lm_q2_score": 0.7931059536292271, "lm_q1q2_score": 0.6945918720444859}}
{"text": "[GOAL]\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d : MonoidWithZero M\u2080\na b : M\u2080\nh : Commute a b\n\u22a2 inverse (a * b) = inverse b * inverse a\n[PROOFSTEP]\nby_cases hab : IsUnit (a * b)\n[GOAL]\ncase pos\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d : MonoidWithZero M\u2080\na b : M\u2080\nh : Commute a b\nhab : IsUnit (a * b)\n\u22a2 inverse (a * b) = inverse b * inverse a\n[PROOFSTEP]\nobtain \u27e8\u27e8a, rfl\u27e9, b, rfl\u27e9 := h.isUnit_mul_iff.mp hab\n[GOAL]\ncase pos.intro.intro.intro\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d : MonoidWithZero M\u2080\na b : M\u2080\u02e3\nh : Commute \u2191a \u2191b\nhab : IsUnit (\u2191a * \u2191b)\n\u22a2 inverse (\u2191a * \u2191b) = inverse \u2191b * inverse \u2191a\n[PROOFSTEP]\nrw [\u2190 Units.val_mul, inverse_unit, inverse_unit, inverse_unit, \u2190 Units.val_mul, mul_inv_rev]\n[GOAL]\ncase neg\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d : MonoidWithZero M\u2080\na b : M\u2080\nh : Commute a b\nhab : \u00acIsUnit (a * b)\n\u22a2 inverse (a * b) = inverse b * inverse a\n[PROOFSTEP]\nobtain ha | hb := not_and_or.mp (mt h.isUnit_mul_iff.mpr hab)\n[GOAL]\ncase neg.inl\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d : MonoidWithZero M\u2080\na b : M\u2080\nh : Commute a b\nhab : \u00acIsUnit (a * b)\nha : \u00acIsUnit a\n\u22a2 inverse (a * b) = inverse b * inverse a\n[PROOFSTEP]\nrw [inverse_non_unit _ hab, inverse_non_unit _ ha, mul_zero]\n[GOAL]\ncase neg.inr\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d : MonoidWithZero M\u2080\na b : M\u2080\nh : Commute a b\nhab : \u00acIsUnit (a * b)\nhb : \u00acIsUnit b\n\u22a2 inverse (a * b) = inverse b * inverse a\n[PROOFSTEP]\nrw [inverse_non_unit _ hab, inverse_non_unit _ hb, zero_mul]\n[GOAL]\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d\u00b9 : MonoidWithZero M\u2080\ninst\u271d : GroupWithZero G\u2080\na b c : G\u2080\nhac : Commute a c\nhbc : Commute b c\n\u22a2 Commute (a / b) c\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\n\u03b1 : Type u_1\nM\u2080 : Type u_2\nG\u2080 : Type u_3\nM\u2080' : Type u_4\nG\u2080' : Type u_5\nF : Type u_6\nF' : Type u_7\ninst\u271d\u00b9 : MonoidWithZero M\u2080\ninst\u271d : GroupWithZero G\u2080\na b c : G\u2080\nhac : Commute a c\nhbc : Commute b c\n\u22a2 Commute (a * b\u207b\u00b9) c\n[PROOFSTEP]\nexact hac.mul_left hbc.inv_left\u2080\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GroupWithZero.Commute", "llama_tokens": 1194, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8807970873650401, "lm_q2_score": 0.7879312031126512, "lm_q1q2_score": 0.694007508745655}}
{"text": "[GOAL]\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\n\u22a2 e\u2081 = e\u2082\n[PROOFSTEP]\nsimpa only [h\u2081.left_id, h\u2081.right_id, h\u2082.left_id, h\u2082.right_id] using distrib e\u2082 e\u2081 e\u2081 e\u2082\n[GOAL]\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\n\u22a2 m\u2081 = m\u2082\n[PROOFSTEP]\nfunext a b\n[GOAL]\ncase h.h\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\na b : X\n\u22a2 m\u2081 a b = m\u2082 a b\n[PROOFSTEP]\ncalc\n  m\u2081 a b = m\u2081 (m\u2082 a e\u2081) (m\u2082 e\u2081 b) := by {simp only [one h\u2081 h\u2082 distrib, h\u2081.left_id, h\u2081.right_id, h\u2082.left_id, h\u2082.right_id]\n  }\n  _ = m\u2082 a b := by simp only [distrib, h\u2081.left_id, h\u2081.right_id, h\u2082.left_id, h\u2082.right_id]\n[GOAL]\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\na b : X\n\u22a2 m\u2081 a b = m\u2081 (m\u2082 a e\u2081) (m\u2082 e\u2081 b)\n[PROOFSTEP]\n{simp only [one h\u2081 h\u2082 distrib, h\u2081.left_id, h\u2081.right_id, h\u2082.left_id, h\u2082.right_id]\n}\n[GOAL]\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\na b : X\n\u22a2 m\u2081 a b = m\u2081 (m\u2082 a e\u2081) (m\u2082 e\u2081 b)\n[PROOFSTEP]\nsimp only [one h\u2081 h\u2082 distrib, h\u2081.left_id, h\u2081.right_id, h\u2082.left_id, h\u2082.right_id]\n[GOAL]\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\na b : X\n\u22a2 m\u2081 (m\u2082 a e\u2081) (m\u2082 e\u2081 b) = m\u2082 a b\n[PROOFSTEP]\nsimp only [distrib, h\u2081.left_id, h\u2081.right_id, h\u2082.left_id, h\u2082.right_id]\n[GOAL]\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\na b : X\n\u22a2 m\u2082 a b = m\u2082 b a\n[PROOFSTEP]\nsimpa [mul h\u2081 h\u2082 distrib, h\u2082.left_id, h\u2082.right_id] using distrib e\u2082 a b e\u2082\n[GOAL]\nX : Type u\nm\u2081 m\u2082 : X \u2192 X \u2192 X\ne\u2081 e\u2082 : X\nh\u2081 : IsUnital m\u2081 e\u2081\nh\u2082 : IsUnital m\u2082 e\u2082\ndistrib : \u2200 (a b c d : X), m\u2081 (m\u2082 a b) (m\u2082 c d) = m\u2082 (m\u2081 a c) (m\u2081 b d)\na b c : X\n\u22a2 m\u2082 (m\u2082 a b) c = m\u2082 a (m\u2082 b c)\n[PROOFSTEP]\nsimpa [mul h\u2081 h\u2082 distrib, h\u2082.left_id, h\u2082.right_id] using distrib a b e\u2082 c\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.EckmannHilton", "llama_tokens": 1304, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8856314677809303, "lm_q2_score": 0.7826624738835052, "lm_q1q2_score": 0.6931505155225027}}
{"text": "[GOAL]\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : TopologicalSpace Z\ninst\u271d : TopologicalSpace Z'\nh : X \u2243\u209c Y\n\u22a2 Homotopic (comp (toContinuousMap (Homeomorph.symm h)) (toContinuousMap h)) (ContinuousMap.id X)\n[PROOFSTEP]\nrw [symm_comp_toContinuousMap]\n[GOAL]\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : TopologicalSpace Z\ninst\u271d : TopologicalSpace Z'\nh : X \u2243\u209c Y\n\u22a2 Homotopic (comp (toContinuousMap h) (toContinuousMap (Homeomorph.symm h))) (ContinuousMap.id Y)\n[PROOFSTEP]\nrw [toContinuousMap_comp_symm]\n[GOAL]\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : TopologicalSpace Z\ninst\u271d : TopologicalSpace Z'\nh\u2081 : X \u2243\u2095 Y\nh\u2082 : Y \u2243\u2095 Z\n\u22a2 Homotopic (comp (comp h\u2081.invFun h\u2082.invFun) (comp h\u2082.toFun h\u2081.toFun)) (ContinuousMap.id X)\n[PROOFSTEP]\nrefine Homotopic.trans ?_ h\u2081.left_inv\n[GOAL]\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : TopologicalSpace Z\ninst\u271d : TopologicalSpace Z'\nh\u2081 : X \u2243\u2095 Y\nh\u2082 : Y \u2243\u2095 Z\n\u22a2 Homotopic (comp (comp h\u2081.invFun h\u2082.invFun) (comp h\u2082.toFun h\u2081.toFun)) (comp h\u2081.invFun h\u2081.toFun)\n[PROOFSTEP]\nexact ((Homotopic.refl _).hcomp h\u2082.left_inv).hcomp (Homotopic.refl _)\n[GOAL]\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : TopologicalSpace Z\ninst\u271d : TopologicalSpace Z'\nh\u2081 : X \u2243\u2095 Y\nh\u2082 : Y \u2243\u2095 Z\n\u22a2 Homotopic (comp (comp h\u2082.toFun h\u2081.toFun) (comp h\u2081.invFun h\u2082.invFun)) (ContinuousMap.id Z)\n[PROOFSTEP]\nrefine Homotopic.trans ?_ h\u2082.right_inv\n[GOAL]\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : TopologicalSpace Z\ninst\u271d : TopologicalSpace Z'\nh\u2081 : X \u2243\u2095 Y\nh\u2082 : Y \u2243\u2095 Z\n\u22a2 Homotopic (comp (comp h\u2082.toFun h\u2081.toFun) (comp h\u2081.invFun h\u2082.invFun)) (comp h\u2082.toFun h\u2082.invFun)\n[PROOFSTEP]\nexact ((Homotopic.refl _).hcomp h\u2081.right_inv).hcomp (Homotopic.refl _)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Homotopy.Equiv", "llama_tokens": 956, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519527944504227, "lm_q2_score": 0.8128673155708975, "lm_q1q2_score": 0.6925245810180397}}
{"text": "[GOAL]\nG : Type u_1\nH : Type u_2\n\u03b1 : Type u_3\n\u03b2 : Type u_4\ninst\u271d\u2076 : Group H\ninst\u271d\u2075 : SMul G \u03b1\ninst\u271d\u2074 : SMul G \u03b2\ninst\u271d\u00b3 : MulAction H \u03b1\ninst\u271d\u00b2 : SMul H \u03b2\ninst\u271d\u00b9 : SMulCommClass G H \u03b2\ninst\u271d : SMulCommClass G H \u03b1\ns t : Set \u03b1\nb : \u03b2\ng : H\nh : Supports G s b\n\u22a2 Supports G (g \u2022 s) (g \u2022 b)\n[PROOFSTEP]\nrintro g' hg'\n[GOAL]\nG : Type u_1\nH : Type u_2\n\u03b1 : Type u_3\n\u03b2 : Type u_4\ninst\u271d\u2076 : Group H\ninst\u271d\u2075 : SMul G \u03b1\ninst\u271d\u2074 : SMul G \u03b2\ninst\u271d\u00b3 : MulAction H \u03b1\ninst\u271d\u00b2 : SMul H \u03b2\ninst\u271d\u00b9 : SMulCommClass G H \u03b2\ninst\u271d : SMulCommClass G H \u03b1\ns t : Set \u03b1\nb : \u03b2\ng : H\nh : Supports G s b\ng' : G\nhg' : \u2200 \u2983a : \u03b1\u2984, a \u2208 g \u2022 s \u2192 g' \u2022 a = a\n\u22a2 g' \u2022 g \u2022 b = g \u2022 b\n[PROOFSTEP]\nrw [smul_comm, h]\n[GOAL]\ncase a\nG : Type u_1\nH : Type u_2\n\u03b1 : Type u_3\n\u03b2 : Type u_4\ninst\u271d\u2076 : Group H\ninst\u271d\u2075 : SMul G \u03b1\ninst\u271d\u2074 : SMul G \u03b2\ninst\u271d\u00b3 : MulAction H \u03b1\ninst\u271d\u00b2 : SMul H \u03b2\ninst\u271d\u00b9 : SMulCommClass G H \u03b2\ninst\u271d : SMulCommClass G H \u03b1\ns t : Set \u03b1\nb : \u03b2\ng : H\nh : Supports G s b\ng' : G\nhg' : \u2200 \u2983a : \u03b1\u2984, a \u2208 g \u2022 s \u2192 g' \u2022 a = a\n\u22a2 \u2200 \u2983a : \u03b1\u2984, a \u2208 s \u2192 g' \u2022 a = a\n[PROOFSTEP]\nrintro a ha\n[GOAL]\ncase a\nG : Type u_1\nH : Type u_2\n\u03b1 : Type u_3\n\u03b2 : Type u_4\ninst\u271d\u2076 : Group H\ninst\u271d\u2075 : SMul G \u03b1\ninst\u271d\u2074 : SMul G \u03b2\ninst\u271d\u00b3 : MulAction H \u03b1\ninst\u271d\u00b2 : SMul H \u03b2\ninst\u271d\u00b9 : SMulCommClass G H \u03b2\ninst\u271d : SMulCommClass G H \u03b1\ns t : Set \u03b1\nb : \u03b2\ng : H\nh : Supports G s b\ng' : G\nhg' : \u2200 \u2983a : \u03b1\u2984, a \u2208 g \u2022 s \u2192 g' \u2022 a = a\na : \u03b1\nha : a \u2208 s\n\u22a2 g' \u2022 a = a\n[PROOFSTEP]\nhave := Set.ball_image_iff.1 hg' a ha\n[GOAL]\ncase a\nG : Type u_1\nH : Type u_2\n\u03b1 : Type u_3\n\u03b2 : Type u_4\ninst\u271d\u2076 : Group H\ninst\u271d\u2075 : SMul G \u03b1\ninst\u271d\u2074 : SMul G \u03b2\ninst\u271d\u00b3 : MulAction H \u03b1\ninst\u271d\u00b2 : SMul H \u03b2\ninst\u271d\u00b9 : SMulCommClass G H \u03b2\ninst\u271d : SMulCommClass G H \u03b1\ns t : Set \u03b1\nb : \u03b2\ng : H\nh : Supports G s b\ng' : G\nhg' : \u2200 \u2983a : \u03b1\u2984, a \u2208 g \u2022 s \u2192 g' \u2022 a = a\na : \u03b1\nha : a \u2208 s\nthis : g' \u2022 g \u2022 a = g \u2022 a\n\u22a2 g' \u2022 a = a\n[PROOFSTEP]\nrwa [smul_comm, smul_left_cancel_iff] at this \n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.Support", "llama_tokens": 1048, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8840392878563336, "lm_q2_score": 0.7826624738835052, "lm_q1q2_score": 0.6919043760438502}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\n\u03b9 : Type u_5\n\u22a2 Module R (AlternatingMap R M N \u03b9)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\n\u22a2 ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] ExteriorAlgebra R M \u2192\u2097[R] N\n[PROOFSTEP]\nsuffices (\u2200 i, AlternatingMap R M N (Fin i)) \u2192\u2097[R] ExteriorAlgebra R M \u2192\u2097[R] \u2200 i, AlternatingMap R M N (Fin i)\n  by\n  refine' LinearMap.compr\u2082 this _\n  refine' (LinearEquiv.toLinearMap _).comp (LinearMap.proj 0)\n  exact AlternatingMap.constLinearEquivOfIsEmpty.symm\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nthis : ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] ExteriorAlgebra R M \u2192\u2097[R] (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] ExteriorAlgebra R M \u2192\u2097[R] N\n[PROOFSTEP]\nrefine' LinearMap.compr\u2082 this _\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nthis : ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] ExteriorAlgebra R M \u2192\u2097[R] (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] N\n[PROOFSTEP]\nrefine' (LinearEquiv.toLinearMap _).comp (LinearMap.proj 0)\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nthis : ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] ExteriorAlgebra R M \u2192\u2097[R] (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 AlternatingMap R M N (Fin 0) \u2243\u2097[R] N\n[PROOFSTEP]\nexact AlternatingMap.constLinearEquivOfIsEmpty.symm\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\n\u22a2 ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] ExteriorAlgebra R M \u2192\u2097[R] (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n[PROOFSTEP]\nrefine' CliffordAlgebra.foldl _ _ _\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\n\u22a2 M \u2192\u2097[R] ((i : \u2115) \u2192 AlternatingMap R M N (Fin i)) \u2192\u2097[R] (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n[PROOFSTEP]\nrefine'\n  LinearMap.mk\u2082 R (fun m f i => (f i.succ).curryLeft m) (fun m\u2081 m\u2082 f => _) (fun c m f => _) (fun m f\u2081 f\u2082 => _)\n    fun c m f => _\n[GOAL]\ncase refine'_1.refine'_1\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm\u2081 m\u2082 : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f\ncase refine'_1.refine'_2\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nc : R\nm : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n    c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\ncase refine'_1.refine'_3\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm : M\nf\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082\ncase refine'_1.refine'_4\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nc : R\nm : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n    c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\n[PROOFSTEP]\nall_goals\n  ext i : 1\n  simp only [map_smul, map_add, Pi.add_apply, Pi.smul_apply, AlternatingMap.curryLeft_add,\n    AlternatingMap.curryLeft_smul, map_add, map_smul, LinearMap.add_apply, LinearMap.smul_apply]\n[GOAL]\ncase refine'_1.refine'_1\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm\u2081 m\u2082 : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase refine'_1.refine'_1.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm\u2081 m\u2082 : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\ni : \u2115\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f i =\n    ((fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n      i\n[PROOFSTEP]\nsimp only [map_smul, map_add, Pi.add_apply, Pi.smul_apply, AlternatingMap.curryLeft_add, AlternatingMap.curryLeft_smul,\n  map_add, map_smul, LinearMap.add_apply, LinearMap.smul_apply]\n[GOAL]\ncase refine'_1.refine'_2\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nc : R\nm : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n    c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase refine'_1.refine'_2.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nc : R\nm : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\ni : \u2115\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f i =\n    (c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f) i\n[PROOFSTEP]\nsimp only [map_smul, map_add, Pi.add_apply, Pi.smul_apply, AlternatingMap.curryLeft_add, AlternatingMap.curryLeft_smul,\n  map_add, map_smul, LinearMap.add_apply, LinearMap.smul_apply]\n[GOAL]\ncase refine'_1.refine'_3\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm : M\nf\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase refine'_1.refine'_3.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm : M\nf\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\ni : \u2115\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) i =\n    ((fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n      i\n[PROOFSTEP]\nsimp only [map_smul, map_add, Pi.add_apply, Pi.smul_apply, AlternatingMap.curryLeft_add, AlternatingMap.curryLeft_smul,\n  map_add, map_smul, LinearMap.add_apply, LinearMap.smul_apply]\n[GOAL]\ncase refine'_1.refine'_4\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nc : R\nm : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n    c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase refine'_1.refine'_4.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nc : R\nm : M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\ni : \u2115\n\u22a2 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) i =\n    (c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f) i\n[PROOFSTEP]\nsimp only [map_smul, map_add, Pi.add_apply, Pi.smul_apply, AlternatingMap.curryLeft_add, AlternatingMap.curryLeft_smul,\n  map_add, map_smul, LinearMap.add_apply, LinearMap.smul_apply]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\n\u22a2 \u2200 (m : M) (x : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n    \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                (_ :\n                  \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                (_ :\n                  \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                      c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                (_ :\n                  \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                (_ :\n                  \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                      c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n            m)\n        (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                  (_ :\n                    \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                  (_ :\n                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                  (_ :\n                    \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                  (_ :\n                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n              m)\n          x) =\n      \u21910 m \u2022 x\n[PROOFSTEP]\nintro m x\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm : M\nx : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n              (_ :\n                \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                  (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n              (_ :\n                \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                  (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                    c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n              (_ :\n                \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                  (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n              (_ :\n                \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                  (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                    c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n          m)\n      (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                (_ :\n                  \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                (_ :\n                  \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                      c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                (_ :\n                  \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                (_ :\n                  \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                    (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                      c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n            m)\n        x) =\n    \u21910 m \u2022 x\n[PROOFSTEP]\ndsimp only [LinearMap.mk\u2082_apply, QuadraticForm.coeFn_zero, Pi.zero_apply]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm : M\nx : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun i => \u2191(AlternatingMap.curryLeft (\u2191(AlternatingMap.curryLeft (x (Nat.succ (Nat.succ i)))) m)) m) = 0 \u2022 x\n[PROOFSTEP]\nsimp_rw [zero_smul]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm : M\nx : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (fun i => \u2191(AlternatingMap.curryLeft (\u2191(AlternatingMap.curryLeft (x (Nat.succ (Nat.succ i)))) m)) m) = 0\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase refine'_2.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nm : M\nx : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\ni : \u2115\n\u22a2 \u2191(AlternatingMap.curryLeft (\u2191(AlternatingMap.curryLeft (x (Nat.succ (Nat.succ i)))) m)) m = OfNat.ofNat 0 i\n[PROOFSTEP]\nexact AlternatingMap.curryLeft_same _ _\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nm : M\n\u22a2 \u2191(\u2191liftAlternating f) (\u2191(\u03b9 R) m) = \u2191(f 1) ![m]\n[PROOFSTEP]\ndsimp [liftAlternating]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nm : M\n\u22a2 \u2191(\u2191(\u2191(foldl 0\n                  (LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                    (_ :\n                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                    (_ :\n                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                  (_ :\n                    \u2200 (m : M) (x : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                  (_ :\n                                    \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                  (_ :\n                                    \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                              m)\n                          (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                    (_ :\n                                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                    (_ :\n                                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                                m)\n                            x) =\n                        \u21910 m \u2022 x))\n              f)\n          (\u2191(\u03b9 R) m) 0)\n      0 =\n    \u2191(f 1) ![m]\n[PROOFSTEP]\nrw [foldl_\u03b9, LinearMap.mk\u2082_apply, AlternatingMap.curryLeft_apply_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nm : M\n\u22a2 \u2191(f (Nat.succ 0)) (Matrix.vecCons m 0) = \u2191(f 1) ![m]\n[PROOFSTEP]\ncongr\n  -- porting note: In Lean 3, `congr` could use the `[Subsingleton (Fin 0 \u2192 M)]` instance to finish\n    -- the proof. Here, the instance can be synthesized but `congr` does not use it so the following\n    -- line is provided.\n[GOAL]\ncase h.e_6.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nm : M\n\u22a2 Matrix.vecCons m 0 = ![m]\n[PROOFSTEP]\nrw [Matrix.zero_empty]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nm : M\nx : ExteriorAlgebra R M\n\u22a2 \u2191(\u2191liftAlternating f) (\u2191(\u03b9 R) m * x) = \u2191(\u2191liftAlternating fun i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) x\n[PROOFSTEP]\ndsimp [liftAlternating]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nm : M\nx : ExteriorAlgebra R M\n\u22a2 \u2191(\u2191(\u2191(foldl 0\n                  (LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                    (_ :\n                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                    (_ :\n                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                  (_ :\n                    \u2200 (m : M) (x : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                  (_ :\n                                    \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                  (_ :\n                                    \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                              m)\n                          (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                    (_ :\n                                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                    (_ :\n                                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                                m)\n                            x) =\n                        \u21910 m \u2022 x))\n              f)\n          (\u2191(\u03b9 R) m * x) 0)\n      0 =\n    \u2191(\u2191(\u2191(foldl 0\n                  (LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                    (_ :\n                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                    (_ :\n                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                  (_ :\n                    \u2200 (m : M) (x : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                  (_ :\n                                    \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                  (_ :\n                                    \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                              m)\n                          (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                    (_ :\n                                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                    (_ :\n                                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                                m)\n                            x) =\n                        \u21910 m \u2022 x))\n              fun i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n          x 0)\n      0\n[PROOFSTEP]\nrw [foldl_mul, foldl_\u03b9]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nm : M\nx : ExteriorAlgebra R M\n\u22a2 \u2191(\u2191(\u2191(foldl 0\n                  (LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                    (_ :\n                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                    (_ :\n                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                  (_ :\n                    \u2200 (m : M) (x : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                  (_ :\n                                    \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                  (_ :\n                                    \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                              m)\n                          (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                    (_ :\n                                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                    (_ :\n                                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                                m)\n                            x) =\n                        \u21910 m \u2022 x))\n              (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                        (_ :\n                          \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                              (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                        (_ :\n                          \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                              c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                        (_ :\n                          \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                              (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                        (_ :\n                          \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                              c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                    m)\n                f))\n          x 0)\n      0 =\n    \u2191(\u2191(\u2191(foldl 0\n                  (LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                    (_ :\n                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                    (_ :\n                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                  (_ :\n                    \u2200 (m : M) (x : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                  (_ :\n                                    \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                  (_ :\n                                    \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                              m)\n                          (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                    (_ :\n                                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                    (_ :\n                                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                                m)\n                            x) =\n                        \u21910 m \u2022 x))\n              fun i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n          x 0)\n      0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 \u2191(\u2191liftAlternating f) 1 = \u2191(f 0) 0\n[PROOFSTEP]\ndsimp [liftAlternating]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 \u2191(\u2191(\u2191(foldl 0\n                  (LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                    (_ :\n                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                    (_ :\n                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                    (_ :\n                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                  (_ :\n                    \u2200 (m : M) (x : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                      \u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                  (_ :\n                                    \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                  (_ :\n                                    \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                  (_ :\n                                    \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                      (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                        c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                              m)\n                          (\u2191(\u2191(LinearMap.mk\u2082 R (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)\n                                    (_ :\n                                      \u2200 (m\u2081 m\u2082 : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (m\u2081 + m\u2082) f =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2081 f +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m\u2082 f)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) (c \u2022 m) f =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f)\n                                    (_ :\n                                      \u2200 (m : M) (f\u2081 f\u2082 : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (f\u2081 + f\u2082) =\n                                          (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2081 +\n                                            (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f\u2082)\n                                    (_ :\n                                      \u2200 (c : R) (m : M) (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n                                        (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m (c \u2022 f) =\n                                          c \u2022 (fun m f i => \u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m) m f))\n                                m)\n                            x) =\n                        \u21910 m \u2022 x))\n              f)\n          1 0)\n      0 =\n    \u2191(f 0) 0\n[PROOFSTEP]\nrw [foldl_one]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nr : R\n\u22a2 \u2191(\u2191liftAlternating f) (\u2191(algebraMap R (ExteriorAlgebra R M)) r) = r \u2022 \u2191(f 0) 0\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, map_smul, liftAlternating_one]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn : \u2115\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin n \u2192 M\n\u22a2 \u2191(\u2191liftAlternating f) (\u2191(\u03b9Multi R n) v) = \u2191(f n) v\n[PROOFSTEP]\nrw [\u03b9Multi_apply]\n  -- porting note: `v` is generalized automatically so it was removed from the next line\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn : \u2115\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin n \u2192 M\n\u22a2 \u2191(\u2191liftAlternating f) (List.prod (List.ofFn fun i => \u2191(\u03b9 R) (v i))) = \u2191(f n) v\n[PROOFSTEP]\ninduction' n with n ih generalizing f\n[GOAL]\ncase zero\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn : \u2115\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv\u271d : Fin n \u2192 M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin Nat.zero \u2192 M\n\u22a2 \u2191(\u2191liftAlternating f) (List.prod (List.ofFn fun i => \u2191(\u03b9 R) (v i))) = \u2191(f Nat.zero) v\n[PROOFSTEP]\nletI : Subsingleton (Fin 0 \u2192 M) := by infer_instance\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn : \u2115\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv\u271d : Fin n \u2192 M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin Nat.zero \u2192 M\n\u22a2 Subsingleton (Fin 0 \u2192 M)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase zero\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn : \u2115\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv\u271d : Fin n \u2192 M\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin Nat.zero \u2192 M\nthis : Subsingleton (Fin 0 \u2192 M) := inferInstance\n\u22a2 \u2191(\u2191liftAlternating f) (List.prod (List.ofFn fun i => \u2191(\u03b9 R) (v i))) = \u2191(f Nat.zero) v\n[PROOFSTEP]\nrw [List.ofFn_zero, List.prod_nil, liftAlternating_one, Subsingleton.elim 0 v]\n[GOAL]\ncase succ\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn\u271d : \u2115\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv\u271d : Fin n\u271d \u2192 M\nn : \u2115\nih :\n  \u2200 (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)) (v : Fin n \u2192 M),\n    \u2191(\u2191liftAlternating f) (List.prod (List.ofFn fun i => \u2191(\u03b9 R) (v i))) = \u2191(f n) v\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin (Nat.succ n) \u2192 M\n\u22a2 \u2191(\u2191liftAlternating f) (List.prod (List.ofFn fun i => \u2191(\u03b9 R) (v i))) = \u2191(f (Nat.succ n)) v\n[PROOFSTEP]\nrw [List.ofFn_succ, List.prod_cons, liftAlternating_\u03b9_mul, ih, AlternatingMap.curryLeft_apply_apply]\n[GOAL]\ncase succ\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn\u271d : \u2115\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv\u271d : Fin n\u271d \u2192 M\nn : \u2115\nih :\n  \u2200 (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)) (v : Fin n \u2192 M),\n    \u2191(\u2191liftAlternating f) (List.prod (List.ofFn fun i => \u2191(\u03b9 R) (v i))) = \u2191(f n) v\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin (Nat.succ n) \u2192 M\n\u22a2 \u2191(f (Nat.succ n)) (Matrix.vecCons (v 0) fun i => v (Fin.succ i)) = \u2191(f (Nat.succ n)) v\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.h.e_6.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nn\u271d : \u2115\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv\u271d : Fin n\u271d \u2192 M\nn : \u2115\nih :\n  \u2200 (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)) (v : Fin n \u2192 M),\n    \u2191(\u2191liftAlternating f) (List.prod (List.ofFn fun i => \u2191(\u03b9 R) (v i))) = \u2191(f n) v\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : Fin (Nat.succ n) \u2192 M\n\u22a2 (Matrix.vecCons (v 0) fun i => v (Fin.succ i)) = v\n[PROOFSTEP]\nexact Matrix.cons_head_tail _\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\ng : N \u2192\u2097[R] N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 (\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) = LinearMap.comp g (\u2191liftAlternating f)\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\ng : N \u2192\u2097[R] N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : ExteriorAlgebra R M\n\u22a2 \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) v = \u2191(LinearMap.comp g (\u2191liftAlternating f)) v\n[PROOFSTEP]\nrw [LinearMap.comp_apply]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\ng : N \u2192\u2097[R] N'\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nv : ExteriorAlgebra R M\n\u22a2 \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) v = \u2191g (\u2191(\u2191liftAlternating f) v)\n[PROOFSTEP]\ninduction' v using CliffordAlgebra.left_induction with r x y hx hy x m hx generalizing f\n[GOAL]\ncase h.hr\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\ng : N \u2192\u2097[R] N'\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nr : R\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) (\u2191(algebraMap R (CliffordAlgebra 0)) r) =\n    \u2191g (\u2191(\u2191liftAlternating f) (\u2191(algebraMap R (CliffordAlgebra 0)) r))\n[PROOFSTEP]\nrw [liftAlternating_algebraMap, liftAlternating_algebraMap, map_smul, LinearMap.compAlternatingMap_apply]\n[GOAL]\ncase h.h_add\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\ng : N \u2192\u2097[R] N'\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nx y : CliffordAlgebra 0\nhx :\n  \u2200 (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n    \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) x = \u2191g (\u2191(\u2191liftAlternating f) x)\nhy :\n  \u2200 (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n    \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) y = \u2191g (\u2191(\u2191liftAlternating f) y)\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) (x + y) = \u2191g (\u2191(\u2191liftAlternating f) (x + y))\n[PROOFSTEP]\nrw [map_add, map_add, map_add, hx, hy]\n[GOAL]\ncase h.h_mul_\u03b9\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\ng : N \u2192\u2097[R] N'\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nx : CliffordAlgebra 0\nm : M\nhx :\n  \u2200 (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n    \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) x = \u2191g (\u2191(\u2191liftAlternating f) x)\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) (\u2191(CliffordAlgebra.\u03b9 0) m * x) =\n    \u2191g (\u2191(\u2191liftAlternating f) (\u2191(CliffordAlgebra.\u03b9 0) m * x))\n[PROOFSTEP]\nrw [liftAlternating_\u03b9_mul, liftAlternating_\u03b9_mul, \u2190 hx]\n[GOAL]\ncase h.h_mul_\u03b9\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\ng : N \u2192\u2097[R] N'\nf\u271d : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\nx : CliffordAlgebra 0\nm : M\nhx :\n  \u2200 (f : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)),\n    \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (f i)) x = \u2191g (\u2191(\u2191liftAlternating f) x)\nf : (i : \u2115) \u2192 AlternatingMap R M N (Fin i)\n\u22a2 \u2191(\u2191liftAlternating fun i => \u2191(AlternatingMap.curryLeft (\u2191(LinearMap.compAlternatingMap g) (f (Nat.succ i)))) m) x =\n    \u2191(\u2191liftAlternating fun i => \u2191(LinearMap.compAlternatingMap g) (\u2191(AlternatingMap.curryLeft (f (Nat.succ i))) m)) x\n[PROOFSTEP]\nsimp_rw [AlternatingMap.curryLeft_compAlternatingMap]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\n\u22a2 \u2191liftAlternating (\u03b9Multi R) = LinearMap.id\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nv : ExteriorAlgebra R M\n\u22a2 \u2191(\u2191liftAlternating (\u03b9Multi R)) v = \u2191LinearMap.id v\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nv : ExteriorAlgebra R M\n\u22a2 \u2191(\u2191liftAlternating (\u03b9Multi R)) v = v\n[PROOFSTEP]\ninduction' v using CliffordAlgebra.left_induction with r x y hx hy x m hx\n[GOAL]\ncase h.hr\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nr : R\n\u22a2 \u2191(\u2191liftAlternating (\u03b9Multi R)) (\u2191(algebraMap R (CliffordAlgebra 0)) r) = \u2191(algebraMap R (CliffordAlgebra 0)) r\n[PROOFSTEP]\nrw [liftAlternating_algebraMap, \u03b9Multi_zero_apply, Algebra.algebraMap_eq_smul_one]\n[GOAL]\ncase h.h_add\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nx y : CliffordAlgebra 0\nhx : \u2191(\u2191liftAlternating (\u03b9Multi R)) x = x\nhy : \u2191(\u2191liftAlternating (\u03b9Multi R)) y = y\n\u22a2 \u2191(\u2191liftAlternating (\u03b9Multi R)) (x + y) = x + y\n[PROOFSTEP]\nrw [map_add, hx, hy]\n[GOAL]\ncase h.h_mul_\u03b9\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nx : CliffordAlgebra 0\nm : M\nhx : \u2191(\u2191liftAlternating (\u03b9Multi R)) x = x\n\u22a2 \u2191(\u2191liftAlternating (\u03b9Multi R)) (\u2191(CliffordAlgebra.\u03b9 0) m * x) = \u2191(CliffordAlgebra.\u03b9 0) m * x\n[PROOFSTEP]\nsimp_rw [liftAlternating_\u03b9_mul, \u03b9Multi_succ_curryLeft, liftAlternating_comp, LinearMap.comp_apply,\n  LinearMap.mulLeft_apply, hx]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nN' : Type u_4\ninst\u271d\u2076 : CommRing R\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : AddCommGroup N\ninst\u271d\u00b3 : AddCommGroup N'\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : Module R N\ninst\u271d : Module R N'\nF : ExteriorAlgebra R M \u2192\u2097[R] N\n\u22a2 LinearMap.comp F (\u2191liftAlternating fun i => \u03b9Multi R i) = F\n[PROOFSTEP]\nrw [liftAlternating_\u03b9Multi, LinearMap.comp_id]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.ExteriorAlgebra.OfAlternating", "llama_tokens": 27203, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8991213772699435, "lm_q2_score": 0.76908023177796, "lm_q1q2_score": 0.6914964772272868}}
{"text": "[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b2 : TopologicalSpace \u03b1\ninst\u271d\u00b9 : PartialOrder \u03b1\ninst\u271d : TopologicalSpace \u03b2\na : \u03b1\nf : \u03b1 \u2192 \u03b2\n\u22a2 ContinuousWithinAt f (Ioi a) a \u2194 ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nsimp only [\u2190 Ici_diff_left, continuousWithinAt_diff_self]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b2 : TopologicalSpace \u03b1\ninst\u271d\u00b9 : LinearOrder \u03b1\ninst\u271d : TopologicalSpace \u03b2\na : \u03b1\n\u22a2 \ud835\udcdd[Iic a] a \u2294 \ud835\udcdd[Ici a] a = \ud835\udcdd a\n[PROOFSTEP]\nrw [\u2190 nhdsWithin_union, Iic_union_Ici, nhdsWithin_univ]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b2 : TopologicalSpace \u03b1\ninst\u271d\u00b9 : LinearOrder \u03b1\ninst\u271d : TopologicalSpace \u03b2\na : \u03b1\n\u22a2 \ud835\udcdd[Iio a] a \u2294 \ud835\udcdd[Ici a] a = \ud835\udcdd a\n[PROOFSTEP]\nrw [\u2190 nhdsWithin_union, Iio_union_Ici, nhdsWithin_univ]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b2 : TopologicalSpace \u03b1\ninst\u271d\u00b9 : LinearOrder \u03b1\ninst\u271d : TopologicalSpace \u03b2\na : \u03b1\n\u22a2 \ud835\udcdd[Iic a] a \u2294 \ud835\udcdd[Ioi a] a = \ud835\udcdd a\n[PROOFSTEP]\nrw [\u2190 nhdsWithin_union, Iic_union_Ioi, nhdsWithin_univ]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b2 : TopologicalSpace \u03b1\ninst\u271d\u00b9 : LinearOrder \u03b1\ninst\u271d : TopologicalSpace \u03b2\na : \u03b1\n\u22a2 \ud835\udcdd[Iio a] a \u2294 \ud835\udcdd[Ioi a] a = \ud835\udcdd[{a}\u1d9c] a\n[PROOFSTEP]\nrw [\u2190 nhdsWithin_union, Iio_union_Ioi]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b2 : TopologicalSpace \u03b1\ninst\u271d\u00b9 : LinearOrder \u03b1\ninst\u271d : TopologicalSpace \u03b2\na : \u03b1\nf : \u03b1 \u2192 \u03b2\n\u22a2 ContinuousAt f a \u2194 ContinuousWithinAt f (Iic a) a \u2227 ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nsimp only [ContinuousWithinAt, ContinuousAt, \u2190 tendsto_sup, nhds_left_sup_nhds_right]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b2 : TopologicalSpace \u03b1\ninst\u271d\u00b9 : LinearOrder \u03b1\ninst\u271d : TopologicalSpace \u03b2\na : \u03b1\nf : \u03b1 \u2192 \u03b2\n\u22a2 ContinuousAt f a \u2194 ContinuousWithinAt f (Iio a) a \u2227 ContinuousWithinAt f (Ioi a) a\n[PROOFSTEP]\nrw [continuousWithinAt_Ioi_iff_Ici, continuousWithinAt_Iio_iff_Iic, continuousAt_iff_continuous_left_right]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.LeftRight", "llama_tokens": 880, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240825770432, "lm_q2_score": 0.795658090372256, "lm_q1q2_score": 0.6884225412873373}}
{"text": "[GOAL]\nx : \u2102\n\u22a2 Real.sin (arg x) = x.im / \u2191abs x\n[PROOFSTEP]\nunfold arg\n[GOAL]\nx : \u2102\n\u22a2 Real.sin\n      (if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n      else if 0 \u2264 x.im then arcsin ((-x).im / \u2191abs x) + \u03c0 else arcsin ((-x).im / \u2191abs x) - \u03c0) =\n    x.im / \u2191abs x\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nx : \u2102\nh\u271d : 0 \u2264 x.re\n\u22a2 Real.sin (arcsin (x.im / \u2191abs x)) = x.im / \u2191abs x\n[PROOFSTEP]\nsimp [sub_eq_add_neg, arg,\n  Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div,\n  Real.arcsin_neg, Real.sin_neg]\n[GOAL]\ncase pos\nx : \u2102\nh\u271d\u00b9 : \u00ac0 \u2264 x.re\nh\u271d : 0 \u2264 x.im\n\u22a2 Real.sin (arcsin ((-x).im / \u2191abs x) + \u03c0) = x.im / \u2191abs x\n[PROOFSTEP]\nsimp [sub_eq_add_neg, arg,\n  Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div,\n  Real.arcsin_neg, Real.sin_neg]\n[GOAL]\ncase neg\nx : \u2102\nh\u271d\u00b9 : \u00ac0 \u2264 x.re\nh\u271d : \u00ac0 \u2264 x.im\n\u22a2 Real.sin (arcsin ((-x).im / \u2191abs x) - \u03c0) = x.im / \u2191abs x\n[PROOFSTEP]\nsimp [sub_eq_add_neg, arg,\n  Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div,\n  Real.arcsin_neg, Real.sin_neg]\n[GOAL]\nx : \u2102\nhx : x \u2260 0\n\u22a2 Real.cos (arg x) = x.re / \u2191abs x\n[PROOFSTEP]\nrw [arg]\n[GOAL]\nx : \u2102\nhx : x \u2260 0\n\u22a2 Real.cos\n      (if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n      else if 0 \u2264 x.im then arcsin ((-x).im / \u2191abs x) + \u03c0 else arcsin ((-x).im / \u2191abs x) - \u03c0) =\n    x.re / \u2191abs x\n[PROOFSTEP]\nsplit_ifs with h\u2081 h\u2082\n[GOAL]\ncase pos\nx : \u2102\nhx : x \u2260 0\nh\u2081 : 0 \u2264 x.re\n\u22a2 Real.cos (arcsin (x.im / \u2191abs x)) = x.re / \u2191abs x\n[PROOFSTEP]\nrw [Real.cos_arcsin]\n[GOAL]\ncase pos\nx : \u2102\nhx : x \u2260 0\nh\u2081 : 0 \u2264 x.re\n\u22a2 sqrt (1 - (x.im / \u2191abs x) ^ 2) = x.re / \u2191abs x\n[PROOFSTEP]\nfield_simp [Real.sqrt_sq, (abs.pos hx).le, *]\n[GOAL]\ncase pos\nx : \u2102\nhx : x \u2260 0\nh\u2081 : \u00ac0 \u2264 x.re\nh\u2082 : 0 \u2264 x.im\n\u22a2 Real.cos (arcsin ((-x).im / \u2191abs x) + \u03c0) = x.re / \u2191abs x\n[PROOFSTEP]\nrw [Real.cos_add_pi, Real.cos_arcsin]\n[GOAL]\ncase pos\nx : \u2102\nhx : x \u2260 0\nh\u2081 : \u00ac0 \u2264 x.re\nh\u2082 : 0 \u2264 x.im\n\u22a2 -sqrt (1 - ((-x).im / \u2191abs x) ^ 2) = x.re / \u2191abs x\n[PROOFSTEP]\nfield_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h\u2081), *]\n[GOAL]\ncase neg\nx : \u2102\nhx : x \u2260 0\nh\u2081 : \u00ac0 \u2264 x.re\nh\u2082 : \u00ac0 \u2264 x.im\n\u22a2 Real.cos (arcsin ((-x).im / \u2191abs x) - \u03c0) = x.re / \u2191abs x\n[PROOFSTEP]\nrw [Real.cos_sub_pi, Real.cos_arcsin]\n[GOAL]\ncase neg\nx : \u2102\nhx : x \u2260 0\nh\u2081 : \u00ac0 \u2264 x.re\nh\u2082 : \u00ac0 \u2264 x.im\n\u22a2 -sqrt (1 - ((-x).im / \u2191abs x) ^ 2) = x.re / \u2191abs x\n[PROOFSTEP]\nfield_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h\u2081), *]\n[GOAL]\nx : \u2102\n\u22a2 \u2191(\u2191abs x) * exp (\u2191(arg x) * I) = x\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase inl\n\u22a2 \u2191(\u2191abs 0) * exp (\u2191(arg 0) * I) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nx : \u2102\nhx : x \u2260 0\n\u22a2 \u2191(\u2191abs x) * exp (\u2191(arg x) * I) = x\n[PROOFSTEP]\nhave : abs x \u2260 0 := abs.ne_zero hx\n[GOAL]\ncase inr\nx : \u2102\nhx : x \u2260 0\nthis : \u2191abs x \u2260 0\n\u22a2 \u2191(\u2191abs x) * exp (\u2191(arg x) * I) = x\n[PROOFSTEP]\next\n[GOAL]\ncase inr.a\nx : \u2102\nhx : x \u2260 0\nthis : \u2191abs x \u2260 0\n\u22a2 (\u2191(\u2191abs x) * exp (\u2191(arg x) * I)).re = x.re\n[PROOFSTEP]\nfield_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)]\n[GOAL]\ncase inr.a\nx : \u2102\nhx : x \u2260 0\nthis : \u2191abs x \u2260 0\n\u22a2 (\u2191(\u2191abs x) * exp (\u2191(arg x) * I)).im = x.im\n[PROOFSTEP]\nfield_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)]\n[GOAL]\nx : \u2102\n\u22a2 \u2191(\u2191abs x) * (cos \u2191(arg x) + sin \u2191(arg x) * I) = x\n[PROOFSTEP]\nrw [\u2190 exp_mul_I, abs_mul_exp_arg_mul_I]\n[GOAL]\nz : \u2102\n\u22a2 \u2191abs z = 1 \u2194 \u2203 \u03b8, exp (\u2191\u03b8 * I) = z\n[PROOFSTEP]\nrefine' \u27e8fun hz => \u27e8arg z, _\u27e9, _\u27e9\n[GOAL]\ncase refine'_1\nz : \u2102\nhz : \u2191abs z = 1\n\u22a2 exp (\u2191(arg z) * I) = z\n[PROOFSTEP]\ncalc\n  exp (arg z * I) = abs z * exp (arg z * I) := by rw [hz, ofReal_one, one_mul]\n  _ = z := abs_mul_exp_arg_mul_I z\n[GOAL]\nz : \u2102\nhz : \u2191abs z = 1\n\u22a2 exp (\u2191(arg z) * I) = \u2191(\u2191abs z) * exp (\u2191(arg z) * I)\n[PROOFSTEP]\nrw [hz, ofReal_one, one_mul]\n[GOAL]\ncase refine'_2\nz : \u2102\n\u22a2 (\u2203 \u03b8, exp (\u2191\u03b8 * I) = z) \u2192 \u2191abs z = 1\n[PROOFSTEP]\nrintro \u27e8\u03b8, rfl\u27e9\n[GOAL]\ncase refine'_2.intro\n\u03b8 : \u211d\n\u22a2 \u2191abs (exp (\u2191\u03b8 * I)) = 1\n[PROOFSTEP]\nexact Complex.abs_exp_ofReal_mul_I \u03b8\n[GOAL]\n\u22a2 (Set.range fun x => exp (\u2191x * I)) = Metric.sphere 0 1\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nx : \u2102\n\u22a2 (x \u2208 Set.range fun x => exp (\u2191x * I)) \u2194 x \u2208 Metric.sphere 0 1\n[PROOFSTEP]\nsimp only [mem_sphere_zero_iff_norm, norm_eq_abs, abs_eq_one_iff, Set.mem_range]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 arg (\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I)) = \u03b8\n[PROOFSTEP]\nsimp only [arg, map_mul, abs_cos_add_sin_mul_I, abs_of_nonneg hr.le, mul_one]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 (if 0 \u2264 (\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I)).re then arcsin ((\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I)).im / r)\n    else\n      if 0 \u2264 (\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I)).im then arcsin ((-(\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I))).im / r) + \u03c0\n      else arcsin ((-(\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I))).im / r) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nsimp only [ofReal_mul_re, ofReal_mul_im, neg_im, \u2190 ofReal_cos, \u2190 ofReal_sin, \u2190 mk_eq_add_mul_I, neg_div,\n  mul_div_cancel_left _ hr.ne', mul_nonneg_iff_right_nonneg_of_pos hr]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nby_cases h\u2081 : \u03b8 \u2208 Set.Icc (-(\u03c0 / 2)) (\u03c0 / 2)\n[GOAL]\ncase pos\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\nh\u2081 : \u03b8 \u2208 Set.Icc (-(\u03c0 / 2)) (\u03c0 / 2)\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nrw [if_pos]\n[GOAL]\ncase pos\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\nh\u2081 : \u03b8 \u2208 Set.Icc (-(\u03c0 / 2)) (\u03c0 / 2)\n\u22a2 arcsin (Real.sin \u03b8) = \u03b8\ncase pos.hc r : \u211d hr : 0 < r \u03b8 : \u211d h\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0 h\u2081 : \u03b8 \u2208 Set.Icc (-(\u03c0 / 2)) (\u03c0 / 2) \u22a2 0 \u2264 Real.cos \u03b8\n[PROOFSTEP]\nexacts [Real.arcsin_sin' h\u2081, Real.cos_nonneg_of_mem_Icc h\u2081]\n[GOAL]\ncase neg\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\nh\u2081 : \u00ac\u03b8 \u2208 Set.Icc (-(\u03c0 / 2)) (\u03c0 / 2)\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nrw [Set.mem_Icc, not_and_or, not_le, not_le] at h\u2081 \n[GOAL]\ncase neg\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\nh\u2081 : \u03b8 < -(\u03c0 / 2) \u2228 \u03c0 / 2 < \u03b8\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\ncases' h\u2081 with h\u2081 h\u2081\n[GOAL]\ncase neg.inl\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\nh\u2081 : \u03b8 < -(\u03c0 / 2)\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nreplace h\u03b8 := h\u03b8.1\n[GOAL]\ncase neg.inl\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nhave hcos : Real.cos \u03b8 < 0 := by\n  rw [\u2190 neg_pos, \u2190 Real.cos_add_pi]\n  refine' Real.cos_pos_of_mem_Ioo \u27e8_, _\u27e9 <;> linarith\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\n\u22a2 Real.cos \u03b8 < 0\n[PROOFSTEP]\nrw [\u2190 neg_pos, \u2190 Real.cos_add_pi]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\n\u22a2 0 < Real.cos (\u03b8 + \u03c0)\n[PROOFSTEP]\nrefine' Real.cos_pos_of_mem_Ioo \u27e8_, _\u27e9\n[GOAL]\ncase refine'_1\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\n\u22a2 -(\u03c0 / 2) < \u03b8 + \u03c0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\n\u22a2 \u03b8 + \u03c0 < \u03c0 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inl\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nhave hsin : Real.sin \u03b8 < 0 := Real.sin_neg_of_neg_of_neg_pi_lt (by linarith) h\u03b8\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\n\u22a2 \u03b8 < 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inl\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\nhsin : Real.sin \u03b8 < 0\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nrw [if_neg, if_neg, \u2190 Real.sin_add_pi, Real.arcsin_sin, add_sub_cancel] <;> [linarith; linarith; exact hsin.not_le;\n  exact hcos.not_le]\n[GOAL]\ncase neg.inl\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\nhsin : Real.sin \u03b8 < 0\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nrw [if_neg, if_neg, \u2190 Real.sin_add_pi, Real.arcsin_sin, add_sub_cancel]\n[GOAL]\ncase neg.inl.hx\u2081\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\nhsin : Real.sin \u03b8 < 0\n\u22a2 -(\u03c0 / 2) \u2264 \u03b8 + \u03c0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inl.hx\u2082\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\nhsin : Real.sin \u03b8 < 0\n\u22a2 \u03b8 + \u03c0 \u2264 \u03c0 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inl.hnc\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\nhsin : Real.sin \u03b8 < 0\n\u22a2 \u00ac0 \u2264 Real.sin \u03b8\n[PROOFSTEP]\nexact hsin.not_le\n[GOAL]\ncase neg.inl.hnc\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03b8 < -(\u03c0 / 2)\nh\u03b8 : -\u03c0 < \u03b8\nhcos : Real.cos \u03b8 < 0\nhsin : Real.sin \u03b8 < 0\n\u22a2 \u00ac0 \u2264 Real.cos \u03b8\n[PROOFSTEP]\nexact hcos.not_le\n[GOAL]\ncase neg.inr\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\nh\u2081 : \u03c0 / 2 < \u03b8\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nreplace h\u03b8 := h\u03b8.2\n[GOAL]\ncase neg.inr\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nhave hcos : Real.cos \u03b8 < 0 := Real.cos_neg_of_pi_div_two_lt_of_lt h\u2081 (by linarith)\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\n\u22a2 \u03b8 < \u03c0 + \u03c0 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inr\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nhave hsin : 0 \u2264 Real.sin \u03b8 := Real.sin_nonneg_of_mem_Icc \u27e8by linarith, h\u03b8\u27e9\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\n\u22a2 0 \u2264 \u03b8\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inr\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\nhsin : 0 \u2264 Real.sin \u03b8\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nrw [if_neg, if_pos, \u2190 Real.sin_sub_pi, Real.arcsin_sin, sub_add_cancel] <;> [linarith; linarith; exact hsin;\n  exact hcos.not_le]\n[GOAL]\ncase neg.inr\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\nhsin : 0 \u2264 Real.sin \u03b8\n\u22a2 (if 0 \u2264 Real.cos \u03b8 then arcsin (Real.sin \u03b8)\n    else if 0 \u2264 Real.sin \u03b8 then arcsin (-Real.sin \u03b8) + \u03c0 else arcsin (-Real.sin \u03b8) - \u03c0) =\n    \u03b8\n[PROOFSTEP]\nrw [if_neg, if_pos, \u2190 Real.sin_sub_pi, Real.arcsin_sin, sub_add_cancel]\n[GOAL]\ncase neg.inr.hx\u2081\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\nhsin : 0 \u2264 Real.sin \u03b8\n\u22a2 -(\u03c0 / 2) \u2264 \u03b8 - \u03c0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inr.hx\u2082\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\nhsin : 0 \u2264 Real.sin \u03b8\n\u22a2 \u03b8 - \u03c0 \u2264 \u03c0 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.inr.hc\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\nhsin : 0 \u2264 Real.sin \u03b8\n\u22a2 0 \u2264 Real.sin \u03b8\n[PROOFSTEP]\nexact hsin\n[GOAL]\ncase neg.inr.hnc\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nh\u2081 : \u03c0 / 2 < \u03b8\nh\u03b8 : \u03b8 \u2264 \u03c0\nhcos : Real.cos \u03b8 < 0\nhsin : 0 \u2264 Real.sin \u03b8\n\u22a2 \u00ac0 \u2264 Real.cos \u03b8\n[PROOFSTEP]\nexact hcos.not_le\n[GOAL]\n\u03b8 : \u211d\nh\u03b8 : \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 arg (cos \u2191\u03b8 + sin \u2191\u03b8 * I) = \u03b8\n[PROOFSTEP]\nrw [\u2190 one_mul (_ + _), \u2190 ofReal_one, arg_mul_cos_add_sin_mul_I zero_lt_one h\u03b8]\n[GOAL]\n\u22a2 arg 0 = 0\n[PROOFSTEP]\nsimp [arg, le_refl]\n[GOAL]\nx y : \u2102\nh\u2081 : \u2191abs x = \u2191abs y\nh\u2082 : arg x = arg y\n\u22a2 x = y\n[PROOFSTEP]\nrw [\u2190 abs_mul_exp_arg_mul_I x, \u2190 abs_mul_exp_arg_mul_I y, h\u2081, h\u2082]\n[GOAL]\nz : \u2102\n\u22a2 arg z \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nhave h\u03c0 : 0 < \u03c0 := Real.pi_pos\n[GOAL]\nz : \u2102\nh\u03c0 : 0 < \u03c0\n\u22a2 arg z \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nrcases eq_or_ne z 0 with (rfl | hz)\n[GOAL]\ncase inl\nh\u03c0 : 0 < \u03c0\n\u22a2 arg 0 \u2208 Set.Ioc (-\u03c0) \u03c0\ncase inr z : \u2102 h\u03c0 : 0 < \u03c0 hz : z \u2260 0 \u22a2 arg z \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nsimp [h\u03c0, h\u03c0.le]\n[GOAL]\ncase inr\nz : \u2102\nh\u03c0 : 0 < \u03c0\nhz : z \u2260 0\n\u22a2 arg z \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nrcases existsUnique_add_zsmul_mem_Ioc Real.two_pi_pos (arg z) (-\u03c0) with \u27e8N, hN, -\u27e9\n[GOAL]\ncase inr.intro.intro\nz : \u2102\nh\u03c0 : 0 < \u03c0\nhz : z \u2260 0\nN : \u2124\nhN : arg z + N \u2022 (2 * \u03c0) \u2208 Set.Ioc (-\u03c0) (-\u03c0 + 2 * \u03c0)\n\u22a2 arg z \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nrw [two_mul, neg_add_cancel_left, \u2190 two_mul, zsmul_eq_mul] at hN \n[GOAL]\ncase inr.intro.intro\nz : \u2102\nh\u03c0 : 0 < \u03c0\nhz : z \u2260 0\nN : \u2124\nhN : arg z + \u2191N * (2 * \u03c0) \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 arg z \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I z, \u2190 cos_add_int_mul_two_pi _ N, \u2190 sin_add_int_mul_two_pi _ N]\n[GOAL]\ncase inr.intro.intro\nz : \u2102\nh\u03c0 : 0 < \u03c0\nhz : z \u2260 0\nN : \u2124\nhN : arg z + \u2191N * (2 * \u03c0) \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 arg (\u2191(\u2191abs z) * (cos (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) + sin (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) * I)) \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nsimp only [\u2190 ofReal_one, \u2190 ofReal_bit0, \u2190 ofReal_mul, \u2190 ofReal_add, ofReal_int_cast]\n[GOAL]\ncase inr.intro.intro\nz : \u2102\nh\u03c0 : 0 < \u03c0\nhz : z \u2260 0\nN : \u2124\nhN : arg z + \u2191N * (2 * \u03c0) \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 arg (\u2191(\u2191abs z) * (cos (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) + sin (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) * I)) \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nhave := arg_mul_cos_add_sin_mul_I (abs.pos hz) hN\n[GOAL]\ncase inr.intro.intro\nz : \u2102\nh\u03c0 : 0 < \u03c0\nhz : z \u2260 0\nN : \u2124\nhN : arg z + \u2191N * (2 * \u03c0) \u2208 Set.Ioc (-\u03c0) \u03c0\nthis : arg (\u2191(\u2191abs z) * (cos \u2191(arg z + \u2191N * (2 * \u03c0)) + sin \u2191(arg z + \u2191N * (2 * \u03c0)) * I)) = arg z + \u2191N * (2 * \u03c0)\n\u22a2 arg (\u2191(\u2191abs z) * (cos (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) + sin (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) * I)) \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\npush_cast at this \n[GOAL]\ncase inr.intro.intro\nz : \u2102\nh\u03c0 : 0 < \u03c0\nhz : z \u2260 0\nN : \u2124\nhN : arg z + \u2191N * (2 * \u03c0) \u2208 Set.Ioc (-\u03c0) \u03c0\nthis : arg (\u2191(\u2191abs z) * (cos (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) + sin (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) * I)) = arg z + \u2191N * (2 * \u03c0)\n\u22a2 arg (\u2191(\u2191abs z) * (cos (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) + sin (\u2191(arg z) + \u2191N * (2 * \u2191\u03c0)) * I)) \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nrwa [this]\n[GOAL]\nz : \u2102\n\u22a2 0 \u2264 arg z \u2194 0 \u2264 z.im\n[PROOFSTEP]\nrcases eq_or_ne z 0 with (rfl | h\u2080)\n[GOAL]\ncase inl\n\u22a2 0 \u2264 arg 0 \u2194 0 \u2264 0.im\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nz : \u2102\nh\u2080 : z \u2260 0\n\u22a2 0 \u2264 arg z \u2194 0 \u2264 z.im\n[PROOFSTEP]\ncalc\n  0 \u2264 arg z \u2194 0 \u2264 Real.sin (arg z) :=\n    \u27e8fun h => Real.sin_nonneg_of_mem_Icc \u27e8h, arg_le_pi z\u27e9,\n      by\n      contrapose!\n      intro h\n      exact Real.sin_neg_of_neg_of_neg_pi_lt h (neg_pi_lt_arg _)\u27e9\n  _ \u2194 _ := by rw [sin_arg, le_div_iff (abs.pos h\u2080), zero_mul]\n[GOAL]\nz : \u2102\nh\u2080 : z \u2260 0\n\u22a2 0 \u2264 Real.sin (arg z) \u2192 0 \u2264 arg z\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nz : \u2102\nh\u2080 : z \u2260 0\n\u22a2 arg z < 0 \u2192 Real.sin (arg z) < 0\n[PROOFSTEP]\nintro h\n[GOAL]\nz : \u2102\nh\u2080 : z \u2260 0\nh : arg z < 0\n\u22a2 Real.sin (arg z) < 0\n[PROOFSTEP]\nexact Real.sin_neg_of_neg_of_neg_pi_lt h (neg_pi_lt_arg _)\n[GOAL]\nz : \u2102\nh\u2080 : z \u2260 0\n\u22a2 0 \u2264 Real.sin (arg z) \u2194 0 \u2264 z.im\n[PROOFSTEP]\nrw [sin_arg, le_div_iff (abs.pos h\u2080), zero_mul]\n[GOAL]\nx : \u2102\nr : \u211d\nhr : 0 < r\n\u22a2 arg (\u2191r * x) = arg x\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase inl\nr : \u211d\nhr : 0 < r\n\u22a2 arg (\u2191r * 0) = arg 0\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\ncase inr\nx : \u2102\nr : \u211d\nhr : 0 < r\nhx : x \u2260 0\n\u22a2 arg (\u2191r * x) = arg x\n[PROOFSTEP]\nconv_lhs =>\n  rw [\u2190 abs_mul_cos_add_sin_mul_I x, \u2190 mul_assoc, \u2190 ofReal_mul,\n    arg_mul_cos_add_sin_mul_I (mul_pos hr (abs.pos hx)) x.arg_mem_Ioc]\n[GOAL]\nx : \u2102\nr : \u211d\nhr : 0 < r\nhx : x \u2260 0\n| arg (\u2191r * x)\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I x, \u2190 mul_assoc, \u2190 ofReal_mul,\n    arg_mul_cos_add_sin_mul_I (mul_pos hr (abs.pos hx)) x.arg_mem_Ioc]\n[GOAL]\nx : \u2102\nr : \u211d\nhr : 0 < r\nhx : x \u2260 0\n| arg (\u2191r * x)\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I x, \u2190 mul_assoc, \u2190 ofReal_mul,\n    arg_mul_cos_add_sin_mul_I (mul_pos hr (abs.pos hx)) x.arg_mem_Ioc]\n[GOAL]\nx : \u2102\nr : \u211d\nhr : 0 < r\nhx : x \u2260 0\n| arg (\u2191r * x)\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I x, \u2190 mul_assoc, \u2190 ofReal_mul,\n  arg_mul_cos_add_sin_mul_I (mul_pos hr (abs.pos hx)) x.arg_mem_Ioc]\n[GOAL]\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 arg x = arg y \u2194 \u2191(\u2191abs y) / \u2191(\u2191abs x) * x = y\n[PROOFSTEP]\nsimp only [ext_abs_arg_iff, map_mul, map_div\u2080, abs_ofReal, abs_abs, div_mul_cancel _ (abs.ne_zero hx), eq_self_iff_true,\n  true_and_iff]\n[GOAL]\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 arg x = arg y \u2194 arg (\u2191(\u2191abs y) / \u2191(\u2191abs x) * x) = arg y\n[PROOFSTEP]\nrw [\u2190 ofReal_div, arg_real_mul]\n[GOAL]\ncase hr\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 0 < \u2191abs y / \u2191abs x\n[PROOFSTEP]\nexact div_pos (abs.pos hy) (abs.pos hx)\n[GOAL]\n\u22a2 arg 1 = 0\n[PROOFSTEP]\nsimp [arg, zero_le_one]\n[GOAL]\n\u22a2 arg (-1) = \u03c0\n[PROOFSTEP]\nsimp [arg, le_refl, not_le.2 (zero_lt_one' \u211d)]\n[GOAL]\n\u22a2 arg I = \u03c0 / 2\n[PROOFSTEP]\nsimp [arg, le_refl]\n[GOAL]\n\u22a2 arg (-I) = -(\u03c0 / 2)\n[PROOFSTEP]\nsimp [arg, le_refl]\n[GOAL]\nx : \u2102\n\u22a2 Real.tan (arg x) = x.im / x.re\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\nx : \u2102\nh : x = 0\n\u22a2 Real.tan (arg x) = x.im / x.re\n[PROOFSTEP]\nsimp only [h, zero_div, Complex.zero_im, Complex.arg_zero, Real.tan_zero, Complex.zero_re]\n[GOAL]\ncase neg\nx : \u2102\nh : \u00acx = 0\n\u22a2 Real.tan (arg x) = x.im / x.re\n[PROOFSTEP]\nrw [Real.tan_eq_sin_div_cos, sin_arg, cos_arg h, div_div_div_cancel_right _ (abs.ne_zero h)]\n[GOAL]\nx : \u211d\nhx : 0 \u2264 x\n\u22a2 arg \u2191x = 0\n[PROOFSTEP]\nsimp [arg, hx]\n[GOAL]\nz : \u2102\n\u22a2 arg z = 0 \u2194 0 \u2264 z.re \u2227 z.im = 0\n[PROOFSTEP]\nrefine' \u27e8fun h => _, _\u27e9\n[GOAL]\ncase refine'_1\nz : \u2102\nh : arg z = 0\n\u22a2 0 \u2264 z.re \u2227 z.im = 0\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I z, h]\n[GOAL]\ncase refine'_1\nz : \u2102\nh : arg z = 0\n\u22a2 0 \u2264 (\u2191(\u2191abs z) * (cos \u21910 + sin \u21910 * I)).re \u2227 (\u2191(\u2191abs z) * (cos \u21910 + sin \u21910 * I)).im = 0\n[PROOFSTEP]\nsimp [abs.nonneg]\n[GOAL]\ncase refine'_2\nz : \u2102\n\u22a2 0 \u2264 z.re \u2227 z.im = 0 \u2192 arg z = 0\n[PROOFSTEP]\ncases' z with x y\n[GOAL]\ncase refine'_2.mk\nx y : \u211d\n\u22a2 0 \u2264 { re := x, im := y }.re \u2227 { re := x, im := y }.im = 0 \u2192 arg { re := x, im := y } = 0\n[PROOFSTEP]\nrintro \u27e8h, rfl : y = 0\u27e9\n[GOAL]\ncase refine'_2.mk.intro\nx : \u211d\nh : 0 \u2264 { re := x, im := 0 }.re\n\u22a2 arg { re := x, im := 0 } = 0\n[PROOFSTEP]\nexact arg_ofReal_of_nonneg h\n[GOAL]\nz : \u2102\n\u22a2 arg z = \u03c0 \u2194 z.re < 0 \u2227 z.im = 0\n[PROOFSTEP]\nby_cases h\u2080 : z = 0\n[GOAL]\ncase pos\nz : \u2102\nh\u2080 : z = 0\n\u22a2 arg z = \u03c0 \u2194 z.re < 0 \u2227 z.im = 0\ncase neg z : \u2102 h\u2080 : \u00acz = 0 \u22a2 arg z = \u03c0 \u2194 z.re < 0 \u2227 z.im = 0\n[PROOFSTEP]\nsimp [h\u2080, lt_irrefl, Real.pi_ne_zero.symm]\n[GOAL]\ncase neg\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 arg z = \u03c0 \u2194 z.re < 0 \u2227 z.im = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 arg z = \u03c0 \u2192 z.re < 0 \u2227 z.im = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\nh : arg z = \u03c0\n\u22a2 z.re < 0 \u2227 z.im = 0\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I z, h]\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\nh : arg z = \u03c0\n\u22a2 (\u2191(\u2191abs z) * (cos \u2191\u03c0 + sin \u2191\u03c0 * I)).re < 0 \u2227 (\u2191(\u2191abs z) * (cos \u2191\u03c0 + sin \u2191\u03c0 * I)).im = 0\n[PROOFSTEP]\nsimp [h\u2080]\n[GOAL]\ncase neg.mpr\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 z.re < 0 \u2227 z.im = 0 \u2192 arg z = \u03c0\n[PROOFSTEP]\ncases' z with x y\n[GOAL]\ncase neg.mpr.mk\nx y : \u211d\nh\u2080 : \u00ac{ re := x, im := y } = 0\n\u22a2 { re := x, im := y }.re < 0 \u2227 { re := x, im := y }.im = 0 \u2192 arg { re := x, im := y } = \u03c0\n[PROOFSTEP]\nrintro \u27e8h : x < 0, rfl : y = 0\u27e9\n[GOAL]\ncase neg.mpr.mk.intro\nx : \u211d\nh : x < 0\nh\u2080 : \u00ac{ re := x, im := 0 } = 0\n\u22a2 arg { re := x, im := 0 } = \u03c0\n[PROOFSTEP]\nrw [\u2190 arg_neg_one, \u2190 arg_real_mul (-1) (neg_pos.2 h)]\n[GOAL]\ncase neg.mpr.mk.intro\nx : \u211d\nh : x < 0\nh\u2080 : \u00ac{ re := x, im := 0 } = 0\n\u22a2 arg { re := x, im := 0 } = arg (\u2191(-x) * -1)\n[PROOFSTEP]\nsimp [\u2190 ofReal_def]\n[GOAL]\nz : \u2102\n\u22a2 arg z < \u03c0 \u2194 0 \u2264 z.re \u2228 z.im \u2260 0\n[PROOFSTEP]\nrw [(arg_le_pi z).lt_iff_ne, not_iff_comm, not_or, not_le, Classical.not_not, arg_eq_pi_iff]\n[GOAL]\nz : \u2102\n\u22a2 arg z = \u03c0 / 2 \u2194 z.re = 0 \u2227 0 < z.im\n[PROOFSTEP]\nby_cases h\u2080 : z = 0\n[GOAL]\ncase pos\nz : \u2102\nh\u2080 : z = 0\n\u22a2 arg z = \u03c0 / 2 \u2194 z.re = 0 \u2227 0 < z.im\n[PROOFSTEP]\nsimp [h\u2080, lt_irrefl, Real.pi_div_two_pos.ne]\n[GOAL]\ncase neg\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 arg z = \u03c0 / 2 \u2194 z.re = 0 \u2227 0 < z.im\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 arg z = \u03c0 / 2 \u2192 z.re = 0 \u2227 0 < z.im\n[PROOFSTEP]\nintro h\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\nh : arg z = \u03c0 / 2\n\u22a2 z.re = 0 \u2227 0 < z.im\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I z, h]\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\nh : arg z = \u03c0 / 2\n\u22a2 (\u2191(\u2191abs z) * (cos \u2191(\u03c0 / 2) + sin \u2191(\u03c0 / 2) * I)).re = 0 \u2227 0 < (\u2191(\u2191abs z) * (cos \u2191(\u03c0 / 2) + sin \u2191(\u03c0 / 2) * I)).im\n[PROOFSTEP]\nsimp [h\u2080]\n[GOAL]\ncase neg.mpr\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 z.re = 0 \u2227 0 < z.im \u2192 arg z = \u03c0 / 2\n[PROOFSTEP]\ncases' z with x y\n[GOAL]\ncase neg.mpr.mk\nx y : \u211d\nh\u2080 : \u00ac{ re := x, im := y } = 0\n\u22a2 { re := x, im := y }.re = 0 \u2227 0 < { re := x, im := y }.im \u2192 arg { re := x, im := y } = \u03c0 / 2\n[PROOFSTEP]\nrintro \u27e8rfl : x = 0, hy : 0 < y\u27e9\n[GOAL]\ncase neg.mpr.mk.intro\ny : \u211d\nh\u2080 : \u00ac{ re := 0, im := y } = 0\nhy : 0 < y\n\u22a2 arg { re := 0, im := y } = \u03c0 / 2\n[PROOFSTEP]\nrw [\u2190 arg_I, \u2190 arg_real_mul I hy, ofReal_mul', I_re, I_im, mul_zero, mul_one]\n[GOAL]\nz : \u2102\n\u22a2 arg z = -(\u03c0 / 2) \u2194 z.re = 0 \u2227 z.im < 0\n[PROOFSTEP]\nby_cases h\u2080 : z = 0\n[GOAL]\ncase pos\nz : \u2102\nh\u2080 : z = 0\n\u22a2 arg z = -(\u03c0 / 2) \u2194 z.re = 0 \u2227 z.im < 0\n[PROOFSTEP]\nsimp [h\u2080, lt_irrefl, Real.pi_ne_zero]\n[GOAL]\ncase neg\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 arg z = -(\u03c0 / 2) \u2194 z.re = 0 \u2227 z.im < 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 arg z = -(\u03c0 / 2) \u2192 z.re = 0 \u2227 z.im < 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\nh : arg z = -(\u03c0 / 2)\n\u22a2 z.re = 0 \u2227 z.im < 0\n[PROOFSTEP]\nrw [\u2190 abs_mul_cos_add_sin_mul_I z, h]\n[GOAL]\ncase neg.mp\nz : \u2102\nh\u2080 : \u00acz = 0\nh : arg z = -(\u03c0 / 2)\n\u22a2 (\u2191(\u2191abs z) * (cos \u2191(-(\u03c0 / 2)) + sin \u2191(-(\u03c0 / 2)) * I)).re = 0 \u2227\n    (\u2191(\u2191abs z) * (cos \u2191(-(\u03c0 / 2)) + sin \u2191(-(\u03c0 / 2)) * I)).im < 0\n[PROOFSTEP]\nsimp [h\u2080]\n[GOAL]\ncase neg.mpr\nz : \u2102\nh\u2080 : \u00acz = 0\n\u22a2 z.re = 0 \u2227 z.im < 0 \u2192 arg z = -(\u03c0 / 2)\n[PROOFSTEP]\ncases' z with x y\n[GOAL]\ncase neg.mpr.mk\nx y : \u211d\nh\u2080 : \u00ac{ re := x, im := y } = 0\n\u22a2 { re := x, im := y }.re = 0 \u2227 { re := x, im := y }.im < 0 \u2192 arg { re := x, im := y } = -(\u03c0 / 2)\n[PROOFSTEP]\nrintro \u27e8rfl : x = 0, hy : y < 0\u27e9\n[GOAL]\ncase neg.mpr.mk.intro\ny : \u211d\nh\u2080 : \u00ac{ re := 0, im := y } = 0\nhy : y < 0\n\u22a2 arg { re := 0, im := y } = -(\u03c0 / 2)\n[PROOFSTEP]\nrw [\u2190 arg_neg_I, \u2190 arg_real_mul (-I) (neg_pos.2 hy), mk_eq_add_mul_I]\n[GOAL]\ncase neg.mpr.mk.intro\ny : \u211d\nh\u2080 : \u00ac{ re := 0, im := y } = 0\nhy : y < 0\n\u22a2 arg (\u21910 + \u2191y * I) = arg (\u2191(-y) * -I)\n[PROOFSTEP]\nsimp\n[GOAL]\nx : \u2102\nhx_re : x.re < 0\nhx_im : 0 \u2264 x.im\n\u22a2 arg x = arcsin ((-x).im / \u2191abs x) + \u03c0\n[PROOFSTEP]\nsimp only [arg, hx_re.not_le, hx_im, if_true, if_false]\n[GOAL]\nx : \u2102\nhx_re : x.re < 0\nhx_im : x.im < 0\n\u22a2 arg x = arcsin ((-x).im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp only [arg, hx_re.not_le, hx_im.not_le, if_false]\n[GOAL]\nz : \u2102\nh\u2081 : 0 \u2264 z.im\nh\u2082 : z \u2260 0\n\u22a2 arg z = arccos (z.re / \u2191abs z)\n[PROOFSTEP]\nrw [\u2190 cos_arg h\u2082, Real.arccos_cos (arg_nonneg_iff.2 h\u2081) (arg_le_pi _)]\n[GOAL]\nz : \u2102\nhz : z.im < 0\n\u22a2 arg z = -arccos (z.re / \u2191abs z)\n[PROOFSTEP]\nhave h\u2080 : z \u2260 0 := mt (congr_arg im) hz.ne\n[GOAL]\nz : \u2102\nhz : z.im < 0\nh\u2080 : z \u2260 0\n\u22a2 arg z = -arccos (z.re / \u2191abs z)\n[PROOFSTEP]\nrw [\u2190 cos_arg h\u2080, \u2190 Real.cos_neg, Real.arccos_cos, neg_neg]\n[GOAL]\ncase hx\u2081\nz : \u2102\nhz : z.im < 0\nh\u2080 : z \u2260 0\n\u22a2 0 \u2264 -arg z\ncase hx\u2082 z : \u2102 hz : z.im < 0 h\u2080 : z \u2260 0 \u22a2 -arg z \u2264 \u03c0\n[PROOFSTEP]\nexacts [neg_nonneg.2 (arg_neg_iff.2 hz).le, neg_le.2 (neg_pi_lt_arg z).le]\n[GOAL]\nx : \u2102\n\u22a2 arg (\u2191(starRingEnd \u2102) x) = if arg x = \u03c0 then \u03c0 else -arg x\n[PROOFSTEP]\nsimp_rw [arg_eq_pi_iff, arg, neg_im, conj_im, conj_re, abs_conj, neg_div, neg_neg, Real.arcsin_neg]\n[GOAL]\nx : \u2102\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nrcases lt_trichotomy x.re 0 with (hr | hr | hr)\n[GOAL]\ncase inl\nx : \u2102\nhr : x.re < 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nrcases lt_trichotomy x.im 0 with (hi | hi | hi)\n[GOAL]\ncase inr.inl\nx : \u2102\nhr : x.re = 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nrcases lt_trichotomy x.im 0 with (hi | hi | hi)\n[GOAL]\ncase inr.inr\nx : \u2102\nhr : 0 < x.re\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nrcases lt_trichotomy x.im 0 with (hi | hi | hi)\n[GOAL]\ncase inl.inl\nx : \u2102\nhr : x.re < 0\nhi : x.im < 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr, hr.not_le, hi.le, hi.ne, not_le.2 hi, add_comm]\n[GOAL]\ncase inl.inr.inl\nx : \u2102\nhr : x.re < 0\nhi : x.im = 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr, hr.not_le, hi]\n[GOAL]\ncase inl.inr.inr\nx : \u2102\nhr : x.re < 0\nhi : 0 < x.im\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr, hr.not_le, hi.ne.symm, hi.le, not_le.2 hi, sub_eq_neg_add]\n[GOAL]\ncase inr.inl.inl\nx : \u2102\nhr : x.re = 0\nhi : x.im < 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase inr.inl.inr.inl\nx : \u2102\nhr : x.re = 0\nhi : x.im = 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase inr.inl.inr.inr\nx : \u2102\nhr : x.re = 0\nhi : 0 < x.im\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase inr.inr.inl\nx : \u2102\nhr : 0 < x.re\nhi : x.im < 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr, hr.le, hi.ne]\n[GOAL]\ncase inr.inr.inr.inl\nx : \u2102\nhr : 0 < x.re\nhi : x.im = 0\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr, hr.le, hr.le.not_lt]\n[GOAL]\ncase inr.inr.inr.inr\nx : \u2102\nhr : 0 < x.re\nhi : 0 < x.im\n\u22a2 (if 0 \u2264 x.re then -arcsin (x.im / \u2191abs x)\n    else if 0 \u2264 -x.im then arcsin (x.im / \u2191abs x) + \u03c0 else arcsin (x.im / \u2191abs x) - \u03c0) =\n    if x.re < 0 \u2227 x.im = 0 then \u03c0\n    else\n      -if 0 \u2264 x.re then arcsin (x.im / \u2191abs x)\n        else if 0 \u2264 x.im then -arcsin (x.im / \u2191abs x) + \u03c0 else -arcsin (x.im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [hr, hr.le, hr.le.not_lt]\n[GOAL]\nx : \u2102\n\u22a2 arg x\u207b\u00b9 = if arg x = \u03c0 then \u03c0 else -arg x\n[PROOFSTEP]\nrw [\u2190 arg_conj, inv_def, mul_comm]\n[GOAL]\nx : \u2102\n\u22a2 arg (\u2191(\u2191normSq x)\u207b\u00b9 * \u2191(starRingEnd \u2102) x) = arg (\u2191(starRingEnd \u2102) x)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nx : \u2102\nhx : x = 0\n\u22a2 arg (\u2191(\u2191normSq x)\u207b\u00b9 * \u2191(starRingEnd \u2102) x) = arg (\u2191(starRingEnd \u2102) x)\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nx : \u2102\nhx : \u00acx = 0\n\u22a2 arg (\u2191(\u2191normSq x)\u207b\u00b9 * \u2191(starRingEnd \u2102) x) = arg (\u2191(starRingEnd \u2102) x)\n[PROOFSTEP]\nexact arg_real_mul (conj x) (by simp [hx])\n[GOAL]\nx : \u2102\nhx : \u00acx = 0\n\u22a2 0 < (\u2191normSq x)\u207b\u00b9\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nz : \u2102\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 0 \u2264 z.re \u2228 z.im < 0\n[PROOFSTEP]\ncases' le_or_lt 0 (re z) with hre hre\n[GOAL]\ncase inl\nz : \u2102\nhre : 0 \u2264 z.re\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 0 \u2264 z.re \u2228 z.im < 0\n[PROOFSTEP]\nsimp only [hre, arg_of_re_nonneg hre, Real.arcsin_le_pi_div_two, true_or_iff]\n[GOAL]\ncase inr\nz : \u2102\nhre : z.re < 0\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 0 \u2264 z.re \u2228 z.im < 0\n[PROOFSTEP]\nsimp only [hre.not_le, false_or_iff]\n[GOAL]\ncase inr\nz : \u2102\nhre : z.re < 0\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 z.im < 0\n[PROOFSTEP]\ncases' le_or_lt 0 (im z) with him him\n[GOAL]\ncase inr.inl\nz : \u2102\nhre : z.re < 0\nhim : 0 \u2264 z.im\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 z.im < 0\n[PROOFSTEP]\nsimp only [him.not_lt]\n[GOAL]\ncase inr.inl\nz : \u2102\nhre : z.re < 0\nhim : 0 \u2264 z.im\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 False\n[PROOFSTEP]\nrw [iff_false_iff, not_le, arg_of_re_neg_of_im_nonneg hre him, \u2190 sub_lt_iff_lt_add, half_sub,\n  Real.neg_pi_div_two_lt_arcsin, neg_im, neg_div, neg_lt_neg_iff, div_lt_one, \u2190 _root_.abs_of_nonneg him, abs_im_lt_abs]\n[GOAL]\ncase inr.inl\nz : \u2102\nhre : z.re < 0\nhim : 0 \u2264 z.im\n\u22a2 z.re \u2260 0\ncase inr.inl z : \u2102 hre : z.re < 0 him : 0 \u2264 z.im \u22a2 0 < \u2191abs z\n[PROOFSTEP]\nexacts [hre.ne, abs.pos <| ne_of_apply_ne re hre.ne]\n[GOAL]\ncase inr.inr\nz : \u2102\nhre : z.re < 0\nhim : z.im < 0\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 z.im < 0\n[PROOFSTEP]\nsimp only [him]\n[GOAL]\ncase inr.inr\nz : \u2102\nhre : z.re < 0\nhim : z.im < 0\n\u22a2 arg z \u2264 \u03c0 / 2 \u2194 True\n[PROOFSTEP]\nrw [iff_true_iff, arg_of_re_neg_of_im_neg hre him]\n[GOAL]\ncase inr.inr\nz : \u2102\nhre : z.re < 0\nhim : z.im < 0\n\u22a2 arcsin ((-z).im / \u2191abs z) - \u03c0 \u2264 \u03c0 / 2\n[PROOFSTEP]\nexact (sub_le_self _ Real.pi_pos.le).trans (Real.arcsin_le_pi_div_two _)\n[GOAL]\nz : \u2102\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 0 \u2264 z.re \u2228 0 \u2264 z.im\n[PROOFSTEP]\ncases' le_or_lt 0 (re z) with hre hre\n[GOAL]\ncase inl\nz : \u2102\nhre : 0 \u2264 z.re\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 0 \u2264 z.re \u2228 0 \u2264 z.im\n[PROOFSTEP]\nsimp only [hre, arg_of_re_nonneg hre, Real.neg_pi_div_two_le_arcsin, true_or_iff]\n[GOAL]\ncase inr\nz : \u2102\nhre : z.re < 0\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 0 \u2264 z.re \u2228 0 \u2264 z.im\n[PROOFSTEP]\nsimp only [hre.not_le, false_or_iff]\n[GOAL]\ncase inr\nz : \u2102\nhre : z.re < 0\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 0 \u2264 z.im\n[PROOFSTEP]\ncases' le_or_lt 0 (im z) with him him\n[GOAL]\ncase inr.inl\nz : \u2102\nhre : z.re < 0\nhim : 0 \u2264 z.im\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 0 \u2264 z.im\n[PROOFSTEP]\nsimp only [him]\n[GOAL]\ncase inr.inl\nz : \u2102\nhre : z.re < 0\nhim : 0 \u2264 z.im\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 True\n[PROOFSTEP]\nrw [iff_true_iff, arg_of_re_neg_of_im_nonneg hre him]\n[GOAL]\ncase inr.inl\nz : \u2102\nhre : z.re < 0\nhim : 0 \u2264 z.im\n\u22a2 -(\u03c0 / 2) \u2264 arcsin ((-z).im / \u2191abs z) + \u03c0\n[PROOFSTEP]\nexact (Real.neg_pi_div_two_le_arcsin _).trans (le_add_of_nonneg_right Real.pi_pos.le)\n[GOAL]\ncase inr.inr\nz : \u2102\nhre : z.re < 0\nhim : z.im < 0\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 0 \u2264 z.im\n[PROOFSTEP]\nsimp only [him.not_le]\n[GOAL]\ncase inr.inr\nz : \u2102\nhre : z.re < 0\nhim : z.im < 0\n\u22a2 -(\u03c0 / 2) \u2264 arg z \u2194 False\n[PROOFSTEP]\nrw [iff_false_iff, not_le, arg_of_re_neg_of_im_neg hre him, sub_lt_iff_lt_add', \u2190 sub_eq_add_neg, sub_half,\n  Real.arcsin_lt_pi_div_two, div_lt_one, neg_im, \u2190 abs_of_neg him, abs_im_lt_abs]\n[GOAL]\ncase inr.inr\nz : \u2102\nhre : z.re < 0\nhim : z.im < 0\n\u22a2 z.re \u2260 0\ncase inr.inr z : \u2102 hre : z.re < 0 him : z.im < 0 \u22a2 0 < \u2191abs z\n[PROOFSTEP]\nexacts [hre.ne, abs.pos <| ne_of_apply_ne re hre.ne]\n[GOAL]\nz : \u2102\n\u22a2 |arg z| \u2264 \u03c0 / 2 \u2194 0 \u2264 z.re\n[PROOFSTEP]\nrw [abs_le, arg_le_pi_div_two_iff, neg_pi_div_two_le_arg_iff, \u2190 or_and_left, \u2190 not_le, and_not_self_iff, or_false_iff]\n[GOAL]\nx : \u2102\n\u22a2 \u2191(arg (\u2191(starRingEnd \u2102) x)) = -\u2191(arg x)\n[PROOFSTEP]\nby_cases h : arg x = \u03c0\n[GOAL]\ncase pos\nx : \u2102\nh : arg x = \u03c0\n\u22a2 \u2191(arg (\u2191(starRingEnd \u2102) x)) = -\u2191(arg x)\n[PROOFSTEP]\nsimp [arg_conj, h]\n[GOAL]\ncase neg\nx : \u2102\nh : \u00acarg x = \u03c0\n\u22a2 \u2191(arg (\u2191(starRingEnd \u2102) x)) = -\u2191(arg x)\n[PROOFSTEP]\nsimp [arg_conj, h]\n[GOAL]\nx : \u2102\n\u22a2 \u2191(arg x\u207b\u00b9) = -\u2191(arg x)\n[PROOFSTEP]\nby_cases h : arg x = \u03c0\n[GOAL]\ncase pos\nx : \u2102\nh : arg x = \u03c0\n\u22a2 \u2191(arg x\u207b\u00b9) = -\u2191(arg x)\n[PROOFSTEP]\nsimp [arg_inv, h]\n[GOAL]\ncase neg\nx : \u2102\nh : \u00acarg x = \u03c0\n\u22a2 \u2191(arg x\u207b\u00b9) = -\u2191(arg x)\n[PROOFSTEP]\nsimp [arg_inv, h]\n[GOAL]\nx : \u2102\nhi : 0 < x.im\n\u22a2 arg (-x) = arg x - \u03c0\n[PROOFSTEP]\nrw [arg_of_im_pos hi, arg_of_im_neg (show (-x).im < 0 from Left.neg_neg_iff.2 hi)]\n[GOAL]\nx : \u2102\nhi : 0 < x.im\n\u22a2 -arccos ((-x).re / \u2191abs (-x)) = arccos (x.re / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsimp [neg_div, Real.arccos_neg]\n[GOAL]\nx : \u2102\nhi : x.im < 0\n\u22a2 arg (-x) = arg x + \u03c0\n[PROOFSTEP]\nrw [arg_of_im_neg hi, arg_of_im_pos (show 0 < (-x).im from Left.neg_pos_iff.2 hi)]\n[GOAL]\nx : \u2102\nhi : x.im < 0\n\u22a2 arccos ((-x).re / \u2191abs (-x)) = -arccos (x.re / \u2191abs x) + \u03c0\n[PROOFSTEP]\nsimp [neg_div, Real.arccos_neg, add_comm, \u2190 sub_eq_add_neg]\n[GOAL]\nx : \u2102\n\u22a2 arg (-x) = arg x - \u03c0 \u2194 0 < x.im \u2228 x.im = 0 \u2227 x.re < 0\n[PROOFSTEP]\nrcases lt_trichotomy x.im 0 with (hi | hi | hi)\n[GOAL]\ncase inl\nx : \u2102\nhi : x.im < 0\n\u22a2 arg (-x) = arg x - \u03c0 \u2194 0 < x.im \u2228 x.im = 0 \u2227 x.re < 0\n[PROOFSTEP]\nsimp [hi, hi.ne, hi.not_lt, arg_neg_eq_arg_add_pi_of_im_neg, sub_eq_add_neg, \u2190 add_eq_zero_iff_eq_neg, Real.pi_ne_zero]\n[GOAL]\ncase inr.inl\nx : \u2102\nhi : x.im = 0\n\u22a2 arg (-x) = arg x - \u03c0 \u2194 0 < x.im \u2228 x.im = 0 \u2227 x.re < 0\n[PROOFSTEP]\nrw [(ext rfl hi : x = x.re)]\n[GOAL]\ncase inr.inl\nx : \u2102\nhi : x.im = 0\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re - \u03c0 \u2194 0 < (\u2191x.re).im \u2228 (\u2191x.re).im = 0 \u2227 (\u2191x.re).re < 0\n[PROOFSTEP]\nrcases lt_trichotomy x.re 0 with (hr | hr | hr)\n[GOAL]\ncase inr.inl.inl\nx : \u2102\nhi : x.im = 0\nhr : x.re < 0\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re - \u03c0 \u2194 0 < (\u2191x.re).im \u2228 (\u2191x.re).im = 0 \u2227 (\u2191x.re).re < 0\n[PROOFSTEP]\nrw [arg_ofReal_of_neg hr, \u2190 ofReal_neg, arg_ofReal_of_nonneg (Left.neg_pos_iff.2 hr).le]\n[GOAL]\ncase inr.inl.inl\nx : \u2102\nhi : x.im = 0\nhr : x.re < 0\n\u22a2 0 = \u03c0 - \u03c0 \u2194 0 < (\u2191x.re).im \u2228 (\u2191x.re).im = 0 \u2227 (\u2191x.re).re < 0\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase inr.inl.inr.inl\nx : \u2102\nhi : x.im = 0\nhr : x.re = 0\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re - \u03c0 \u2194 0 < (\u2191x.re).im \u2228 (\u2191x.re).im = 0 \u2227 (\u2191x.re).re < 0\n[PROOFSTEP]\nsimp [hr, hi, Real.pi_ne_zero]\n[GOAL]\ncase inr.inl.inr.inr\nx : \u2102\nhi : x.im = 0\nhr : 0 < x.re\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re - \u03c0 \u2194 0 < (\u2191x.re).im \u2228 (\u2191x.re).im = 0 \u2227 (\u2191x.re).re < 0\n[PROOFSTEP]\nrw [arg_ofReal_of_nonneg hr.le, \u2190 ofReal_neg, arg_ofReal_of_neg (Left.neg_neg_iff.2 hr)]\n[GOAL]\ncase inr.inl.inr.inr\nx : \u2102\nhi : x.im = 0\nhr : 0 < x.re\n\u22a2 \u03c0 = 0 - \u03c0 \u2194 0 < (\u2191x.re).im \u2228 (\u2191x.re).im = 0 \u2227 (\u2191x.re).re < 0\n[PROOFSTEP]\nsimp [hr.not_lt, \u2190 add_eq_zero_iff_eq_neg, Real.pi_ne_zero]\n[GOAL]\ncase inr.inr\nx : \u2102\nhi : 0 < x.im\n\u22a2 arg (-x) = arg x - \u03c0 \u2194 0 < x.im \u2228 x.im = 0 \u2227 x.re < 0\n[PROOFSTEP]\nsimp [hi, arg_neg_eq_arg_sub_pi_of_im_pos]\n[GOAL]\nx : \u2102\n\u22a2 arg (-x) = arg x + \u03c0 \u2194 x.im < 0 \u2228 x.im = 0 \u2227 0 < x.re\n[PROOFSTEP]\nrcases lt_trichotomy x.im 0 with (hi | hi | hi)\n[GOAL]\ncase inl\nx : \u2102\nhi : x.im < 0\n\u22a2 arg (-x) = arg x + \u03c0 \u2194 x.im < 0 \u2228 x.im = 0 \u2227 0 < x.re\n[PROOFSTEP]\nsimp [hi, arg_neg_eq_arg_add_pi_of_im_neg]\n[GOAL]\ncase inr.inl\nx : \u2102\nhi : x.im = 0\n\u22a2 arg (-x) = arg x + \u03c0 \u2194 x.im < 0 \u2228 x.im = 0 \u2227 0 < x.re\n[PROOFSTEP]\nrw [(ext rfl hi : x = x.re)]\n[GOAL]\ncase inr.inl\nx : \u2102\nhi : x.im = 0\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re + \u03c0 \u2194 (\u2191x.re).im < 0 \u2228 (\u2191x.re).im = 0 \u2227 0 < (\u2191x.re).re\n[PROOFSTEP]\nrcases lt_trichotomy x.re 0 with (hr | hr | hr)\n[GOAL]\ncase inr.inl.inl\nx : \u2102\nhi : x.im = 0\nhr : x.re < 0\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re + \u03c0 \u2194 (\u2191x.re).im < 0 \u2228 (\u2191x.re).im = 0 \u2227 0 < (\u2191x.re).re\n[PROOFSTEP]\nrw [arg_ofReal_of_neg hr, \u2190 ofReal_neg, arg_ofReal_of_nonneg (Left.neg_pos_iff.2 hr).le]\n[GOAL]\ncase inr.inl.inl\nx : \u2102\nhi : x.im = 0\nhr : x.re < 0\n\u22a2 0 = \u03c0 + \u03c0 \u2194 (\u2191x.re).im < 0 \u2228 (\u2191x.re).im = 0 \u2227 0 < (\u2191x.re).re\n[PROOFSTEP]\nsimp [hr.not_lt, \u2190 two_mul, Real.pi_ne_zero]\n[GOAL]\ncase inr.inl.inr.inl\nx : \u2102\nhi : x.im = 0\nhr : x.re = 0\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re + \u03c0 \u2194 (\u2191x.re).im < 0 \u2228 (\u2191x.re).im = 0 \u2227 0 < (\u2191x.re).re\n[PROOFSTEP]\nsimp [hr, hi, Real.pi_ne_zero.symm]\n[GOAL]\ncase inr.inl.inr.inr\nx : \u2102\nhi : x.im = 0\nhr : 0 < x.re\n\u22a2 arg (-\u2191x.re) = arg \u2191x.re + \u03c0 \u2194 (\u2191x.re).im < 0 \u2228 (\u2191x.re).im = 0 \u2227 0 < (\u2191x.re).re\n[PROOFSTEP]\nrw [arg_ofReal_of_nonneg hr.le, \u2190 ofReal_neg, arg_ofReal_of_neg (Left.neg_neg_iff.2 hr)]\n[GOAL]\ncase inr.inl.inr.inr\nx : \u2102\nhi : x.im = 0\nhr : 0 < x.re\n\u22a2 \u03c0 = 0 + \u03c0 \u2194 (\u2191x.re).im < 0 \u2228 (\u2191x.re).im = 0 \u2227 0 < (\u2191x.re).re\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase inr.inr\nx : \u2102\nhi : 0 < x.im\n\u22a2 arg (-x) = arg x + \u03c0 \u2194 x.im < 0 \u2228 x.im = 0 \u2227 0 < x.re\n[PROOFSTEP]\nsimp [hi, hi.ne.symm, hi.not_lt, arg_neg_eq_arg_sub_pi_of_im_pos, sub_eq_add_neg, \u2190 add_eq_zero_iff_neg_eq,\n  Real.pi_ne_zero]\n[GOAL]\nx : \u2102\nhx : x \u2260 0\n\u22a2 \u2191(arg (-x)) = \u2191(arg x) + \u2191\u03c0\n[PROOFSTEP]\nrcases lt_trichotomy x.im 0 with (hi | hi | hi)\n[GOAL]\ncase inl\nx : \u2102\nhx : x \u2260 0\nhi : x.im < 0\n\u22a2 \u2191(arg (-x)) = \u2191(arg x) + \u2191\u03c0\n[PROOFSTEP]\nrw [arg_neg_eq_arg_add_pi_of_im_neg hi, Real.Angle.coe_add]\n[GOAL]\ncase inr.inl\nx : \u2102\nhx : x \u2260 0\nhi : x.im = 0\n\u22a2 \u2191(arg (-x)) = \u2191(arg x) + \u2191\u03c0\n[PROOFSTEP]\nrw [(ext rfl hi : x = x.re)]\n[GOAL]\ncase inr.inl\nx : \u2102\nhx : x \u2260 0\nhi : x.im = 0\n\u22a2 \u2191(arg (-\u2191x.re)) = \u2191(arg \u2191x.re) + \u2191\u03c0\n[PROOFSTEP]\nrcases lt_trichotomy x.re 0 with (hr | hr | hr)\n[GOAL]\ncase inr.inl.inl\nx : \u2102\nhx : x \u2260 0\nhi : x.im = 0\nhr : x.re < 0\n\u22a2 \u2191(arg (-\u2191x.re)) = \u2191(arg \u2191x.re) + \u2191\u03c0\n[PROOFSTEP]\nrw [arg_ofReal_of_neg hr, \u2190 ofReal_neg, arg_ofReal_of_nonneg (Left.neg_pos_iff.2 hr).le, \u2190 Real.Angle.coe_add, \u2190\n  two_mul, Real.Angle.coe_two_pi, Real.Angle.coe_zero]\n[GOAL]\ncase inr.inl.inr.inl\nx : \u2102\nhx : x \u2260 0\nhi : x.im = 0\nhr : x.re = 0\n\u22a2 \u2191(arg (-\u2191x.re)) = \u2191(arg \u2191x.re) + \u2191\u03c0\n[PROOFSTEP]\nexact False.elim (hx (ext hr hi))\n[GOAL]\ncase inr.inl.inr.inr\nx : \u2102\nhx : x \u2260 0\nhi : x.im = 0\nhr : 0 < x.re\n\u22a2 \u2191(arg (-\u2191x.re)) = \u2191(arg \u2191x.re) + \u2191\u03c0\n[PROOFSTEP]\nrw [arg_ofReal_of_nonneg hr.le, \u2190 ofReal_neg, arg_ofReal_of_neg (Left.neg_neg_iff.2 hr), Real.Angle.coe_zero, zero_add]\n[GOAL]\ncase inr.inr\nx : \u2102\nhx : x \u2260 0\nhi : 0 < x.im\n\u22a2 \u2191(arg (-x)) = \u2191(arg x) + \u2191\u03c0\n[PROOFSTEP]\nrw [arg_neg_eq_arg_sub_pi_of_im_pos hi, Real.Angle.coe_sub, Real.Angle.sub_coe_pi_eq_add_coe_pi]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 arg (\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I)) = toIocMod two_pi_pos (-\u03c0) \u03b8\n[PROOFSTEP]\nhave hi : toIocMod Real.two_pi_pos (-\u03c0) \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0 :=\n  by\n  convert toIocMod_mem_Ioc _ _ \u03b8\n  ring\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 toIocMod two_pi_pos (-\u03c0) \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nconvert toIocMod_mem_Ioc _ _ \u03b8\n[GOAL]\ncase h.e'_5.h.e'_4\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 \u03c0 = -\u03c0 + 2 * \u03c0\n[PROOFSTEP]\nring\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nhi : toIocMod two_pi_pos (-\u03c0) \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 arg (\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I)) = toIocMod two_pi_pos (-\u03c0) \u03b8\n[PROOFSTEP]\nconvert arg_mul_cos_add_sin_mul_I hr hi using 3\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_6\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\nhi : toIocMod two_pi_pos (-\u03c0) \u03b8 \u2208 Set.Ioc (-\u03c0) \u03c0\n\u22a2 cos \u2191\u03b8 + sin \u2191\u03b8 * I = cos \u2191(toIocMod two_pi_pos (-\u03c0) \u03b8) + sin \u2191(toIocMod two_pi_pos (-\u03c0) \u03b8) * I\n[PROOFSTEP]\nsimp [toIocMod, cos_sub_int_mul_two_pi, sin_sub_int_mul_two_pi]\n[GOAL]\n\u03b8 : \u211d\n\u22a2 arg (cos \u2191\u03b8 + sin \u2191\u03b8 * I) = toIocMod two_pi_pos (-\u03c0) \u03b8\n[PROOFSTEP]\nrw [\u2190 one_mul (_ + _), \u2190 ofReal_one, arg_mul_cos_add_sin_mul_I_eq_toIocMod zero_lt_one]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 arg (\u2191r * (cos \u2191\u03b8 + sin \u2191\u03b8 * I)) - \u03b8 = 2 * \u03c0 * \u2191\u230a(\u03c0 - \u03b8) / (2 * \u03c0)\u230b\n[PROOFSTEP]\nrw [arg_mul_cos_add_sin_mul_I_eq_toIocMod hr, toIocMod_sub_self, toIocDiv_eq_neg_floor, zsmul_eq_mul]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 \u2191(- -\u230a(-\u03c0 + 2 * \u03c0 - \u03b8) / (2 * \u03c0)\u230b) * (2 * \u03c0) = 2 * \u03c0 * \u2191\u230a(\u03c0 - \u03b8) / (2 * \u03c0)\u230b\n[PROOFSTEP]\nring_nf\n[GOAL]\n\u03b8 : \u211d\n\u22a2 arg (cos \u2191\u03b8 + sin \u2191\u03b8 * I) - \u03b8 = 2 * \u03c0 * \u2191\u230a(\u03c0 - \u03b8) / (2 * \u03c0)\u230b\n[PROOFSTEP]\nrw [\u2190 one_mul (_ + _), \u2190 ofReal_one, arg_mul_cos_add_sin_mul_I_sub zero_lt_one]\n[GOAL]\nr : \u211d\nhr : 0 < r\n\u03b8 : Angle\n\u22a2 \u2191(arg (\u2191r * (\u2191(Angle.cos \u03b8) + \u2191(Angle.sin \u03b8) * I))) = \u03b8\n[PROOFSTEP]\ninduction' \u03b8 using Real.Angle.induction_on with \u03b8\n[GOAL]\ncase h\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 \u2191(arg (\u2191r * (\u2191(Angle.cos \u2191\u03b8) + \u2191(Angle.sin \u2191\u03b8) * I))) = \u2191\u03b8\n[PROOFSTEP]\nrw [Real.Angle.cos_coe, Real.Angle.sin_coe, Real.Angle.angle_eq_iff_two_pi_dvd_sub]\n[GOAL]\ncase h\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 \u2203 k, arg (\u2191r * (\u2191(Real.cos \u03b8) + \u2191(Real.sin \u03b8) * I)) - \u03b8 = 2 * \u03c0 * \u2191k\n[PROOFSTEP]\nuse\u230a(\u03c0 - \u03b8) / (2 * \u03c0)\u230b\n[GOAL]\ncase h\nr : \u211d\nhr : 0 < r\n\u03b8 : \u211d\n\u22a2 arg (\u2191r * (\u2191(Real.cos \u03b8) + \u2191(Real.sin \u03b8) * I)) - \u03b8 = 2 * \u03c0 * \u2191\u230a(\u03c0 - \u03b8) / (2 * \u03c0)\u230b\n[PROOFSTEP]\nexact_mod_cast arg_mul_cos_add_sin_mul_I_sub hr \u03b8\n[GOAL]\n\u03b8 : Angle\n\u22a2 \u2191(arg (\u2191(Angle.cos \u03b8) + \u2191(Angle.sin \u03b8) * I)) = \u03b8\n[PROOFSTEP]\nrw [\u2190 one_mul (_ + _), \u2190 ofReal_one, arg_mul_cos_add_sin_mul_I_coe_angle zero_lt_one]\n[GOAL]\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 \u2191(arg (x * y)) = \u2191(arg x) + \u2191(arg y)\n[PROOFSTEP]\nconvert arg_mul_cos_add_sin_mul_I_coe_angle (mul_pos (abs.pos hx) (abs.pos hy)) (arg x + arg y : Real.Angle) using 3\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_1\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 x * y = \u2191(\u2191abs x * \u2191abs y) * (\u2191(Angle.cos (\u2191(arg x) + \u2191(arg y))) + \u2191(Angle.sin (\u2191(arg x) + \u2191(arg y))) * I)\n[PROOFSTEP]\nsimp_rw [\u2190 Real.Angle.coe_add, Real.Angle.sin_coe, Real.Angle.cos_coe, ofReal_cos, ofReal_sin, cos_add_sin_I,\n  ofReal_add, add_mul, exp_add, ofReal_mul]\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_1\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 x * y = \u2191(\u2191abs x) * \u2191(\u2191abs y) * (exp (\u2191(arg x) * I) * exp (\u2191(arg y) * I))\n[PROOFSTEP]\nrw [mul_assoc, mul_comm (exp _), \u2190 mul_assoc (abs y : \u2102), abs_mul_exp_arg_mul_I, mul_comm y, \u2190 mul_assoc,\n  abs_mul_exp_arg_mul_I]\n[GOAL]\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 \u2191(arg (x / y)) = \u2191(arg x) - \u2191(arg y)\n[PROOFSTEP]\nrw [div_eq_mul_inv, arg_mul_coe_angle hx (inv_ne_zero hy), arg_inv_coe_angle, sub_eq_add_neg]\n[GOAL]\nz : \u2102\n\u22a2 Angle.toReal \u2191(arg z) = arg z\n[PROOFSTEP]\nrw [Real.Angle.toReal_coe_eq_self_iff_mem_Ioc]\n[GOAL]\nz : \u2102\n\u22a2 arg z \u2208 Set.Ioc (-\u03c0) \u03c0\n[PROOFSTEP]\nexact arg_mem_Ioc _\n[GOAL]\nz : \u2102\n\u03b8 : Angle\n\u22a2 \u2191(arg z) = \u03b8 \u2194 arg z = Angle.toReal \u03b8\n[PROOFSTEP]\nrw [\u2190 Real.Angle.toReal_inj, arg_coe_angle_toReal_eq_arg]\n[GOAL]\nx y : \u2102\n\u22a2 \u2191(arg x) = \u2191(arg y) \u2194 arg x = arg y\n[PROOFSTEP]\nsimp_rw [\u2190 Real.Angle.toReal_inj, arg_coe_angle_toReal_eq_arg]\n[GOAL]\nx z : \u2102\nhx_re : x.re < 0\nhx_im : 0 < x.im\n\u22a2 arg =\u1da0[\ud835\udcdd x] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n[PROOFSTEP]\nsuffices h_forall_nhds : \u2200\u1da0 y : \u2102 in \ud835\udcdd x, y.re < 0 \u2227 0 < y.im\n[GOAL]\nx z : \u2102\nhx_re : x.re < 0\nhx_im : 0 < x.im\nh_forall_nhds : \u2200\u1da0 (y : \u2102) in \ud835\udcdd x, y.re < 0 \u2227 0 < y.im\n\u22a2 arg =\u1da0[\ud835\udcdd x] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\ncase h_forall_nhds x z : \u2102 hx_re : x.re < 0 hx_im : 0 < x.im \u22a2 \u2200\u1da0 (y : \u2102) in \ud835\udcdd x, y.re < 0 \u2227 0 < y.im\n[PROOFSTEP]\nexact h_forall_nhds.mono fun y hy => arg_of_re_neg_of_im_nonneg hy.1 hy.2.le\n[GOAL]\ncase h_forall_nhds\nx z : \u2102\nhx_re : x.re < 0\nhx_im : 0 < x.im\n\u22a2 \u2200\u1da0 (y : \u2102) in \ud835\udcdd x, y.re < 0 \u2227 0 < y.im\n[PROOFSTEP]\nrefine' IsOpen.eventually_mem _ (\u27e8hx_re, hx_im\u27e9 : x.re < 0 \u2227 0 < x.im)\n[GOAL]\ncase h_forall_nhds\nx z : \u2102\nhx_re : x.re < 0\nhx_im : 0 < x.im\n\u22a2 IsOpen fun y => y.re < 0 \u2227 0 < y.im\n[PROOFSTEP]\nexact IsOpen.and (isOpen_lt continuous_re continuous_zero) (isOpen_lt continuous_zero continuous_im)\n[GOAL]\nx z : \u2102\nhx_re : x.re < 0\nhx_im : x.im < 0\n\u22a2 arg =\u1da0[\ud835\udcdd x] fun x => arcsin ((-x).im / \u2191abs x) - \u03c0\n[PROOFSTEP]\nsuffices h_forall_nhds : \u2200\u1da0 y : \u2102 in \ud835\udcdd x, y.re < 0 \u2227 y.im < 0\n[GOAL]\nx z : \u2102\nhx_re : x.re < 0\nhx_im : x.im < 0\nh_forall_nhds : \u2200\u1da0 (y : \u2102) in \ud835\udcdd x, y.re < 0 \u2227 y.im < 0\n\u22a2 arg =\u1da0[\ud835\udcdd x] fun x => arcsin ((-x).im / \u2191abs x) - \u03c0\ncase h_forall_nhds x z : \u2102 hx_re : x.re < 0 hx_im : x.im < 0 \u22a2 \u2200\u1da0 (y : \u2102) in \ud835\udcdd x, y.re < 0 \u2227 y.im < 0\n[PROOFSTEP]\nexact h_forall_nhds.mono fun y hy => arg_of_re_neg_of_im_neg hy.1 hy.2\n[GOAL]\ncase h_forall_nhds\nx z : \u2102\nhx_re : x.re < 0\nhx_im : x.im < 0\n\u22a2 \u2200\u1da0 (y : \u2102) in \ud835\udcdd x, y.re < 0 \u2227 y.im < 0\n[PROOFSTEP]\nrefine' IsOpen.eventually_mem _ (\u27e8hx_re, hx_im\u27e9 : x.re < 0 \u2227 x.im < 0)\n[GOAL]\ncase h_forall_nhds\nx z : \u2102\nhx_re : x.re < 0\nhx_im : x.im < 0\n\u22a2 IsOpen fun y => y.re < 0 \u2227 y.im < 0\n[PROOFSTEP]\nexact IsOpen.and (isOpen_lt continuous_re continuous_zero) (isOpen_lt continuous_im continuous_zero)\n[GOAL]\nx z : \u2102\nh : 0 < x.re \u2228 x.im \u2260 0\n\u22a2 ContinuousAt arg x\n[PROOFSTEP]\nhave h\u2080 : abs x \u2260 0 := by\n  rw [abs.ne_zero_iff]\n  rintro rfl\n  simp at h \n[GOAL]\nx z : \u2102\nh : 0 < x.re \u2228 x.im \u2260 0\n\u22a2 \u2191abs x \u2260 0\n[PROOFSTEP]\nrw [abs.ne_zero_iff]\n[GOAL]\nx z : \u2102\nh : 0 < x.re \u2228 x.im \u2260 0\n\u22a2 x \u2260 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nz : \u2102\nh : 0 < 0.re \u2228 0.im \u2260 0\n\u22a2 False\n[PROOFSTEP]\nsimp at h \n[GOAL]\nx z : \u2102\nh : 0 < x.re \u2228 x.im \u2260 0\nh\u2080 : \u2191abs x \u2260 0\n\u22a2 ContinuousAt arg x\n[PROOFSTEP]\nrw [\u2190 lt_or_lt_iff_ne] at h \n[GOAL]\nx z : \u2102\nh\u271d : 0 < x.re \u2228 x.im \u2260 0\nh : 0 < x.re \u2228 x.im < 0 \u2228 0 < x.im\nh\u2080 : \u2191abs x \u2260 0\n\u22a2 ContinuousAt arg x\n[PROOFSTEP]\nrcases h with (hx_re | hx_im | hx_im)\n[GOAL]\ncase inl\nx z : \u2102\nh : 0 < x.re \u2228 x.im \u2260 0\nh\u2080 : \u2191abs x \u2260 0\nhx_re : 0 < x.re\n\u22a2 ContinuousAt arg x\ncase inr.inl\nx z : \u2102\nh : 0 < x.re \u2228 x.im \u2260 0\nh\u2080 : \u2191abs x \u2260 0\nhx_im : x.im < 0\n\u22a2 ContinuousAt arg x\ncase inr.inr x z : \u2102 h : 0 < x.re \u2228 x.im \u2260 0 h\u2080 : \u2191abs x \u2260 0 hx_im : 0 < x.im \u22a2 ContinuousAt arg x\n[PROOFSTEP]\nexacts\n  [(Real.continuousAt_arcsin.comp (continuous_im.continuousAt.div continuous_abs.continuousAt h\u2080)).congr\n    (arg_eq_nhds_of_re_pos hx_re).symm,\n  (Real.continuous_arccos.continuousAt.comp (continuous_re.continuousAt.div continuous_abs.continuousAt h\u2080)).neg.congr\n    (arg_eq_nhds_of_im_neg hx_im).symm,\n  (Real.continuous_arccos.continuousAt.comp (continuous_re.continuousAt.div continuous_abs.continuousAt h\u2080)).congr\n    (arg_eq_nhds_of_im_pos hx_im).symm]\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\n\u22a2 Tendsto arg (\ud835\udcdd[{z | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\n[PROOFSTEP]\nsuffices H : Tendsto (fun x : \u2102 => Real.arcsin ((-x).im / abs x) - \u03c0) (\ud835\udcdd[{z : \u2102 | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nH : Tendsto (fun x => arcsin ((-x).im / \u2191abs x) - \u03c0) (\ud835\udcdd[{z | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\n\u22a2 Tendsto arg (\ud835\udcdd[{z | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\n[PROOFSTEP]\nrefine' H.congr' _\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nH : Tendsto (fun x => arcsin ((-x).im / \u2191abs x) - \u03c0) (\ud835\udcdd[{z | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\n\u22a2 (fun x => arcsin ((-x).im / \u2191abs x) - \u03c0) =\u1da0[\ud835\udcdd[{z | z.im < 0}] z] arg\n[PROOFSTEP]\nhave : \u2200\u1da0 x : \u2102 in \ud835\udcdd z, x.re < 0 :=\n  continuous_re.tendsto z\n    (gt_mem_nhds hre)\n      -- Porting note: need to specify the `nhdsWithin` set\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nH : Tendsto (fun x => arcsin ((-x).im / \u2191abs x) - \u03c0) (\ud835\udcdd[{z | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\nthis : \u2200\u1da0 (x : \u2102) in \ud835\udcdd z, x.re < 0\n\u22a2 (fun x => arcsin ((-x).im / \u2191abs x) - \u03c0) =\u1da0[\ud835\udcdd[{z | z.im < 0}] z] arg\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin (s := {z : \u2102 | z.im < 0}), mem_nhdsWithin_of_mem_nhds this] with _ him hre\n[GOAL]\ncase h\nx z\u271d z : \u2102\nhre\u271d : z.re < 0\nhim\u271d : z.im = 0\nH : Tendsto (fun x => arcsin ((-x).im / \u2191abs x) - \u03c0) (\ud835\udcdd[{z | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\nthis : \u2200\u1da0 (x : \u2102) in \ud835\udcdd z, x.re < 0\na\u271d : \u2102\nhim : a\u271d.im < 0\nhre : a\u271d.re < 0\n\u22a2 arcsin ((-a\u271d).im / \u2191abs a\u271d) - \u03c0 = arg a\u271d\n[PROOFSTEP]\nrw [arg, if_neg hre.not_le, if_neg him.not_le]\n[GOAL]\ncase H\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\n\u22a2 Tendsto (fun x => arcsin ((-x).im / \u2191abs x) - \u03c0) (\ud835\udcdd[{z | z.im < 0}] z) (\ud835\udcdd (-\u03c0))\n[PROOFSTEP]\nconvert\n  (Real.continuousAt_arcsin.comp_continuousWithinAt\n        ((continuous_im.continuousAt.comp_continuousWithinAt continuousWithinAt_neg).div\n          continuous_abs.continuousWithinAt (s := {z : \u2102 | z.im < 0}) (_ : abs z \u2260 0))\n          -- Porting note: specify constant precisely to assist in goal below).sub_const\n    \u03c0 using\n  1\n[GOAL]\ncase h.e'_5\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\n\u22a2 \ud835\udcdd (-\u03c0) = \ud835\udcdd ((arcsin \u2218 (im \u2218 Neg.neg / \u2191abs)) z - \u03c0)\n[PROOFSTEP]\nsimp [him]\n[GOAL]\ncase H\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\n\u22a2 \u2191abs z \u2260 0\n[PROOFSTEP]\nlift z to \u211d using him\n[GOAL]\ncase H.intro\nx z\u271d : \u2102\nz : \u211d\nhre : (\u2191z).re < 0\n\u22a2 \u2191abs \u2191z \u2260 0\n[PROOFSTEP]\nsimpa using hre.ne\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\n\u22a2 ContinuousWithinAt arg {z | 0 \u2264 z.im} z\n[PROOFSTEP]\nhave : arg =\u1da0[\ud835\udcdd[{z : \u2102 | 0 \u2264 z.im}] z] fun x => Real.arcsin ((-x).im / abs x) + \u03c0 :=\n  by\n  have : \u2200\u1da0 x : \u2102 in \ud835\udcdd z, x.re < 0 := continuous_re.tendsto z (gt_mem_nhds hre)\n  filter_upwards [self_mem_nhdsWithin (s := {z : \u2102 | 0 \u2264 z.im}), mem_nhdsWithin_of_mem_nhds this] with _ him hre\n  rw [arg, if_neg hre.not_le, if_pos him]\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\n\u22a2 arg =\u1da0[\ud835\udcdd[{z | 0 \u2264 z.im}] z] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n[PROOFSTEP]\nhave : \u2200\u1da0 x : \u2102 in \ud835\udcdd z, x.re < 0 := continuous_re.tendsto z (gt_mem_nhds hre)\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nthis : \u2200\u1da0 (x : \u2102) in \ud835\udcdd z, x.re < 0\n\u22a2 arg =\u1da0[\ud835\udcdd[{z | 0 \u2264 z.im}] z] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin (s := {z : \u2102 | 0 \u2264 z.im}), mem_nhdsWithin_of_mem_nhds this] with _ him hre\n[GOAL]\ncase h\nx z\u271d z : \u2102\nhre\u271d : z.re < 0\nhim\u271d : z.im = 0\nthis : \u2200\u1da0 (x : \u2102) in \ud835\udcdd z, x.re < 0\na\u271d : \u2102\nhim : 0 \u2264 a\u271d.im\nhre : a\u271d.re < 0\n\u22a2 arg a\u271d = arcsin ((-a\u271d).im / \u2191abs a\u271d) + \u03c0\n[PROOFSTEP]\nrw [arg, if_neg hre.not_le, if_pos him]\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nthis : arg =\u1da0[\ud835\udcdd[{z | 0 \u2264 z.im}] z] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n\u22a2 ContinuousWithinAt arg {z | 0 \u2264 z.im} z\n[PROOFSTEP]\nrefine' ContinuousWithinAt.congr_of_eventuallyEq _ this _\n[GOAL]\ncase refine'_1\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nthis : arg =\u1da0[\ud835\udcdd[{z | 0 \u2264 z.im}] z] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n\u22a2 ContinuousWithinAt (fun x => arcsin ((-x).im / \u2191abs x) + \u03c0) {z | 0 \u2264 z.im} z\n[PROOFSTEP]\nrefine'\n  (Real.continuousAt_arcsin.comp_continuousWithinAt\n        ((continuous_im.continuousAt.comp_continuousWithinAt continuousWithinAt_neg).div\n          continuous_abs.continuousWithinAt _)).add\n    tendsto_const_nhds\n[GOAL]\ncase refine'_1\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nthis : arg =\u1da0[\ud835\udcdd[{z | 0 \u2264 z.im}] z] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n\u22a2 \u2191abs z \u2260 0\n[PROOFSTEP]\nlift z to \u211d using him\n[GOAL]\ncase refine'_1.intro\nx z\u271d : \u2102\nz : \u211d\nhre : (\u2191z).re < 0\nthis : arg =\u1da0[\ud835\udcdd[{z | 0 \u2264 z.im}] \u2191z] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n\u22a2 \u2191abs \u2191z \u2260 0\n[PROOFSTEP]\nsimpa using hre.ne\n[GOAL]\ncase refine'_2\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\nthis : arg =\u1da0[\ud835\udcdd[{z | 0 \u2264 z.im}] z] fun x => arcsin ((-x).im / \u2191abs x) + \u03c0\n\u22a2 arg z = arcsin ((-z).im / \u2191abs z) + \u03c0\n[PROOFSTEP]\nrw [arg, if_neg hre.not_le, if_pos him.ge]\n[GOAL]\nx z\u271d z : \u2102\nhre : z.re < 0\nhim : z.im = 0\n\u22a2 Tendsto arg (\ud835\udcdd[{z | 0 \u2264 z.im}] z) (\ud835\udcdd \u03c0)\n[PROOFSTEP]\nsimpa only [arg_eq_pi_iff.2 \u27e8hre, him\u27e9] using (continuousWithinAt_arg_of_re_neg_of_im_zero hre him).tendsto\n[GOAL]\nx z : \u2102\nh : x \u2260 0\n\u22a2 ContinuousAt (Angle.coe \u2218 arg) x\n[PROOFSTEP]\nby_cases hs : 0 < x.re \u2228 x.im \u2260 0\n[GOAL]\ncase pos\nx z : \u2102\nh : x \u2260 0\nhs : 0 < x.re \u2228 x.im \u2260 0\n\u22a2 ContinuousAt (Angle.coe \u2218 arg) x\n[PROOFSTEP]\nexact Real.Angle.continuous_coe.continuousAt.comp (continuousAt_arg hs)\n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\n\u22a2 ContinuousAt (Angle.coe \u2218 arg) x\n[PROOFSTEP]\nrw [\u2190 Function.comp.right_id (((\u2191) : \u211d \u2192 Real.Angle) \u2218 arg),\n  (Function.funext_iff.2 fun _ => (neg_neg _).symm : (id : \u2102 \u2192 \u2102) = Neg.neg \u2218 Neg.neg), \u2190 Function.comp.assoc]\n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\n\u22a2 ContinuousAt (((Angle.coe \u2218 arg) \u2218 Neg.neg) \u2218 Neg.neg) x\n[PROOFSTEP]\nrefine' ContinuousAt.comp _ continuous_neg.continuousAt\n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\n\u22a2 ContinuousAt ((Angle.coe \u2218 arg) \u2218 Neg.neg) (-x)\n[PROOFSTEP]\nsuffices ContinuousAt (Function.update (((\u2191) \u2218 arg) \u2218 Neg.neg : \u2102 \u2192 Real.Angle) 0 \u03c0) (-x) by\n  rwa [continuousAt_update_of_ne (neg_ne_zero.2 h)] at this \n[GOAL]\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\nthis : ContinuousAt (Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0) (-x)\n\u22a2 ContinuousAt ((Angle.coe \u2218 arg) \u2218 Neg.neg) (-x)\n[PROOFSTEP]\nrwa [continuousAt_update_of_ne (neg_ne_zero.2 h)] at this \n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\n\u22a2 ContinuousAt (Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0) (-x)\n[PROOFSTEP]\nhave ha : Function.update (((\u2191) \u2218 arg) \u2218 Neg.neg : \u2102 \u2192 Real.Angle) 0 \u03c0 = fun z => (arg z : Real.Angle) + \u03c0 :=\n  by\n  rw [Function.update_eq_iff]\n  exact \u27e8by simp, fun z hz => arg_neg_coe_angle hz\u27e9\n[GOAL]\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\n\u22a2 Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0 = fun z => \u2191(arg z) + \u2191\u03c0\n[PROOFSTEP]\nrw [Function.update_eq_iff]\n[GOAL]\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\n\u22a2 \u2191\u03c0 = \u2191(arg 0) + \u2191\u03c0 \u2227 \u2200 (x : \u2102), x \u2260 0 \u2192 ((Angle.coe \u2218 arg) \u2218 Neg.neg) x = \u2191(arg x) + \u2191\u03c0\n[PROOFSTEP]\nexact \u27e8by simp, fun z hz => arg_neg_coe_angle hz\u27e9\n[GOAL]\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\n\u22a2 \u2191\u03c0 = \u2191(arg 0) + \u2191\u03c0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\nha : Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0 = fun z => \u2191(arg z) + \u2191\u03c0\n\u22a2 ContinuousAt (Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0) (-x)\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nhs : \u00ac(0 < x.re \u2228 x.im \u2260 0)\nha : Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0 = fun z => \u2191(arg z) + \u2191\u03c0\n\u22a2 ContinuousAt (fun z => \u2191(arg z) + \u2191\u03c0) (-x)\n[PROOFSTEP]\npush_neg at hs \n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nha : Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0 = fun z => \u2191(arg z) + \u2191\u03c0\nhs : x.re \u2264 0 \u2227 x.im = 0\n\u22a2 ContinuousAt (fun z => \u2191(arg z) + \u2191\u03c0) (-x)\n[PROOFSTEP]\nrefine' (Real.Angle.continuous_coe.continuousAt.comp (continuousAt_arg (Or.inl _))).add continuousAt_const\n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nha : Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0 = fun z => \u2191(arg z) + \u2191\u03c0\nhs : x.re \u2264 0 \u2227 x.im = 0\n\u22a2 0 < (-x).re\n[PROOFSTEP]\nrw [neg_re, neg_pos]\n[GOAL]\ncase neg\nx z : \u2102\nh : x \u2260 0\nha : Function.update ((Angle.coe \u2218 arg) \u2218 Neg.neg) 0 \u2191\u03c0 = fun z => \u2191(arg z) + \u2191\u03c0\nhs : x.re \u2264 0 \u2227 x.im = 0\n\u22a2 x.re < 0\n[PROOFSTEP]\nexact hs.1.lt_of_ne fun h0 => h (ext_iff.2 \u27e8h0, hs.2\u27e9)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Complex.Arg", "llama_tokens": 31299, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8933094117351309, "lm_q2_score": 0.7690802264851918, "lm_q1q2_score": 0.6870266046986079}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ns : Finset \u03b1\nf : \u03b1 \u2192 \u2115\n\u22a2 \u220f i in s, (f i)! \u2223 (\u2211 i in s, f i)!\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction with a' s' has ih\n\u00b7 simp only [Finset.sum_empty, Finset.prod_empty, factorial]\n\u00b7 simp only [Finset.prod_insert has, Finset.sum_insert has]\n  refine' dvd_trans (mul_dvd_mul_left (f a')! ih) _\n  apply Nat.factorial_mul_factorial_dvd_factorial_add\n[GOAL]\n\u03b1 : Type u_1\ns : Finset \u03b1\nf : \u03b1 \u2192 \u2115\n\u22a2 \u220f i in s, (f i)! \u2223 (\u2211 i in s, f i)!\n[PROOFSTEP]\ninduction' s using Finset.induction with a' s' has ih\n[GOAL]\ncase empty\n\u03b1 : Type u_1\ns : Finset \u03b1\nf : \u03b1 \u2192 \u2115\n\u22a2 \u220f i in \u2205, (f i)! \u2223 (\u2211 i in \u2205, f i)!\n[PROOFSTEP]\nsimp only [Finset.sum_empty, Finset.prod_empty, factorial]\n[GOAL]\ncase insert\n\u03b1 : Type u_1\ns : Finset \u03b1\nf : \u03b1 \u2192 \u2115\na' : \u03b1\ns' : Finset \u03b1\nhas : \u00aca' \u2208 s'\nih : \u220f i in s', (f i)! \u2223 (\u2211 i in s', f i)!\n\u22a2 \u220f i in insert a' s', (f i)! \u2223 (\u2211 i in insert a' s', f i)!\n[PROOFSTEP]\nsimp only [Finset.prod_insert has, Finset.sum_insert has]\n[GOAL]\ncase insert\n\u03b1 : Type u_1\ns : Finset \u03b1\nf : \u03b1 \u2192 \u2115\na' : \u03b1\ns' : Finset \u03b1\nhas : \u00aca' \u2208 s'\nih : \u220f i in s', (f i)! \u2223 (\u2211 i in s', f i)!\n\u22a2 (f a')! * \u220f i in s', (f i)! \u2223 (f a' + \u2211 i in s', f i)!\n[PROOFSTEP]\nrefine' dvd_trans (mul_dvd_mul_left (f a')! ih) _\n[GOAL]\ncase insert\n\u03b1 : Type u_1\ns : Finset \u03b1\nf : \u03b1 \u2192 \u2115\na' : \u03b1\ns' : Finset \u03b1\nhas : \u00aca' \u2208 s'\nih : \u220f i in s', (f i)! \u2223 (\u2211 i in s', f i)!\n\u22a2 (f a')! * (\u2211 i in s', f i)! \u2223 (f a' + \u2211 i in s', f i)!\n[PROOFSTEP]\napply Nat.factorial_mul_factorial_dvd_factorial_add\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Factorial.BigOperators", "llama_tokens": 741, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8962513731336202, "lm_q2_score": 0.7662936484231889, "lm_q1q2_score": 0.6867917346228547}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\nN : Type u_4\nr : Semiring R\ninst\u271d\u2075 : AddCommMonoid M\ninst\u271d\u2074 : AddCommMonoid N\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : Module R N\ninst\u271d\u00b9 : NoZeroSMulDivisors R M\ninst\u271d : NoZeroSMulDivisors R N\n\u22a2 \u2200 {c : R} {x : M \u00d7 N}, c \u2022 x = 0 \u2192 c = 0 \u2228 x = 0\n[PROOFSTEP]\nintro c \u27e8x, y\u27e9 h\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\nN : Type u_4\nr : Semiring R\ninst\u271d\u2075 : AddCommMonoid M\ninst\u271d\u2074 : AddCommMonoid N\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : Module R N\ninst\u271d\u00b9 : NoZeroSMulDivisors R M\ninst\u271d : NoZeroSMulDivisors R N\nc : R\nx : M\ny : N\nh : c \u2022 (x, y) = 0\n\u22a2 c = 0 \u2228 (x, y) = 0\n[PROOFSTEP]\nexact\n  or_iff_not_imp_left.mpr fun hc =>\n    mk.inj_iff.mpr\n      \u27e8(smul_eq_zero.mp (congr_arg fst h)).resolve_left hc, (smul_eq_zero.mp (congr_arg snd h)).resolve_left hc\u27e9\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.Prod", "llama_tokens": 413, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8791467548438124, "lm_q2_score": 0.7799928951399098, "lm_q1q2_score": 0.6857282225634818}}
{"text": "[GOAL]\nm k : \u2115\n\u22a2 hyperoperation 0 m k = Nat.succ k\n[PROOFSTEP]\nrw [hyperoperation, Nat.succ_eq_add_one]\n[GOAL]\nn m : \u2115\n\u22a2 hyperoperation (n + 3) m 0 = 1\n[PROOFSTEP]\nrw [hyperoperation]\n[GOAL]\nn m k : \u2115\n\u22a2 hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)\n[PROOFSTEP]\nrw [hyperoperation]\n[GOAL]\n\u22a2 hyperoperation 1 = fun x x_1 => x + x_1\n[PROOFSTEP]\next m k\n[GOAL]\ncase h.h\nm k : \u2115\n\u22a2 hyperoperation 1 m k = m + k\n[PROOFSTEP]\ninduction' k with bn bih\n[GOAL]\ncase h.h.zero\nm : \u2115\n\u22a2 hyperoperation 1 m Nat.zero = m + Nat.zero\n[PROOFSTEP]\nrw [Nat.add_zero m, hyperoperation]\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 1 m bn = m + bn\n\u22a2 hyperoperation 1 m (Nat.succ bn) = m + Nat.succ bn\n[PROOFSTEP]\nrw [hyperoperation_recursion, bih, hyperoperation_zero]\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 1 m bn = m + bn\n\u22a2 Nat.succ (m + bn) = m + Nat.succ bn\n[PROOFSTEP]\nexact Nat.add_assoc m bn 1\n[GOAL]\n\u22a2 hyperoperation 2 = fun x x_1 => x * x_1\n[PROOFSTEP]\next m k\n[GOAL]\ncase h.h\nm k : \u2115\n\u22a2 hyperoperation 2 m k = m * k\n[PROOFSTEP]\ninduction' k with bn bih\n[GOAL]\ncase h.h.zero\nm : \u2115\n\u22a2 hyperoperation 2 m Nat.zero = m * Nat.zero\n[PROOFSTEP]\nrw [hyperoperation]\n[GOAL]\ncase h.h.zero\nm : \u2115\n\u22a2 0 = m * Nat.zero\n[PROOFSTEP]\nexact (Nat.mul_zero m).symm\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 2 m bn = m * bn\n\u22a2 hyperoperation 2 m (Nat.succ bn) = m * Nat.succ bn\n[PROOFSTEP]\nrw [hyperoperation_recursion, hyperoperation_one, bih]\n  -- porting note: was `ring`\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 2 m bn = m * bn\n\u22a2 (fun x x_1 => x + x_1) m (m * bn) = m * Nat.succ bn\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 2 m bn = m * bn\n\u22a2 m + m * bn = m * Nat.succ bn\n[PROOFSTEP]\nnth_rewrite 1 [\u2190 mul_one m]\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 2 m bn = m * bn\n\u22a2 m * 1 + m * bn = m * Nat.succ bn\n[PROOFSTEP]\nrw [\u2190 mul_add, add_comm, Nat.succ_eq_add_one]\n[GOAL]\n\u22a2 hyperoperation 3 = fun x x_1 => x ^ x_1\n[PROOFSTEP]\next m k\n[GOAL]\ncase h.h\nm k : \u2115\n\u22a2 hyperoperation 3 m k = m ^ k\n[PROOFSTEP]\ninduction' k with bn bih\n[GOAL]\ncase h.h.zero\nm : \u2115\n\u22a2 hyperoperation 3 m Nat.zero = m ^ Nat.zero\n[PROOFSTEP]\nrw [hyperoperation_ge_three_eq_one]\n[GOAL]\ncase h.h.zero\nm : \u2115\n\u22a2 1 = m ^ Nat.zero\n[PROOFSTEP]\nexact (pow_zero m).symm\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 3 m bn = m ^ bn\n\u22a2 hyperoperation 3 m (Nat.succ bn) = m ^ Nat.succ bn\n[PROOFSTEP]\nrw [hyperoperation_recursion, hyperoperation_two, bih]\n[GOAL]\ncase h.h.succ\nm bn : \u2115\nbih : hyperoperation 3 m bn = m ^ bn\n\u22a2 (fun x x_1 => x * x_1) m (m ^ bn) = m ^ Nat.succ bn\n[PROOFSTEP]\nexact (pow_succ m bn).symm\n[GOAL]\nn m : \u2115\n\u22a2 hyperoperation (n + 2) m 1 = m\n[PROOFSTEP]\ninduction' n with nn nih\n[GOAL]\ncase zero\nm : \u2115\n\u22a2 hyperoperation (Nat.zero + 2) m 1 = m\n[PROOFSTEP]\nrw [hyperoperation_two]\n[GOAL]\ncase zero\nm : \u2115\n\u22a2 (fun x x_1 => x * x_1) m 1 = m\n[PROOFSTEP]\nring\n[GOAL]\ncase succ\nm nn : \u2115\nnih : hyperoperation (nn + 2) m 1 = m\n\u22a2 hyperoperation (Nat.succ nn + 2) m 1 = m\n[PROOFSTEP]\nrw [hyperoperation_recursion, hyperoperation_ge_three_eq_one, nih]\n[GOAL]\nn : \u2115\n\u22a2 hyperoperation (n + 1) 2 2 = 4\n[PROOFSTEP]\ninduction' n with nn nih\n[GOAL]\ncase zero\n\u22a2 hyperoperation (Nat.zero + 1) 2 2 = 4\n[PROOFSTEP]\nrw [hyperoperation_one]\n[GOAL]\ncase succ\nnn : \u2115\nnih : hyperoperation (nn + 1) 2 2 = 4\n\u22a2 hyperoperation (Nat.succ nn + 1) 2 2 = 4\n[PROOFSTEP]\nrw [hyperoperation_recursion, hyperoperation_ge_two_eq_self, nih]\n[GOAL]\nn : \u2115\n\u22a2 \u2200 (k : \u2115), hyperoperation (n + 3) 1 k = 1\n[PROOFSTEP]\ninduction' n with nn nih\n[GOAL]\ncase zero\n\u22a2 \u2200 (k : \u2115), hyperoperation (Nat.zero + 3) 1 k = 1\n[PROOFSTEP]\nintro k\n[GOAL]\ncase zero\nk : \u2115\n\u22a2 hyperoperation (Nat.zero + 3) 1 k = 1\n[PROOFSTEP]\nrw [hyperoperation_three]\n[GOAL]\ncase zero\nk : \u2115\n\u22a2 (fun x x_1 => x ^ x_1) 1 k = 1\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero\nk : \u2115\n\u22a2 1 ^ k = 1\n[PROOFSTEP]\nrw [one_pow]\n[GOAL]\ncase succ\nnn : \u2115\nnih : \u2200 (k : \u2115), hyperoperation (nn + 3) 1 k = 1\n\u22a2 \u2200 (k : \u2115), hyperoperation (Nat.succ nn + 3) 1 k = 1\n[PROOFSTEP]\nintro k\n[GOAL]\ncase succ\nnn : \u2115\nnih : \u2200 (k : \u2115), hyperoperation (nn + 3) 1 k = 1\nk : \u2115\n\u22a2 hyperoperation (Nat.succ nn + 3) 1 k = 1\n[PROOFSTEP]\ncases k\n[GOAL]\ncase succ.zero\nnn : \u2115\nnih : \u2200 (k : \u2115), hyperoperation (nn + 3) 1 k = 1\n\u22a2 hyperoperation (Nat.succ nn + 3) 1 Nat.zero = 1\n[PROOFSTEP]\nrw [hyperoperation_ge_three_eq_one]\n[GOAL]\ncase succ.succ\nnn : \u2115\nnih : \u2200 (k : \u2115), hyperoperation (nn + 3) 1 k = 1\nn\u271d : \u2115\n\u22a2 hyperoperation (Nat.succ nn + 3) 1 (Nat.succ n\u271d) = 1\n[PROOFSTEP]\nrw [hyperoperation_recursion, nih]\n[GOAL]\nn k : \u2115\n\u22a2 hyperoperation (n + 4) 0 k = if Even k then 1 else 0\n[PROOFSTEP]\ninduction' k with kk kih\n[GOAL]\ncase zero\nn : \u2115\n\u22a2 hyperoperation (n + 4) 0 Nat.zero = if Even Nat.zero then 1 else 0\n[PROOFSTEP]\nrw [hyperoperation_ge_three_eq_one]\n[GOAL]\ncase zero\nn : \u2115\n\u22a2 1 = if Even Nat.zero then 1 else 0\n[PROOFSTEP]\nsimp only [even_zero, if_true]\n[GOAL]\ncase succ\nn kk : \u2115\nkih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0\n\u22a2 hyperoperation (n + 4) 0 (Nat.succ kk) = if Even (Nat.succ kk) then 1 else 0\n[PROOFSTEP]\nrw [hyperoperation_recursion]\n[GOAL]\ncase succ\nn kk : \u2115\nkih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0\n\u22a2 hyperoperation (n + 3) 0 (hyperoperation (n + 3 + 1) 0 kk) = if Even (Nat.succ kk) then 1 else 0\n[PROOFSTEP]\nrw [kih]\n[GOAL]\ncase succ\nn kk : \u2115\nkih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0\n\u22a2 hyperoperation (n + 3) 0 (if Even kk then 1 else 0) = if Even (Nat.succ kk) then 1 else 0\n[PROOFSTEP]\nsimp_rw [Nat.even_add_one]\n[GOAL]\ncase succ\nn kk : \u2115\nkih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0\n\u22a2 hyperoperation (n + 3) 0 (if Even kk then 1 else 0) = if \u00acEven kk then 1 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nn kk : \u2115\nkih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0\nh\u271d : Even kk\n\u22a2 hyperoperation (n + 3) 0 1 = 0\n[PROOFSTEP]\nexact hyperoperation_ge_two_eq_self (n + 1) 0\n[GOAL]\ncase neg\nn kk : \u2115\nkih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0\nh\u271d : \u00acEven kk\n\u22a2 hyperoperation (n + 3) 0 0 = 1\n[PROOFSTEP]\nexact hyperoperation_ge_three_eq_one n 0\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Hyperoperation", "llama_tokens": 2990, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357666736772, "lm_q2_score": 0.7905303087996143, "lm_q1q2_score": 0.6854180523688523}}
{"text": "[GOAL]\na : \u2115\n\u22a2 Periodic (gcd a) a\n[PROOFSTEP]\nsimp only [forall_const, gcd_add_self_right, eq_self_iff_true, Periodic]\n[GOAL]\na : \u2115\n\u22a2 Periodic (coprime a) a\n[PROOFSTEP]\nsimp only [coprime_add_self_right, forall_const, iff_self_iff, eq_iff_iff, Periodic]\n[GOAL]\na : \u2115\n\u22a2 Periodic (fun n => n % a) a\n[PROOFSTEP]\nsimp only [forall_const, eq_self_iff_true, add_mod_right, Periodic]\n[GOAL]\n\u03b1 : Type u_1\nf : \u2115 \u2192 \u03b1\na : \u2115\nhf : Periodic f a\nn : \u2115\n\u22a2 f (n % a) = f n\n[PROOFSTEP]\nconv_rhs => rw [\u2190 Nat.mod_add_div n a, mul_comm, \u2190 Nat.nsmul_eq_mul, hf.nsmul]\n[GOAL]\n\u03b1 : Type u_1\nf : \u2115 \u2192 \u03b1\na : \u2115\nhf : Periodic f a\nn : \u2115\n| f n\n[PROOFSTEP]\nrw [\u2190 Nat.mod_add_div n a, mul_comm, \u2190 Nat.nsmul_eq_mul, hf.nsmul]\n[GOAL]\n\u03b1 : Type u_1\nf : \u2115 \u2192 \u03b1\na : \u2115\nhf : Periodic f a\nn : \u2115\n| f n\n[PROOFSTEP]\nrw [\u2190 Nat.mod_add_div n a, mul_comm, \u2190 Nat.nsmul_eq_mul, hf.nsmul]\n[GOAL]\n\u03b1 : Type u_1\nf : \u2115 \u2192 \u03b1\na : \u2115\nhf : Periodic f a\nn : \u2115\n| f n\n[PROOFSTEP]\nrw [\u2190 Nat.mod_add_div n a, mul_comm, \u2190 Nat.nsmul_eq_mul, hf.nsmul]\n[GOAL]\nn a : \u2115\np : \u2115 \u2192 Prop\ninst\u271d : DecidablePred p\npp : Periodic p a\n\u22a2 \u2191card (filter p (Ico n (n + a))) = count p a\n[PROOFSTEP]\nrw [count_eq_card_filter_range, Finset.card, Finset.filter_val, Finset.range_val, \u2190 multiset_Ico_map_mod n, \u2190\n  map_count_True_eq_filter_card, \u2190 map_count_True_eq_filter_card, map_map]\n[GOAL]\nn a : \u2115\np : \u2115 \u2192 Prop\ninst\u271d : DecidablePred p\npp : Periodic p a\n\u22a2 Multiset.count True (map p (Ico n (n + a))) = Multiset.count True (map (p \u2218 fun x => x % a) (Ico n (n + a)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_f\nn a : \u2115\np : \u2115 \u2192 Prop\ninst\u271d : DecidablePred p\npp : Periodic p a\n\u22a2 p = p \u2218 fun x => x % a\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase e_a.e_f.h\nn\u271d a : \u2115\np : \u2115 \u2192 Prop\ninst\u271d : DecidablePred p\npp : Periodic p a\nn : \u2115\n\u22a2 p n = (p \u2218 fun x => x % a) n\n[PROOFSTEP]\nexact (Function.Periodic.map_mod_nat pp n).symm\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Periodic", "llama_tokens": 923, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8774767970940974, "lm_q2_score": 0.7799929053683038, "lm_q1q2_score": 0.6844256763586987}}
{"text": "[GOAL]\nE : Type u_1\nF : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup E\ninst\u271d\u00b2 : NormedAddCommGroup F\ninst\u271d\u00b9 : InnerProductSpace \u211d E\ninst\u271d : InnerProductSpace \u211d F\nf : E \u2192 F\nx : E\n\u22a2 ConformalAt f x \u2194 \u2203 c, 0 < c \u2227 \u2200 (u v : E), inner (\u2191(fderiv \u211d f x) u) (\u2191(fderiv \u211d f x) v) = c * inner u v\n[PROOFSTEP]\nrw [conformalAt_iff_isConformalMap_fderiv, isConformalMap_iff]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup E\ninst\u271d\u00b2 : NormedAddCommGroup F\ninst\u271d\u00b9 : InnerProductSpace \u211d E\ninst\u271d : InnerProductSpace \u211d F\nf : E \u2192 F\nx : E\nf' : E \u2192L[\u211d] F\nh : HasFDerivAt f f' x\n\u22a2 ConformalAt f x \u2194 \u2203 c, 0 < c \u2227 \u2200 (u v : E), inner (\u2191f' u) (\u2191f' v) = c * inner u v\n[PROOFSTEP]\nsimp only [conformalAt_iff', h.fderiv]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Conformal.InnerProduct", "llama_tokens": 350, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9019206870747658, "lm_q2_score": 0.7577943658046609, "lm_q1q2_score": 0.6834704150679262}}
{"text": "[GOAL]\nx : \u211a\n\u22a2 0 \u2264 x \u2194 x \u2208 AddSubmonoid.closure (Set.range fun s => star s * s)\n[PROOFSTEP]\nrefine'\n  \u27e8fun hx => _, fun hx =>\n    AddSubmonoid.closure_induction hx (by rintro - \u27e8s, rfl\u27e9; exact mul_self_nonneg s) le_rfl fun _ _ => add_nonneg\u27e9\n    /- If `x = p / q`, then, since `0 \u2264 x`, we have `p q : \u2115`, and `p / q` is the sum of `p * q`\n          copies of `(1 / q) ^ 2`, and so `x` lies in the `AddSubmonoid` generated by square elements.\n    \n          Note: it's possible to rephrase this argument as `x = (p * q) \u2022 (1 / q) ^ 2`, but this would\n          be somewhat challenging without increasing import requirements. -/\n        -- Porting note: rewrote proof to avoid removed constructor rat.mk_pnat\n[GOAL]\nx : \u211a\nhx : x \u2208 AddSubmonoid.closure (Set.range fun s => star s * s)\n\u22a2 \u2200 (x : \u211a), (x \u2208 Set.range fun s => star s * s) \u2192 0 \u2264 x\n[PROOFSTEP]\nrintro - \u27e8s, rfl\u27e9\n[GOAL]\ncase intro\nx : \u211a\nhx : x \u2208 AddSubmonoid.closure (Set.range fun s => star s * s)\ns : \u211a\n\u22a2 0 \u2264 (fun s => star s * s) s\n[PROOFSTEP]\nexact mul_self_nonneg s\n[GOAL]\nx : \u211a\nhx : 0 \u2264 x\n\u22a2 x \u2208 AddSubmonoid.closure (Set.range fun s => star s * s)\n[PROOFSTEP]\nsuffices (Finset.range (x.num.natAbs * x.den)).sum (Function.const \u2115 ((1 : \u211a) / x.den * ((1 : \u211a) / x.den))) = x by\n  exact this \u25b8 sum_mem fun n _ => AddSubmonoid.subset_closure \u27e8_, rfl\u27e9\n[GOAL]\nx : \u211a\nhx : 0 \u2264 x\nthis : Finset.sum (Finset.range (Int.natAbs x.num * x.den)) (Function.const \u2115 (1 / \u2191x.den * (1 / \u2191x.den))) = x\n\u22a2 x \u2208 AddSubmonoid.closure (Set.range fun s => star s * s)\n[PROOFSTEP]\nexact this \u25b8 sum_mem fun n _ => AddSubmonoid.subset_closure \u27e8_, rfl\u27e9\n[GOAL]\nx : \u211a\nhx : 0 \u2264 x\n\u22a2 Finset.sum (Finset.range (Int.natAbs x.num * x.den)) (Function.const \u2115 (1 / \u2191x.den * (1 / \u2191x.den))) = x\n[PROOFSTEP]\nsimp only [Function.const_apply, Finset.sum_const, Finset.card_range, nsmul_eq_mul]\n[GOAL]\nx : \u211a\nhx : 0 \u2264 x\n\u22a2 \u2191(Int.natAbs x.num * x.den) * (1 / \u2191x.den * (1 / \u2191x.den)) = x\n[PROOFSTEP]\nrw [\u2190 Int.cast_ofNat, Int.ofNat_mul, Int.coe_natAbs, abs_of_nonneg (num_nonneg_iff_zero_le.mpr hx), Int.cast_mul,\n  Int.cast_ofNat]\n[GOAL]\nx : \u211a\nhx : 0 \u2264 x\n\u22a2 \u2191x.num * \u2191x.den * (1 / \u2191x.den * (1 / \u2191x.den)) = x\n[PROOFSTEP]\nrw [\u2190 mul_assoc, mul_assoc (x.num : \u211a), mul_one_div_cancel (Nat.cast_ne_zero.mpr x.pos.ne'), mul_one, mul_one_div,\n  Rat.num_div_den]\n", "meta": {"mathlib_filename": "Mathlib.Data.Rat.Star", "llama_tokens": 1058, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8740772253241803, "lm_q2_score": 0.7799929104825006, "lm_q1q2_score": 0.6817740389670759}}
{"text": "[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\nM : Type u_3\ninst\u271d\u00b2 : DivisionSemiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nf : \u03b1 \u2192 \u03b1\ng : \u03b1 \u2192 M\nx : \u03b1\n\u22a2 birkhoffAverage R f g 0 x = 0\n[PROOFSTEP]\nsimp [birkhoffAverage]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\nM : Type u_3\ninst\u271d\u00b2 : DivisionSemiring R\ninst\u271d\u00b9 : AddCommMonoid M\ninst\u271d : Module R M\nf : \u03b1 \u2192 \u03b1\ng : \u03b1 \u2192 M\nx : \u03b1\n\u22a2 birkhoffAverage R f g 1 x = g x\n[PROOFSTEP]\nsimp [birkhoffAverage]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\nM : Type u_3\ninst\u271d\u2076 : DivisionSemiring R\ninst\u271d\u2075 : AddCommMonoid M\ninst\u271d\u2074 : Module R M\nS : Type u_4\nF : Type u_5\nN : Type u_6\ninst\u271d\u00b3 : DivisionSemiring S\ninst\u271d\u00b2 : AddCommMonoid N\ninst\u271d\u00b9 : Module S N\ninst\u271d : AddMonoidHomClass F M N\ng' : F\nf : \u03b1 \u2192 \u03b1\ng : \u03b1 \u2192 M\nn : \u2115\nx : \u03b1\n\u22a2 \u2191g' (birkhoffAverage R f g n x) = birkhoffAverage S f (\u2191g' \u2218 g) n x\n[PROOFSTEP]\nsimp only [birkhoffAverage, map_inv_nat_cast_smul g' R S, map_birkhoffSum]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\nM : Type u_3\ninst\u271d\u2074 : DivisionSemiring R\ninst\u271d\u00b3 : AddCommMonoid M\ninst\u271d\u00b2 : Module R M\nS : Type u_4\ninst\u271d\u00b9 : DivisionSemiring S\ninst\u271d : Module S M\n\u22a2 birkhoffAverage R = birkhoffAverage S\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h.h\nR : Type u_1\n\u03b1 : Type u_2\nM : Type u_3\ninst\u271d\u2074 : DivisionSemiring R\ninst\u271d\u00b3 : AddCommMonoid M\ninst\u271d\u00b2 : Module R M\nS : Type u_4\ninst\u271d\u00b9 : DivisionSemiring S\ninst\u271d : Module S M\nx\u271d\u00b3 : \u03b1 \u2192 \u03b1\nx\u271d\u00b2 : \u03b1 \u2192 M\nx\u271d\u00b9 : \u2115\nx\u271d : \u03b1\n\u22a2 birkhoffAverage R x\u271d\u00b3 x\u271d\u00b2 x\u271d\u00b9 x\u271d = birkhoffAverage S x\u271d\u00b3 x\u271d\u00b2 x\u271d\u00b9 x\u271d\n[PROOFSTEP]\napply birkhoffAverage_congr_ring\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\nM : Type u_3\ninst\u271d\u00b3 : DivisionSemiring R\ninst\u271d\u00b2 : AddCommMonoid M\ninst\u271d\u00b9 : Module R M\ninst\u271d : CharZero R\nf : \u03b1 \u2192 \u03b1\nx : \u03b1\nh : IsFixedPt f x\ng : \u03b1 \u2192 M\nn : \u2115\nhn : n \u2260 0\n\u22a2 birkhoffAverage R f g n x = g x\n[PROOFSTEP]\nrw [birkhoffAverage, h.birkhoffSum_eq, nsmul_eq_smul_cast R, inv_smul_smul\u2080]\n[GOAL]\ncase hc\nR : Type u_1\n\u03b1 : Type u_2\nM : Type u_3\ninst\u271d\u00b3 : DivisionSemiring R\ninst\u271d\u00b2 : AddCommMonoid M\ninst\u271d\u00b9 : Module R M\ninst\u271d : CharZero R\nf : \u03b1 \u2192 \u03b1\nx : \u03b1\nh : IsFixedPt f x\ng : \u03b1 \u2192 M\nn : \u2115\nhn : n \u2260 0\n\u22a2 \u2191n \u2260 0\n[PROOFSTEP]\nrwa [Nat.cast_ne_zero]\n[GOAL]\nM : Type u_2\n\u03b1 : Type u_3\nR : Type u_1\ninst\u271d\u00b2 : DivisionRing R\ninst\u271d\u00b9 : AddCommGroup M\ninst\u271d : Module R M\nf : \u03b1 \u2192 \u03b1\ng : \u03b1 \u2192 M\nn : \u2115\nx : \u03b1\n\u22a2 birkhoffAverage R f g n (f x) - birkhoffAverage R f g n x = (\u2191n)\u207b\u00b9 \u2022 (g (f^[n] x) - g x)\n[PROOFSTEP]\nsimp only [birkhoffAverage, birkhoffSum_apply_sub_birkhoffSum, \u2190 smul_sub]\n", "meta": {"mathlib_filename": "Mathlib.Dynamics.BirkhoffSum.Average", "llama_tokens": 1232, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240895276223, "lm_q2_score": 0.7879311956428947, "lm_q1q2_score": 0.6817370513605344}}
{"text": "[GOAL]\na b : \u2115+\n\u22a2 card (Icc a b) = \u2191b + 1 - \u2191a\n[PROOFSTEP]\nrw [\u2190 Nat.card_Icc]\n  -- porting note: I had to change this to `erw` *and* provide the proof, yuck.\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\na b : \u2115+\n\u22a2 card (Icc a b) = card (Icc \u2191a \u2191b)\n[PROOFSTEP]\nerw [\u2190 Finset.map_subtype_embedding_Icc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]\n[GOAL]\na b : \u2115+\n\u22a2 card (Icc a b) = card (map (Embedding.subtype fun n => 0 < n) (Icc a b))\n[PROOFSTEP]\nrw [card_map]\n[GOAL]\na b : \u2115+\n\u22a2 card (Ico a b) = \u2191b - \u2191a\n[PROOFSTEP]\nrw [\u2190 Nat.card_Ico]\n  -- porting note: I had to change this to `erw` *and* provide the proof, yuck.\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\na b : \u2115+\n\u22a2 card (Ico a b) = card (Ico \u2191a \u2191b)\n[PROOFSTEP]\nerw [\u2190 Finset.map_subtype_embedding_Ico _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]\n[GOAL]\na b : \u2115+\n\u22a2 card (Ico a b) = card (map (Embedding.subtype fun n => 0 < n) (Ico a b))\n[PROOFSTEP]\nrw [card_map]\n[GOAL]\na b : \u2115+\n\u22a2 card (Ioc a b) = \u2191b - \u2191a\n[PROOFSTEP]\nrw [\u2190 Nat.card_Ioc]\n  -- porting note: I had to change this to `erw` *and* provide the proof, yuck.\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\na b : \u2115+\n\u22a2 card (Ioc a b) = card (Ioc \u2191a \u2191b)\n[PROOFSTEP]\nerw [\u2190 Finset.map_subtype_embedding_Ioc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]\n[GOAL]\na b : \u2115+\n\u22a2 card (Ioc a b) = card (map (Embedding.subtype fun n => 0 < n) (Ioc a b))\n[PROOFSTEP]\nrw [card_map]\n[GOAL]\na b : \u2115+\n\u22a2 card (Ioo a b) = \u2191b - \u2191a - 1\n[PROOFSTEP]\nrw [\u2190 Nat.card_Ioo]\n  -- porting note: I had to change this to `erw` *and* provide the proof, yuck.\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\na b : \u2115+\n\u22a2 card (Ioo a b) = card (Ioo \u2191a \u2191b)\n[PROOFSTEP]\nerw [\u2190 Finset.map_subtype_embedding_Ioo _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]\n[GOAL]\na b : \u2115+\n\u22a2 card (Ioo a b) = card (map (Embedding.subtype fun n => 0 < n) (Ioo a b))\n[PROOFSTEP]\nrw [card_map]\n[GOAL]\na b : \u2115+\n\u22a2 card (uIcc a b) = Int.natAbs (\u2191\u2191b - \u2191\u2191a) + 1\n[PROOFSTEP]\nrw [\u2190 Nat.card_uIcc, \u2190 map_subtype_embedding_uIcc, card_map]\n[GOAL]\na b : \u2115+\n\u22a2 Fintype.card \u2191(Set.Icc a b) = \u2191b + 1 - \u2191a\n[PROOFSTEP]\nrw [\u2190 card_Icc, Fintype.card_ofFinset]\n[GOAL]\na b : \u2115+\n\u22a2 Fintype.card \u2191(Set.Ico a b) = \u2191b - \u2191a\n[PROOFSTEP]\nrw [\u2190 card_Ico, Fintype.card_ofFinset]\n[GOAL]\na b : \u2115+\n\u22a2 Fintype.card \u2191(Set.Ioc a b) = \u2191b - \u2191a\n[PROOFSTEP]\nrw [\u2190 card_Ioc, Fintype.card_ofFinset]\n[GOAL]\na b : \u2115+\n\u22a2 Fintype.card \u2191(Set.Ioo a b) = \u2191b - \u2191a - 1\n[PROOFSTEP]\nrw [\u2190 card_Ioo, Fintype.card_ofFinset]\n[GOAL]\na b : \u2115+\n\u22a2 Fintype.card \u2191(Set.uIcc a b) = Int.natAbs (\u2191\u2191b - \u2191\u2191a) + 1\n[PROOFSTEP]\nrw [\u2190 card_uIcc, Fintype.card_ofFinset]\n", "meta": {"mathlib_filename": "Mathlib.Data.PNat.Interval", "llama_tokens": 1382, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357563664174, "lm_q2_score": 0.785308580887758, "lm_q1q2_score": 0.6808906194110551}}
{"text": "[GOAL]\nx : \u211d\nh\u2081 : -\u03c0 < x\nh\u2082 : x \u2264 \u03c0\n\u22a2 arg \u2191(\u2191expMapCircle x) = x\n[PROOFSTEP]\nrw [expMapCircle_apply, exp_mul_I, arg_cos_add_sin_mul_I \u27e8h\u2081, h\u2082\u27e9]\n[GOAL]\nx y : \u211d\n\u22a2 \u2191expMapCircle x = \u2191expMapCircle y \u2194 \u2203 m, x = y + \u2191m * (2 * \u03c0)\n[PROOFSTEP]\nrw [Subtype.ext_iff, expMapCircle_apply, expMapCircle_apply, exp_eq_exp_iff_exists_int]\n[GOAL]\nx y : \u211d\n\u22a2 (\u2203 n, \u2191x * I = \u2191y * I + \u2191n * (2 * \u2191\u03c0 * I)) \u2194 \u2203 m, x = y + \u2191m * (2 * \u03c0)\n[PROOFSTEP]\nrefine' exists_congr fun n => _\n[GOAL]\nx y : \u211d\nn : \u2124\n\u22a2 \u2191x * I = \u2191y * I + \u2191n * (2 * \u2191\u03c0 * I) \u2194 x = y + \u2191n * (2 * \u03c0)\n[PROOFSTEP]\nrw [\u2190 mul_assoc, \u2190 add_mul, mul_left_inj' I_ne_zero]\n[GOAL]\nx y : \u211d\nn : \u2124\n\u22a2 \u2191x = \u2191y + \u2191n * (2 * \u2191\u03c0) \u2194 x = y + \u2191n * (2 * \u03c0)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nz : \u211d\n\u22a2 z + 2 * \u03c0 = z + \u21911 * (2 * \u03c0)\n[PROOFSTEP]\nrw [Int.cast_one, one_mul]\n[GOAL]\n\u03b8 : Angle\n\u22a2 \u2191(expMapCircle \u03b8) = \u2191(cos \u03b8) + \u2191(sin \u03b8) * I\n[PROOFSTEP]\ninduction \u03b8 using Real.Angle.induction_on\n[GOAL]\ncase h\nx\u271d : \u211d\n\u22a2 \u2191(expMapCircle \u2191x\u271d) = \u2191(cos \u2191x\u271d) + \u2191(sin \u2191x\u271d) * I\n[PROOFSTEP]\nsimp [Complex.exp_mul_I]\n[GOAL]\n\u22a2 expMapCircle 0 = 1\n[PROOFSTEP]\nrw [\u2190 Real.Angle.coe_zero, Real.Angle.expMapCircle_coe, _root_.expMapCircle_zero]\n[GOAL]\n\u03b8 : Angle\n\u22a2 expMapCircle (-\u03b8) = (expMapCircle \u03b8)\u207b\u00b9\n[PROOFSTEP]\ninduction \u03b8 using Real.Angle.induction_on\n[GOAL]\ncase h\nx\u271d : \u211d\n\u22a2 expMapCircle (-\u2191x\u271d) = (expMapCircle \u2191x\u271d)\u207b\u00b9\n[PROOFSTEP]\nsimp_rw [\u2190 Real.Angle.coe_neg, Real.Angle.expMapCircle_coe, _root_.expMapCircle_neg]\n[GOAL]\n\u03b8\u2081 \u03b8\u2082 : Angle\n\u22a2 expMapCircle (\u03b8\u2081 + \u03b8\u2082) = expMapCircle \u03b8\u2081 * expMapCircle \u03b8\u2082\n[PROOFSTEP]\ninduction \u03b8\u2081 using Real.Angle.induction_on\n[GOAL]\ncase h\n\u03b8\u2082 : Angle\nx\u271d : \u211d\n\u22a2 expMapCircle (\u2191x\u271d + \u03b8\u2082) = expMapCircle \u2191x\u271d * expMapCircle \u03b8\u2082\n[PROOFSTEP]\ninduction \u03b8\u2082 using Real.Angle.induction_on\n[GOAL]\ncase h.h\nx\u271d\u00b9 x\u271d : \u211d\n\u22a2 expMapCircle (\u2191x\u271d\u00b9 + \u2191x\u271d) = expMapCircle \u2191x\u271d\u00b9 * expMapCircle \u2191x\u271d\n[PROOFSTEP]\nexact _root_.expMapCircle_add _ _\n[GOAL]\n\u03b8 : Angle\n\u22a2 \u2191(arg \u2191(expMapCircle \u03b8)) = \u03b8\n[PROOFSTEP]\ninduction \u03b8 using Real.Angle.induction_on\n[GOAL]\ncase h\nx\u271d : \u211d\n\u22a2 \u2191(arg \u2191(expMapCircle \u2191x\u271d)) = \u2191x\u271d\n[PROOFSTEP]\nrw [Real.Angle.expMapCircle_coe, expMapCircle_apply, exp_mul_I, \u2190 ofReal_cos, \u2190 ofReal_sin, \u2190 Real.Angle.cos_coe, \u2190\n  Real.Angle.sin_coe, arg_cos_add_sin_mul_I_coe_angle]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Complex.Circle", "llama_tokens": 1218, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8633916170039421, "lm_q2_score": 0.7879312056025699, "lm_q1q2_score": 0.6802931976930684}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\n\u22a2 IsEquipartition P \u2194\n    \u2200 (a : Finset \u03b1),\n      a \u2208 P.parts \u2192\n        Finset.card a = Finset.card s / Finset.card P.parts \u2228 Finset.card a = Finset.card s / Finset.card P.parts + 1\n[PROOFSTEP]\nsimp_rw [IsEquipartition, Finset.equitableOn_iff, P.sum_card_parts]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\nhP : IsEquipartition P\nht : t \u2208 P.parts\n\u22a2 Finset.card s / Finset.card P.parts \u2264 Finset.card t\n[PROOFSTEP]\nrw [\u2190 P.sum_card_parts]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\nhP : IsEquipartition P\nht : t \u2208 P.parts\n\u22a2 (Finset.sum P.parts fun i => Finset.card i) / Finset.card P.parts \u2264 Finset.card t\n[PROOFSTEP]\nexact Finset.EquitableOn.le hP ht\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\nhP : IsEquipartition P\nht : t \u2208 P.parts\n\u22a2 Finset.card t \u2264 Finset.card s / Finset.card P.parts + 1\n[PROOFSTEP]\nrw [\u2190 P.sum_card_parts]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\nhP : IsEquipartition P\nht : t \u2208 P.parts\n\u22a2 Finset.card t \u2264 (Finset.sum P.parts fun i => Finset.card i) / Finset.card P.parts + 1\n[PROOFSTEP]\nexact Finset.EquitableOn.le_add_one hP ht\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\n\u22a2 \u2200 (a : Finset \u03b1), a \u2208 \u2191\u22a5.parts \u2192 Finset.card a = 1 \u2228 Finset.card a = 1 + 1\n[PROOFSTEP]\nsimp\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\nhs : s \u2260 \u2205\n\u22a2 IsEquipartition (indiscrete hs)\n[PROOFSTEP]\nrw [IsEquipartition, indiscrete_parts, coe_singleton]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Finset \u03b1\nP : Finpartition s\nhs : s \u2260 \u2205\n\u22a2 Set.EquitableOn {s} Finset.card\n[PROOFSTEP]\nexact Set.equitableOn_singleton s _\n", "meta": {"mathlib_filename": "Mathlib.Order.Partition.Equipartition", "llama_tokens": 811, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.86153820232079, "lm_q2_score": 0.7879311956428946, "lm_q1q2_score": 0.6788328258466502}}
{"text": "[GOAL]\n\u22a2 CommSemigroup \ud835\udd3b\n[PROOFSTEP]\nunfold UnitDisc\n[GOAL]\n\u22a2 CommSemigroup \u2191(ball 0 1)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n\u22a2 HasDistribNeg \ud835\udd3b\n[PROOFSTEP]\nunfold UnitDisc\n[GOAL]\n\u22a2 HasDistribNeg \u2191(ball 0 1)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nz : \ud835\udd3b\n\u22a2 \u2191normSq \u2191z < 1\n[PROOFSTEP]\nconvert (Real.sqrt_lt' one_pos).1 z.abs_lt_one\n[GOAL]\ncase h.e'_4\nz : \ud835\udd3b\n\u22a2 1 = 1 ^ 2\n[PROOFSTEP]\nexact (one_pow 2).symm\n[GOAL]\nz : \ud835\udd3b\n\u22a2 \u2191abs \u2191z \u2260 \u2191abs (-1)\n[PROOFSTEP]\nrw [abs.map_neg, map_one]\n[GOAL]\nz : \ud835\udd3b\n\u22a2 \u2191abs \u2191z \u2260 1\n[PROOFSTEP]\nexact z.abs_ne_one\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.UnitDisc.Basic", "llama_tokens": 318, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8824278540866548, "lm_q2_score": 0.7690802370707281, "lm_q1q2_score": 0.6786578232187784}}
{"text": "[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 q = p / (p - 1)\n[PROOFSTEP]\nhave := h.inv_add_inv_conj\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\nthis : 1 / p + 1 / q = 1\n\u22a2 q = p / (p - 1)\n[PROOFSTEP]\nrw [\u2190 eq_sub_iff_add_eq', one_div, inv_eq_iff_eq_inv] at this \n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\nthis : q = (1 - 1 / p)\u207b\u00b9\n\u22a2 q = p / (p - 1)\n[PROOFSTEP]\nfield_simp [this, h.ne_zero]\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 p * q = p + q\n[PROOFSTEP]\nsimpa only [sub_mul, sub_eq_iff_eq_add, one_mul] using h.sub_one_mul_conj\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 1 < q\n[PROOFSTEP]\nrw [h.conj_eq]\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 1 < p / (p - 1)\n[PROOFSTEP]\nexact (one_lt_div h.sub_one_pos).mpr (sub_one_lt p)\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 1 / q + 1 / p = 1\n[PROOFSTEP]\nsimpa [add_comm] using h.inv_add_inv_conj\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 p / q = p - 1\n[PROOFSTEP]\nfield_simp [h.symm.ne_zero]\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 p = (p - 1) * q\n[PROOFSTEP]\nrw [h.sub_one_mul_conj]\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 1 < toNNReal p\n[PROOFSTEP]\nrw [\u2190 Real.toNNReal_one, Real.toNNReal_lt_toNNReal_iff h.pos]\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 1 < p\n[PROOFSTEP]\nexact h.one_lt\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 1 / toNNReal p + 1 / toNNReal q = 1\n[PROOFSTEP]\nrw [\u2190 Real.toNNReal_one, \u2190 Real.toNNReal_div' h.nonneg, \u2190 Real.toNNReal_div' h.symm.nonneg, \u2190\n  Real.toNNReal_add h.one_div_nonneg h.symm.one_div_nonneg, h.inv_add_inv_conj]\n[GOAL]\np q : \u211d\nh : IsConjugateExponent p q\n\u22a2 1 / ENNReal.ofReal p + 1 / ENNReal.ofReal q = 1\n[PROOFSTEP]\nrw [\u2190 ENNReal.ofReal_one, \u2190 ENNReal.ofReal_div_of_pos h.pos, \u2190 ENNReal.ofReal_div_of_pos h.symm.pos, \u2190\n  ENNReal.ofReal_add h.one_div_nonneg h.symm.one_div_nonneg, h.inv_add_inv_conj]\n[GOAL]\np q : \u211d\nh : 1 < p\nH : q = p / (p - 1)\n\u22a2 1 / p + 1 / q = 1\n[PROOFSTEP]\nfield_simp [H, ne_of_gt (lt_trans zero_lt_one h)]\n[GOAL]\na b : \u211d\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n\u22a2 1 < 1 / a\n[PROOFSTEP]\nrw [lt_div_iff ha, one_mul]\n[GOAL]\na b : \u211d\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n\u22a2 a < 1\n[PROOFSTEP]\nlinarith\n[GOAL]\na b : \u211d\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n\u22a2 1 / (1 / a) + 1 / (1 / b) = 1\n[PROOFSTEP]\nsimp_rw [one_div_one_div]\n[GOAL]\na b : \u211d\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n\u22a2 a + b = 1\n[PROOFSTEP]\nexact hab\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.ConjugateExponents", "llama_tokens": 1303, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8791467738423873, "lm_q2_score": 0.7718434978390747, "lm_q1q2_score": 0.6785637210364461}}
{"text": "[GOAL]\nn : \u2115\npn : NormNum.IsNat n 0\n\u22a2 List.range n = []\n[PROOFSTEP]\nrw [pn.out, Nat.cast_zero, List.range_zero]\n[GOAL]\nn nn n' : \u2115\npn : NormNum.IsNat n nn\npn' : nn = Nat.succ n'\n\u22a2 List.range n = 0 :: List.map Nat.succ (List.range n')\n[PROOFSTEP]\nrw [pn.out, Nat.cast_id, pn', List.range_succ_eq_map]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\na : \u03b1\ns : Multiset \u03b1\n\u22a2 insert a s = a ::\u2098 s\n[PROOFSTEP]\next\n[GOAL]\ncase a\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\na : \u03b1\ns : Multiset \u03b1\na\u271d : \u03b1\n\u22a2 Multiset.count a\u271d (insert a s) = Multiset.count a\u271d (a ::\u2098 s)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : \u2115\npn : NormNum.IsNat n 0\n\u22a2 Multiset.range n = 0\n[PROOFSTEP]\nrw [pn.out, Nat.cast_zero, Multiset.range_zero]\n[GOAL]\nn nn n' : \u2115\npn : NormNum.IsNat n nn\npn' : nn = Nat.succ n'\n\u22a2 Multiset.range n = n' ::\u2098 Multiset.range n'\n[PROOFSTEP]\nrw [pn.out, Nat.cast_id, pn', Multiset.range_succ]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\na : \u03b1\ns : Finset \u03b1\nh : \u00aca \u2208 s\n\u22a2 insert a s = Finset.cons a s h\n[PROOFSTEP]\next\n[GOAL]\ncase a\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\na : \u03b1\ns : Finset \u03b1\nh : \u00aca \u2208 s\na\u271d : \u03b1\n\u22a2 a\u271d \u2208 insert a s \u2194 a\u271d \u2208 Finset.cons a s h\n[PROOFSTEP]\nsimp\n[GOAL]\nn : \u2115\npn : NormNum.IsNat n 0\n\u22a2 Finset.range n = \u2205\n[PROOFSTEP]\nrw [pn.out, Nat.cast_zero, Finset.range_zero]\n[GOAL]\nn nn n' : \u2115\npn : NormNum.IsNat n nn\npn' : nn = Nat.succ n'\n\u22a2 Finset.range n = Finset.cons n' (Finset.range n') (_ : \u00acn' \u2208 Finset.range n')\n[PROOFSTEP]\nrw [pn.out, Nat.cast_id, pn', Finset.range_succ, Finset.insert_eq_cons]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Fintype \u03b1\nelems : Finset \u03b1\ncomplete : \u2200 (x : \u03b1), x \u2208 elems\n\u22a2 Finset.univ = elems\n[PROOFSTEP]\next x\n[GOAL]\ncase a\n\u03b1 : Type u_1\ninst\u271d : Fintype \u03b1\nelems : Finset \u03b1\ncomplete : \u2200 (x : \u03b1), x \u2208 elems\nx : \u03b1\n\u22a2 x \u2208 Finset.univ \u2194 x \u2208 elems\n[PROOFSTEP]\nsimpa using complete x\n[GOAL]\n\u03b2 : Type u_1\n\u03b1 : Type u_2\ninst\u271d : CommSemiring \u03b2\nf : \u03b1 \u2192 \u03b2\n\u22a2 Finset.sum \u2205 f = \u21910\n[PROOFSTEP]\nsimp\n[GOAL]\n\u03b2 : Type u_1\n\u03b1 : Type u_2\ninst\u271d : CommSemiring \u03b2\nf : \u03b1 \u2192 \u03b2\n\u22a2 Finset.prod \u2205 f = \u21911\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Tactic.NormNum.BigOperators", "llama_tokens": 1035, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256432832333, "lm_q2_score": 0.8056321796478255, "lm_q1q2_score": 0.6782018278817041}}
{"text": "[GOAL]\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm n : \u2115\nh : \u2191m = \u2191n\n\u22a2 m = n\n[PROOFSTEP]\ninduction' m with m ih generalizing n\n[GOAL]\ncase zero\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm n\u271d : \u2115\nh\u271d : \u2191m = \u2191n\u271d\nn : \u2115\nh : \u2191Nat.zero = \u2191n\n\u22a2 Nat.zero = n\n[PROOFSTEP]\nrw [H n]\n[GOAL]\ncase zero\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm n\u271d : \u2115\nh\u271d : \u2191m = \u2191n\u271d\nn : \u2115\nh : \u2191Nat.zero = \u2191n\n\u22a2 \u2191n = 0\n[PROOFSTEP]\nrw [\u2190 h, Nat.cast_zero]\n[GOAL]\ncase succ\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm\u271d n\u271d : \u2115\nh\u271d : \u2191m\u271d = \u2191n\u271d\nm : \u2115\nih : \u2200 (n : \u2115), \u2191m = \u2191n \u2192 m = n\nn : \u2115\nh : \u2191(Nat.succ m) = \u2191n\n\u22a2 Nat.succ m = n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.zero\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm\u271d n : \u2115\nh\u271d : \u2191m\u271d = \u2191n\nm : \u2115\nih : \u2200 (n : \u2115), \u2191m = \u2191n \u2192 m = n\nh : \u2191(Nat.succ m) = \u2191Nat.zero\n\u22a2 Nat.succ m = Nat.zero\n[PROOFSTEP]\napply H\n[GOAL]\ncase succ.zero.a\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm\u271d n : \u2115\nh\u271d : \u2191m\u271d = \u2191n\nm : \u2115\nih : \u2200 (n : \u2115), \u2191m = \u2191n \u2192 m = n\nh : \u2191(Nat.succ m) = \u2191Nat.zero\n\u22a2 \u2191(Nat.succ m) = 0\n[PROOFSTEP]\nrw [h, Nat.cast_zero]\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm\u271d n\u271d : \u2115\nh\u271d : \u2191m\u271d = \u2191n\u271d\nm : \u2115\nih : \u2200 (n : \u2115), \u2191m = \u2191n \u2192 m = n\nn : \u2115\nh : \u2191(Nat.succ m) = \u2191(Nat.succ n)\n\u22a2 Nat.succ m = Nat.succ n\n[PROOFSTEP]\nsimp only [Nat.cast_succ, add_right_cancel_iff] at h \n[GOAL]\ncase succ.succ\nR : Type u_1\ninst\u271d : AddGroupWithOne R\nH : \u2200 (n : \u2115), \u2191n = 0 \u2192 n = 0\nm\u271d n\u271d : \u2115\nh\u271d : \u2191m\u271d = \u2191n\u271d\nm : \u2115\nih : \u2200 (n : \u2115), \u2191m = \u2191n \u2192 m = n\nn : \u2115\nh : \u2191m = \u2191n\n\u22a2 Nat.succ m = Nat.succ n\n[PROOFSTEP]\nrwa [ih]\n[GOAL]\nR : Type u_1\ninst\u271d\u00b9 : AddMonoidWithOne R\ninst\u271d : CharZero R\nn : \u2115\n\u22a2 \u2191n = 0 \u2194 n = 0\n[PROOFSTEP]\nrw [\u2190 cast_zero, cast_inj]\n[GOAL]\nR : Type u_1\ninst\u271d\u00b9 : AddMonoidWithOne R\ninst\u271d : CharZero R\nn : \u2115\n\u22a2 \u2191n + 1 \u2260 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nR : Type u_1\ninst\u271d\u00b9 : AddMonoidWithOne R\ninst\u271d : CharZero R\nn : \u2115\n\u22a2 \u00acn + 1 = 0\n[PROOFSTEP]\nexact n.succ_ne_zero\n[GOAL]\nR : Type u_1\ninst\u271d\u00b9 : AddMonoidWithOne R\ninst\u271d : CharZero R\nn : \u2115\n\u22a2 \u2191n = 1 \u2194 n = 1\n[PROOFSTEP]\nrw [\u2190 cast_one, cast_inj]\n[GOAL]\nR : Type u_1\ninst\u271d\u00b9 : AddMonoidWithOne R\ninst\u271d : CharZero R\nn : \u2115\nh : Nat.AtLeastTwo n\n\u22a2 ofNat n \u2260 1\n[PROOFSTEP]\nrw [\u2190 Nat.cast_eq_ofNat, \u2190 @Nat.cast_one R, Ne.def, Nat.cast_inj]\n[GOAL]\nR : Type u_1\ninst\u271d\u00b9 : AddMonoidWithOne R\ninst\u271d : CharZero R\nn : \u2115\nh : Nat.AtLeastTwo n\n\u22a2 \u00acn = 1\n[PROOFSTEP]\nexact ne_of_gt h.prop\n", "meta": {"mathlib_filename": "Mathlib.Algebra.CharZero.Defs", "llama_tokens": 1553, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519528057272543, "lm_q2_score": 0.7956580952177051, "lm_q1q2_score": 0.6778631466203268}}
{"text": "[GOAL]\nm n r : \u2124\n\u22a2 r \u2208 range m n \u2194 m \u2264 r \u2227 r < n\n[PROOFSTEP]\nsimp only [range, List.mem_map, List.mem_range, lt_toNat, lt_sub_iff_add_lt, add_comm]\n[GOAL]\nm n r : \u2124\n\u22a2 (\u2203 a, m + \u2191a < n \u2227 m + \u2191a = r) \u2194 m \u2264 r \u2227 r < n\n[PROOFSTEP]\nexact\n  \u27e8fun \u27e8a, ha\u27e9 => ha.2 \u25b8 \u27e8le_add_of_nonneg_right (Int.coe_nat_nonneg _), ha.1\u27e9, fun h =>\n    \u27e8toNat (r - m), by simp [toNat_of_nonneg (sub_nonneg.2 h.1), h.2]\u27e9\u27e9\n[GOAL]\nm n r : \u2124\nh : m \u2264 r \u2227 r < n\n\u22a2 m + \u2191(toNat (r - m)) < n \u2227 m + \u2191(toNat (r - m)) = r\n[PROOFSTEP]\nsimp [toNat_of_nonneg (sub_nonneg.2 h.1), h.2]\n[GOAL]\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\n\u22a2 (\u2200 (r : \u2124), r \u2208 range m n \u2192 P r) \u2194 \u2200 (r : \u2124), m \u2264 r \u2192 r < n \u2192 P r\n[PROOFSTEP]\nsimp only [mem_range_iff, and_imp]\n[GOAL]\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\n\u22a2 Decidable (\u2200 (r : \u2124), m \u2264 r \u2192 r \u2264 n \u2192 P r)\n[PROOFSTEP]\napply decidable_of_iff (\u2200 r \u2208 range m (n + 1), P r)\n[GOAL]\ncase h\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\n\u22a2 (\u2200 (r : \u2124), r \u2208 range m (n + 1) \u2192 P r) \u2194 \u2200 (r : \u2124), m \u2264 r \u2192 r \u2264 n \u2192 P r\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase h.mp\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\n\u22a2 (\u2200 (r : \u2124), r \u2208 range m (n + 1) \u2192 P r) \u2192 \u2200 (r : \u2124), m \u2264 r \u2192 r \u2264 n \u2192 P r\n[PROOFSTEP]\nintros h _ _\n[GOAL]\ncase h.mpr\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\n\u22a2 (\u2200 (r : \u2124), m \u2264 r \u2192 r \u2264 n \u2192 P r) \u2192 \u2200 (r : \u2124), r \u2208 range m (n + 1) \u2192 P r\n[PROOFSTEP]\nintros h _ _\n[GOAL]\ncase h.mp\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\nh : \u2200 (r : \u2124), r \u2208 range m (n + 1) \u2192 P r\nr\u271d : \u2124\na\u271d : m \u2264 r\u271d\n\u22a2 r\u271d \u2264 n \u2192 P r\u271d\n[PROOFSTEP]\nintro _\n[GOAL]\ncase h.mp\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\nh : \u2200 (r : \u2124), r \u2208 range m (n + 1) \u2192 P r\nr\u271d : \u2124\na\u271d\u00b9 : m \u2264 r\u271d\na\u271d : r\u271d \u2264 n\n\u22a2 P r\u271d\n[PROOFSTEP]\napply h\n[GOAL]\ncase h.mp.a\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\nh : \u2200 (r : \u2124), r \u2208 range m (n + 1) \u2192 P r\nr\u271d : \u2124\na\u271d\u00b9 : m \u2264 r\u271d\na\u271d : r\u271d \u2264 n\n\u22a2 r\u271d \u2208 range m (n + 1)\n[PROOFSTEP]\nsimp_all only [mem_range_iff, and_imp, lt_add_one_iff]\n[GOAL]\ncase h.mpr\nP : \u2124 \u2192 Prop\ninst\u271d : DecidablePred P\nm n : \u2124\nh : \u2200 (r : \u2124), m \u2264 r \u2192 r \u2264 n \u2192 P r\nr\u271d : \u2124\na\u271d : r\u271d \u2208 range m (n + 1)\n\u22a2 P r\u271d\n[PROOFSTEP]\nsimp_all only [mem_range_iff, and_imp, lt_add_one_iff]\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Range", "llama_tokens": 1259, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711756575749, "lm_q2_score": 0.7956580976404296, "lm_q1q2_score": 0.6762864486729054}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns\u271d t\u271d s t x : Multiset \u03b1\n\u22a2 x \u2208 (fun s t => Finset.map (Equiv.toEmbedding equivDFinsupp.symm) (Finset.Icc (\u2191toDFinsupp s) (\u2191toDFinsupp t))) s t \u2194\n    s \u2264 x \u2227 x \u2264 t\n[PROOFSTEP]\nsimp\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Multiset \u03b1\n\u22a2 Finset.map (Equiv.toEmbedding equivDFinsupp.symm) (Finset.Icc (\u2191toDFinsupp (s \u2293 t)) (\u2191toDFinsupp (s \u2294 t))) =\n    Finset.map (Equiv.toEmbedding equivDFinsupp.symm) (uIcc (\u2191toDFinsupp s) (\u2191toDFinsupp t))\n[PROOFSTEP]\nsimp [uIcc]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Multiset \u03b1\n\u22a2 Finset.card (Finset.Icc s t) = \u220f i in toFinset s \u222a toFinset t, (count i t + 1 - count i s)\n[PROOFSTEP]\nsimp_rw [Icc_eq, Finset.card_map, DFinsupp.card_Icc, Nat.card_Icc, Multiset.toDFinsupp_apply, toDFinsupp_support]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Multiset \u03b1\n\u22a2 Finset.card (Finset.Ico s t) = \u220f i in toFinset s \u222a toFinset t, (count i t + 1 - count i s) - 1\n[PROOFSTEP]\nrw [card_Ico_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Multiset \u03b1\n\u22a2 Finset.card (Finset.Ioc s t) = \u220f i in toFinset s \u222a toFinset t, (count i t + 1 - count i s) - 1\n[PROOFSTEP]\nrw [card_Ioc_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Multiset \u03b1\n\u22a2 Finset.card (Finset.Ioo s t) = \u220f i in toFinset s \u222a toFinset t, (count i t + 1 - count i s) - 2\n[PROOFSTEP]\nrw [card_Ioo_eq_card_Icc_sub_two, card_Icc]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Multiset \u03b1\n\u22a2 Finset.card (uIcc s t) = \u220f i in toFinset s \u222a toFinset t, (Int.natAbs (\u2191(count i t) - \u2191(count i s)) + 1)\n[PROOFSTEP]\nsimp_rw [uIcc_eq, Finset.card_map, DFinsupp.card_uIcc, Nat.card_uIcc, Multiset.toDFinsupp_apply, toDFinsupp_support]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DecidableEq \u03b1\ns t : Multiset \u03b1\n\u22a2 Finset.card (Finset.Iic s) = \u220f i in toFinset s, (count i s + 1)\n[PROOFSTEP]\nsimp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, toFinset_zero, empty_union, count_zero, tsub_zero]\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Interval", "llama_tokens": 993, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8577680904463333, "lm_q2_score": 0.78793120560257, "lm_q1q2_score": 0.6758622456327937}}
{"text": "[GOAL]\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b3 : SMul R M\ninst\u271d\u00b2 : SMul M N\ninst\u271d\u00b9 : SMul R N\ninst\u271d : IsScalarTower R M N\nx : R\ny : M\nz : ULift N\n\u22a2 { down := (x \u2022 y) \u2022 z.down } = { down := x \u2022 y \u2022 z.down }\n[PROOFSTEP]\nrw [smul_assoc]\n[GOAL]\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b9 : Zero M\ninst\u271d : SMulZeroClass R M\nc : R\n\u22a2 c \u2022 0 = 0\n[PROOFSTEP]\n{ext; simp [smul_zero]\n}\n[GOAL]\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b9 : Zero M\ninst\u271d : SMulZeroClass R M\nc : R\n\u22a2 c \u2022 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b9 : Zero M\ninst\u271d : SMulZeroClass R M\nc : R\n\u22a2 (c \u2022 0).down = 0.down\n[PROOFSTEP]\nsimp [smul_zero]\n[GOAL]\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b9 : AddZeroClass M\ninst\u271d : DistribSMul R M\nc : R\nf g : ULift M\n\u22a2 c \u2022 (f + g) = c \u2022 f + c \u2022 g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b9 : AddZeroClass M\ninst\u271d : DistribSMul R M\nc : R\nf g : ULift M\n\u22a2 (c \u2022 (f + g)).down = (c \u2022 f + c \u2022 g).down\n[PROOFSTEP]\nsimp [smul_add]\n[GOAL]\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b2 : Monoid R\ninst\u271d\u00b9 : Monoid M\ninst\u271d : MulDistribMulAction R M\nsrc\u271d : MulAction R (ULift M) := mulAction'\nx\u271d\u00b2 : R\nx\u271d\u00b9 x\u271d : ULift M\n\u22a2 x\u271d\u00b2 \u2022 (x\u271d\u00b9 * x\u271d) = x\u271d\u00b2 \u2022 x\u271d\u00b9 * x\u271d\u00b2 \u2022 x\u271d\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b2 : Monoid R\ninst\u271d\u00b9 : Monoid M\ninst\u271d : MulDistribMulAction R M\nsrc\u271d : MulAction R (ULift M) := mulAction'\nx\u271d\u00b2 : R\nx\u271d\u00b9 x\u271d : ULift M\n\u22a2 (x\u271d\u00b2 \u2022 (x\u271d\u00b9 * x\u271d)).down = (x\u271d\u00b2 \u2022 x\u271d\u00b9 * x\u271d\u00b2 \u2022 x\u271d).down\n[PROOFSTEP]\nsimp [smul_mul']\n[GOAL]\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b2 : Monoid R\ninst\u271d\u00b9 : Monoid M\ninst\u271d : MulDistribMulAction R M\nsrc\u271d : MulAction R (ULift M) := mulAction'\nx\u271d : R\n\u22a2 x\u271d \u2022 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nM : Type v\nN : Type w\ninst\u271d\u00b2 : Monoid R\ninst\u271d\u00b9 : Monoid M\ninst\u271d : MulDistribMulAction R M\nsrc\u271d : MulAction R (ULift M) := mulAction'\nx\u271d : R\n\u22a2 (x\u271d \u2022 1).down = 1.down\n[PROOFSTEP]\nsimp [smul_one]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.ULift", "llama_tokens": 1036, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8577680977182187, "lm_q2_score": 0.7879311956428947, "lm_q1q2_score": 0.6758622428194474}}
{"text": "[GOAL]\nK : Type u_1\n\u03b9 : Type u_2\nR : \u03b9 \u2192 Type u_3\ninst\u271d : (i : \u03b9) \u2192 SMul K (R i)\nr : K\ns : Set \u03b9\nt : (i : \u03b9) \u2192 Set (R i)\n\u22a2 r \u2022 pi s t \u2286 pi s (r \u2022 t)\n[PROOFSTEP]\nrintro x \u27e8y, h, rfl\u27e9 i hi\n[GOAL]\ncase intro.intro\nK : Type u_1\n\u03b9 : Type u_2\nR : \u03b9 \u2192 Type u_3\ninst\u271d : (i : \u03b9) \u2192 SMul K (R i)\nr : K\ns : Set \u03b9\nt : (i : \u03b9) \u2192 Set (R i)\ny : (i : \u03b9) \u2192 R i\nh : y \u2208 pi s t\ni : \u03b9\nhi : i \u2208 s\n\u22a2 (fun x => r \u2022 x) y i \u2208 (r \u2022 t) i\n[PROOFSTEP]\nexact smul_mem_smul_set (h i hi)\n[GOAL]\nK : Type u_1\n\u03b9 : Type u_2\nR : \u03b9 \u2192 Type u_3\ninst\u271d : (i : \u03b9) \u2192 SMul K (R i)\nr : K\nt : (i : \u03b9) \u2192 Set (R i)\nx : (i : \u03b9) \u2192 R i\nh : x \u2208 pi univ (r \u2022 t)\n\u22a2 x \u2208 r \u2022 pi univ t\n[PROOFSTEP]\nrefine' \u27e8fun i \u21a6 Classical.choose (h i <| Set.mem_univ _), fun i _ \u21a6 _, funext fun i \u21a6 _\u27e9\n[GOAL]\ncase refine'_1\nK : Type u_1\n\u03b9 : Type u_2\nR : \u03b9 \u2192 Type u_3\ninst\u271d : (i : \u03b9) \u2192 SMul K (R i)\nr : K\nt : (i : \u03b9) \u2192 Set (R i)\nx : (i : \u03b9) \u2192 R i\nh : x \u2208 pi univ (r \u2022 t)\ni : \u03b9\nx\u271d : i \u2208 univ\n\u22a2 (fun i => Classical.choose (_ : x i \u2208 (r \u2022 t) i)) i \u2208 t i\n[PROOFSTEP]\nexact (Classical.choose_spec (h i <| Set.mem_univ i)).left\n[GOAL]\ncase refine'_2\nK : Type u_1\n\u03b9 : Type u_2\nR : \u03b9 \u2192 Type u_3\ninst\u271d : (i : \u03b9) \u2192 SMul K (R i)\nr : K\nt : (i : \u03b9) \u2192 Set (R i)\nx : (i : \u03b9) \u2192 R i\nh : x \u2208 pi univ (r \u2022 t)\ni : \u03b9\n\u22a2 (fun x => r \u2022 x) (fun i => Classical.choose (_ : x i \u2208 (r \u2022 t) i)) i = x i\n[PROOFSTEP]\nexact (Classical.choose_spec (h i <| Set.mem_univ i)).right\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.PointwisePi", "llama_tokens": 773, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438951104066295, "lm_q2_score": 0.8006920116079209, "lm_q1q2_score": 0.6757000735375727}}
{"text": "[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\n\u22a2 HasDerivAt (fun y => Complex.sin (2 * z * \u2191y) / (2 * z)) (Complex.cos (2 * z * \u2191x)) x\n[PROOFSTEP]\nhave a : HasDerivAt (fun y : \u2102 => y * (2 * z)) _ x := hasDerivAt_mul_const _\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\n\u22a2 HasDerivAt (fun y => Complex.sin (2 * z * \u2191y) / (2 * z)) (Complex.cos (2 * z * \u2191x)) x\n[PROOFSTEP]\nhave b : HasDerivAt (fun y : \u2102 => Complex.sin (y * (2 * z))) _ x :=\n  HasDerivAt.comp (x : \u2102) (Complex.hasDerivAt_sin (x * (2 * z))) a\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.sin (y * (2 * z))) (Complex.cos (\u2191x * (2 * z)) * (2 * z)) \u2191x\n\u22a2 HasDerivAt (fun y => Complex.sin (2 * z * \u2191y) / (2 * z)) (Complex.cos (2 * z * \u2191x)) x\n[PROOFSTEP]\nhave c := b.comp_ofReal.div_const (2 * z)\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.sin (y * (2 * z))) (Complex.cos (\u2191x * (2 * z)) * (2 * z)) \u2191x\nc : HasDerivAt (fun x => Complex.sin (\u2191x * (2 * z)) / (2 * z)) (Complex.cos (\u2191x * (2 * z)) * (2 * z) / (2 * z)) x\n\u22a2 HasDerivAt (fun y => Complex.sin (2 * z * \u2191y) / (2 * z)) (Complex.cos (2 * z * \u2191x)) x\n[PROOFSTEP]\nfield_simp at c \n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.sin (y * (2 * z))) (Complex.cos (\u2191x * (2 * z)) * (2 * z)) \u2191x\nc : HasDerivAt (fun x => Complex.sin (\u2191x * (2 * z)) / (2 * z)) (Complex.cos (\u2191x * (2 * z))) x\n\u22a2 HasDerivAt (fun y => Complex.sin (2 * z * \u2191y) / (2 * z)) (Complex.cos (2 * z * \u2191x)) x\n[PROOFSTEP]\nsimp only [fun y => mul_comm y (2 * z)] at c \n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.sin (y * (2 * z))) (Complex.cos (\u2191x * (2 * z)) * (2 * z)) \u2191x\nc : HasDerivAt (fun x => Complex.sin (2 * z * \u2191x) / (2 * z)) (Complex.cos (2 * z * \u2191x)) x\n\u22a2 HasDerivAt (fun y => Complex.sin (2 * z * \u2191y) / (2 * z)) (Complex.cos (2 * z * \u2191x)) x\n[PROOFSTEP]\nexact c\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\n\u22a2 HasDerivAt (fun y => -Complex.cos (2 * z * \u2191y) / (2 * z)) (Complex.sin (2 * z * \u2191x)) x\n[PROOFSTEP]\nhave a : HasDerivAt (fun y : \u2102 => y * (2 * z)) _ x := hasDerivAt_mul_const _\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\n\u22a2 HasDerivAt (fun y => -Complex.cos (2 * z * \u2191y) / (2 * z)) (Complex.sin (2 * z * \u2191x)) x\n[PROOFSTEP]\nhave b : HasDerivAt (fun y : \u2102 => Complex.cos (y * (2 * z))) _ x :=\n  HasDerivAt.comp (x : \u2102) (Complex.hasDerivAt_cos (x * (2 * z))) a\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.cos (y * (2 * z))) (-Complex.sin (\u2191x * (2 * z)) * (2 * z)) \u2191x\n\u22a2 HasDerivAt (fun y => -Complex.cos (2 * z * \u2191y) / (2 * z)) (Complex.sin (2 * z * \u2191x)) x\n[PROOFSTEP]\nhave c := (b.comp_ofReal.div_const (2 * z)).neg\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.cos (y * (2 * z))) (-Complex.sin (\u2191x * (2 * z)) * (2 * z)) \u2191x\nc : HasDerivAt (fun x => -(Complex.cos (\u2191x * (2 * z)) / (2 * z))) (-(-Complex.sin (\u2191x * (2 * z)) * (2 * z) / (2 * z))) x\n\u22a2 HasDerivAt (fun y => -Complex.cos (2 * z * \u2191y) / (2 * z)) (Complex.sin (2 * z * \u2191x)) x\n[PROOFSTEP]\nfield_simp at c \n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.cos (y * (2 * z))) (-Complex.sin (\u2191x * (2 * z)) * (2 * z)) \u2191x\nc : HasDerivAt (fun x => -Complex.cos (\u2191x * (2 * z)) / (2 * z)) (Complex.sin (\u2191x * (2 * z))) x\n\u22a2 HasDerivAt (fun y => -Complex.cos (2 * z * \u2191y) / (2 * z)) (Complex.sin (2 * z * \u2191x)) x\n[PROOFSTEP]\nsimp only [fun y => mul_comm y (2 * z)] at c \n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nx : \u211d\na : HasDerivAt (fun y => y * (2 * z)) (2 * z) \u2191x\nb : HasDerivAt (fun y => Complex.cos (y * (2 * z))) (-Complex.sin (\u2191x * (2 * z)) * (2 * z)) \u2191x\nc : HasDerivAt (fun x => -Complex.cos (2 * z * \u2191x) / (2 * z)) (Complex.sin (2 * z * \u2191x)) x\n\u22a2 HasDerivAt (fun y => -Complex.cos (2 * z * \u2191y) / (2 * z)) (Complex.sin (2 * z * \u2191x)) x\n[PROOFSTEP]\nexact c\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    \u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1)\n[PROOFSTEP]\nhave der1 :\n  \u2200 x : \u211d, x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y : \u211d => (cos y : \u2102) ^ n) (-n * sin x * (cos x : \u2102) ^ (n - 1)) x :=\n  by\n  intro x _\n  have b : HasDerivAt (fun y : \u211d => (cos y : \u2102)) (-sin x) x := by simpa using (hasDerivAt_cos x).ofReal_comp\n  convert HasDerivAt.comp x (hasDerivAt_pow _ _) b using 1\n  ring\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\n\u22a2 \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n[PROOFSTEP]\nintro x _\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n[PROOFSTEP]\nhave b : HasDerivAt (fun y : \u211d => (cos y : \u2102)) (-sin x) x := by simpa using (hasDerivAt_cos x).ofReal_comp\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 HasDerivAt (fun y => \u2191(cos y)) (-\u2191(sin x)) x\n[PROOFSTEP]\nsimpa using (hasDerivAt_cos x).ofReal_comp\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nb : HasDerivAt (fun y => \u2191(cos y)) (-\u2191(sin x)) x\n\u22a2 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n[PROOFSTEP]\nconvert HasDerivAt.comp x (hasDerivAt_pow _ _) b using 1\n[GOAL]\ncase h.e'_7\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nb : HasDerivAt (fun y => \u2191(cos y)) (-\u2191(sin x)) x\n\u22a2 -\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1) = \u2191n * \u2191(cos x) ^ (n - 1) * -\u2191(sin x)\n[PROOFSTEP]\nring\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    \u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1)\n[PROOFSTEP]\nconvert (config := { sameFun := true })\n  integral_mul_deriv_eq_deriv_mul der1 (fun x _ => antideriv_cos_comp_const_mul hz x) _ _ using 2\n[GOAL]\ncase h.e'_2.h.e'_4\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 (fun x => Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) = fun x => \u2191(cos x) ^ n * Complex.cos (2 * z * \u2191x)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_2.h.e'_4.h\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\nx : \u211d\n\u22a2 Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n = \u2191(cos x) ^ n * Complex.cos (2 * z * \u2191x)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 \u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1) =\n    \u2191(cos (\u03c0 / 2)) ^ n * (Complex.sin (2 * z * \u2191(\u03c0 / 2)) / (2 * z)) -\n        \u2191(cos 0) ^ n * (Complex.sin (2 * z * \u21910) / (2 * z)) -\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, -\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1) * (Complex.sin (2 * z * \u2191x) / (2 * z))\n[PROOFSTEP]\nrw [Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div, mul_zero, sub_zero, cos_pi_div_two, Complex.ofReal_zero,\n  zero_pow (by positivity : 0 < n), zero_mul, zero_sub, \u2190 integral_neg, \u2190 integral_const_mul]\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 0 < n\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, \u2191n / (2 * z) * (Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) =\n    \u222b (x : \u211d) in 0 ..\u03c0 / 2, -(-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1) * (Complex.sin (2 * z * \u2191x) / (2 * z)))\n[PROOFSTEP]\nrefine' integral_congr fun x _ => _\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 \u2191n / (2 * z) * (Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) =\n    -(-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1) * (Complex.sin (2 * z * \u2191x) / (2 * z)))\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 \u2191n * (Complex.sin (2 * z * \u2191x) * Complex.sin \u2191x * Complex.cos \u2191x ^ (n - 1)) =\n    \u2191n * Complex.sin \u2191x * Complex.cos \u2191x ^ (n - 1) * Complex.sin (2 * z * \u2191x)\n[PROOFSTEP]\nring\n[GOAL]\ncase convert_1\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 IntervalIntegrable (fun x => -\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) volume 0 (\u03c0 / 2)\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase convert_1.hu\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 Continuous fun x => -\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)\n[PROOFSTEP]\nexact\n  (continuous_const.mul (Complex.continuous_ofReal.comp continuous_sin)).mul\n    ((Complex.continuous_ofReal.comp continuous_cos).pow (n - 1))\n[GOAL]\ncase convert_2\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 IntervalIntegrable (fun x => Complex.cos (2 * z * \u2191x)) volume 0 (\u03c0 / 2)\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase convert_2.hu\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 : \u2200 (x : \u211d), x \u2208 uIcc 0 (\u03c0 / 2) \u2192 HasDerivAt (fun y => \u2191(cos y) ^ n) (-\u2191n * \u2191(sin x) * \u2191(cos x) ^ (n - 1)) x\n\u22a2 Continuous fun x => Complex.cos (2 * z * \u2191x)\n[PROOFSTEP]\nexact Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1) =\n    (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      (\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)\n[PROOFSTEP]\nhave der1 :\n  \u2200 x : \u211d,\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y : \u211d => sin y * (cos y : \u2102) ^ (n - 1))\n        ((cos x : \u2102) ^ n - (n - 1) * (sin x : \u2102) ^ 2 * (cos x : \u2102) ^ (n - 2)) x :=\n  by\n  intro x _\n  have c := HasDerivAt.comp (x : \u2102) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)\n  convert ((Complex.hasDerivAt_sin x).mul c).comp_ofReal using 1\n  \u00b7 ext1 y; simp only [Complex.ofReal_sin, Complex.ofReal_cos, Function.comp]\n  \u00b7 simp only [Complex.ofReal_cos, Complex.ofReal_sin]\n    rw [mul_neg, mul_neg, \u2190 sub_eq_add_neg, Function.comp_apply]\n    congr 1\n    \u00b7 rw [\u2190 pow_succ, Nat.sub_add_cancel (by linarith : 1 \u2264 n)]\n    \u00b7 have : ((n - 1 : \u2115) : \u2102) = (n : \u2102) - 1 := by rw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]\n      rw [Nat.sub_sub, this]\n      ring\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\n\u22a2 \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n[PROOFSTEP]\nintro x _\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) x\n[PROOFSTEP]\nhave c := HasDerivAt.comp (x : \u2102) (hasDerivAt_pow (n - 1) _) (Complex.hasDerivAt_cos x)\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) x\n[PROOFSTEP]\nconvert ((Complex.hasDerivAt_sin x).mul c).comp_ofReal using 1\n[GOAL]\ncase h.e'_6\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) = fun y => Complex.sin \u2191y * ((fun x => x ^ (n - 1)) \u2218 Complex.cos) \u2191y\n[PROOFSTEP]\next1 y\n[GOAL]\ncase h.e'_6.h\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\ny : \u211d\n\u22a2 \u2191(sin y) * \u2191(cos y) ^ (n - 1) = Complex.sin \u2191y * ((fun x => x ^ (n - 1)) \u2218 Complex.cos) \u2191y\n[PROOFSTEP]\nsimp only [Complex.ofReal_sin, Complex.ofReal_cos, Function.comp]\n[GOAL]\ncase h.e'_7\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 \u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2) =\n    Complex.cos \u2191x * ((fun x => x ^ (n - 1)) \u2218 Complex.cos) \u2191x +\n      Complex.sin \u2191x * (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x)\n[PROOFSTEP]\nsimp only [Complex.ofReal_cos, Complex.ofReal_sin]\n[GOAL]\ncase h.e'_7\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 Complex.cos \u2191x ^ n - (\u2191n - \u21911) * Complex.sin \u2191x ^ 2 * Complex.cos \u2191x ^ (n - 2) =\n    Complex.cos \u2191x * ((fun x => x ^ (n - 1)) \u2218 Complex.cos) \u2191x +\n      Complex.sin \u2191x * (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x)\n[PROOFSTEP]\nrw [mul_neg, mul_neg, \u2190 sub_eq_add_neg, Function.comp_apply]\n[GOAL]\ncase h.e'_7\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 Complex.cos \u2191x ^ n - (\u2191n - \u21911) * Complex.sin \u2191x ^ 2 * Complex.cos \u2191x ^ (n - 2) =\n    Complex.cos \u2191x * Complex.cos \u2191x ^ (n - 1) -\n      Complex.sin \u2191x * (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * Complex.sin \u2191x)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_7.e_a\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 Complex.cos \u2191x ^ n = Complex.cos \u2191x * Complex.cos \u2191x ^ (n - 1)\n[PROOFSTEP]\nrw [\u2190 pow_succ, Nat.sub_add_cancel (by linarith : 1 \u2264 n)]\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 1 \u2264 n\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.e'_7.e_a\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 (\u2191n - \u21911) * Complex.sin \u2191x ^ 2 * Complex.cos \u2191x ^ (n - 2) =\n    Complex.sin \u2191x * (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * Complex.sin \u2191x)\n[PROOFSTEP]\nhave : ((n - 1 : \u2115) : \u2102) = (n : \u2102) - 1 := by rw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\n\u22a2 \u2191(n - 1) = \u2191n - 1\n[PROOFSTEP]\nrw [Nat.cast_sub (one_le_two.trans hn), Nat.cast_one]\n[GOAL]\ncase h.e'_7.e_a\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\nthis : \u2191(n - 1) = \u2191n - 1\n\u22a2 (\u2191n - \u21911) * Complex.sin \u2191x ^ 2 * Complex.cos \u2191x ^ (n - 2) =\n    Complex.sin \u2191x * (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * Complex.sin \u2191x)\n[PROOFSTEP]\nrw [Nat.sub_sub, this]\n[GOAL]\ncase h.e'_7.e_a\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nx : \u211d\na\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nc : HasDerivAt ((fun x => x ^ (n - 1)) \u2218 Complex.cos) (\u2191(n - 1) * Complex.cos \u2191x ^ (n - 1 - 1) * -Complex.sin \u2191x) \u2191x\nthis : \u2191(n - 1) = \u2191n - 1\n\u22a2 (\u2191n - \u21911) * Complex.sin \u2191x ^ 2 * Complex.cos \u2191x ^ (n - 2) =\n    Complex.sin \u2191x * ((\u2191n - 1) * Complex.cos \u2191x ^ (n - (1 + 1)) * Complex.sin \u2191x)\n[PROOFSTEP]\nring\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1) =\n    (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      (\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)\n[PROOFSTEP]\nconvert integral_mul_deriv_eq_deriv_mul der1 (fun x _ => antideriv_sin_comp_const_mul hz x) _ _ using 1\n[GOAL]\ncase h.e'_2\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1) =\n    \u222b (x : \u211d) in 0 ..\u03c0 / 2, \u2191(sin x) * \u2191(cos x) ^ (n - 1) * Complex.sin (2 * z * \u2191x)\n[PROOFSTEP]\nrefine' integral_congr fun x _ => _\n[GOAL]\ncase h.e'_2\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1) = \u2191(sin x) * \u2191(cos x) ^ (n - 1) * Complex.sin (2 * z * \u2191x)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      (\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2) =\n    \u2191(sin (\u03c0 / 2)) * \u2191(cos (\u03c0 / 2)) ^ (n - 1) * (-Complex.cos (2 * z * \u2191(\u03c0 / 2)) / (2 * z)) -\n        \u2191(sin 0) * \u2191(cos 0) ^ (n - 1) * (-Complex.cos (2 * z * \u21910) / (2 * z)) -\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2,\n        (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) * (-Complex.cos (2 * z * \u2191x) / (2 * z))\n[PROOFSTEP]\nrw [sin_zero, cos_pi_div_two, Complex.ofReal_zero, zero_pow, zero_mul, mul_zero, zero_mul, zero_mul, sub_zero, zero_sub,\n  \u2190 integral_neg, \u2190 integral_const_mul, \u2190 integral_const_mul, \u2190 integral_sub]\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2,\n      \u2191n / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n        (\u2191n - 1) / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)) =\n    \u222b (x : \u211d) in 0 ..\u03c0 / 2,\n      -((\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) * (-Complex.cos (2 * z * \u2191x) / (2 * z)))\ncase h.e'_3.hf\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 IntervalIntegrable (fun x => \u2191n / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n)) volume 0 (\u03c0 / 2)\ncase h.e'_3.hg\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 IntervalIntegrable (fun x => (\u2191n - 1) / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))) volume 0 (\u03c0 / 2)\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 0 < n - 1\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase h.e'_3.hf\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 IntervalIntegrable (fun x => \u2191n / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n)) volume 0 (\u03c0 / 2)\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase h.e'_3.hf.hu\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 Continuous fun x => \u2191n / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n)\n[PROOFSTEP]\nexact\n  continuous_const.mul\n    ((Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).mul\n      ((Complex.continuous_ofReal.comp continuous_cos).pow n))\n[GOAL]\ncase h.e'_3.hg\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 IntervalIntegrable (fun x => (\u2191n - 1) / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))) volume 0 (\u03c0 / 2)\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase h.e'_3.hg.hu\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 Continuous fun x => (\u2191n - 1) / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))\n[PROOFSTEP]\nexact\n  continuous_const.mul\n    ((Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).mul\n      ((Complex.continuous_ofReal.comp continuous_cos).pow (n - 2)))\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 0 < n - 1\n[PROOFSTEP]\napply Nat.sub_pos_of_lt\n[GOAL]\ncase h.e'_3.h\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 1 < n\n[PROOFSTEP]\nexact one_lt_two.trans_le hn\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2,\n      \u2191n / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n        (\u2191n - 1) / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)) =\n    \u222b (x : \u211d) in 0 ..\u03c0 / 2,\n      -((\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) * (-Complex.cos (2 * z * \u2191x) / (2 * z)))\n[PROOFSTEP]\nrefine' integral_congr fun x _ => _\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 \u2191n / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      (\u2191n - 1) / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)) =\n    -((\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) * (-Complex.cos (2 * z * \u2191x) / (2 * z)))\n[PROOFSTEP]\ndsimp only\n  -- get rid of real trig functions and divisions by 2 * z:\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 \u2191n / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      (\u2191n - 1) / (2 * z) * (Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)) =\n    -((\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) * (-Complex.cos (2 * z * \u2191x) / (2 * z)))\n[PROOFSTEP]\nrw [Complex.ofReal_cos, Complex.ofReal_sin, Complex.sin_sq, \u2190 mul_div_right_comm, \u2190 mul_div_right_comm, \u2190 sub_div,\n  mul_div, \u2190 neg_div]\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 (\u2191n * (Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ n) -\n        (\u2191n - 1) * (Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (n - 2))) /\n      (2 * z) =\n    -((Complex.cos \u2191x ^ n - (\u2191n - \u21911) * (1 - Complex.cos \u2191x ^ 2) * Complex.cos \u2191x ^ (n - 2)) *\n          -Complex.cos (2 * z * \u2191x)) /\n      (2 * z)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.e_a\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 \u2191n * (Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ n) -\n      (\u2191n - 1) * (Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (n - 2)) =\n    -((Complex.cos \u2191x ^ n - (\u2191n - \u21911) * (1 - Complex.cos \u2191x ^ 2) * Complex.cos \u2191x ^ (n - 2)) *\n        -Complex.cos (2 * z * \u2191x))\n[PROOFSTEP]\nhave : Complex.cos x ^ n = Complex.cos x ^ (n - 2) * Complex.cos x ^ 2 := by\n  conv_lhs => rw [\u2190 Nat.sub_add_cancel hn, pow_add]\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 Complex.cos \u2191x ^ n = Complex.cos \u2191x ^ (n - 2) * Complex.cos \u2191x ^ 2\n[PROOFSTEP]\nconv_lhs => rw [\u2190 Nat.sub_add_cancel hn, pow_add]\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n| Complex.cos \u2191x ^ n\n[PROOFSTEP]\nrw [\u2190 Nat.sub_add_cancel hn, pow_add]\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n| Complex.cos \u2191x ^ n\n[PROOFSTEP]\nrw [\u2190 Nat.sub_add_cancel hn, pow_add]\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n| Complex.cos \u2191x ^ n\n[PROOFSTEP]\nrw [\u2190 Nat.sub_add_cancel hn, pow_add]\n[GOAL]\ncase h.e'_3.e_a\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nthis : Complex.cos \u2191x ^ n = Complex.cos \u2191x ^ (n - 2) * Complex.cos \u2191x ^ 2\n\u22a2 \u2191n * (Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ n) -\n      (\u2191n - 1) * (Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (n - 2)) =\n    -((Complex.cos \u2191x ^ n - (\u2191n - \u21911) * (1 - Complex.cos \u2191x ^ 2) * Complex.cos \u2191x ^ (n - 2)) *\n        -Complex.cos (2 * z * \u2191x))\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h.e'_3.e_a\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\nthis : Complex.cos \u2191x ^ n = Complex.cos \u2191x ^ (n - 2) * Complex.cos \u2191x ^ 2\n\u22a2 \u2191n * (Complex.cos (2 * z * \u2191x) * (Complex.cos \u2191x ^ (n - 2) * Complex.cos \u2191x ^ 2)) -\n      (\u2191n - 1) * (Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (n - 2)) =\n    -((Complex.cos \u2191x ^ (n - 2) * Complex.cos \u2191x ^ 2 -\n          (\u2191n - \u21911) * (1 - Complex.cos \u2191x ^ 2) * Complex.cos \u2191x ^ (n - 2)) *\n        -Complex.cos (2 * z * \u2191x))\n[PROOFSTEP]\nring\n[GOAL]\ncase convert_1\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 IntervalIntegrable (fun x => \u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)) volume 0 (\u03c0 / 2)\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase convert_1.hu\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 Continuous fun x => \u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2)\n[PROOFSTEP]\nexact\n  ((Complex.continuous_ofReal.comp continuous_cos).pow n).sub\n    ((continuous_const.mul ((Complex.continuous_ofReal.comp continuous_sin).pow 2)).mul\n      ((Complex.continuous_ofReal.comp continuous_cos).pow (n - 2)))\n[GOAL]\ncase convert_2\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 IntervalIntegrable (fun x => Complex.sin (2 * z * \u2191x)) volume 0 (\u03c0 / 2)\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase convert_2.hu\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nder1 :\n  \u2200 (x : \u211d),\n    x \u2208 uIcc 0 (\u03c0 / 2) \u2192\n      HasDerivAt (fun y => \u2191(sin y) * \u2191(cos y) ^ (n - 1)) (\u2191(cos x) ^ n - (\u2191n - \u21911) * \u2191(sin x) ^ 2 * \u2191(cos x) ^ (n - 2))\n        x\n\u22a2 Continuous fun x => Complex.sin (2 * z * \u2191x)\n[PROOFSTEP]\nexact Complex.continuous_sin.comp (continuous_const.mul Complex.continuous_ofReal)\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\n\u22a2 (1 - 4 * z ^ 2 / \u2191n ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    (\u2191n - 1) / \u2191n * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)\n[PROOFSTEP]\nhave nne : (n : \u2102) \u2260 0 := by contrapose! hn; rw [Nat.cast_eq_zero] at hn ; rw [hn]; exact zero_lt_two\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\n\u22a2 \u2191n \u2260 0\n[PROOFSTEP]\ncontrapose! hn\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nhn : \u2191n = 0\n\u22a2 n < 2\n[PROOFSTEP]\nrw [Nat.cast_eq_zero] at hn \n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nhn : n = 0\n\u22a2 n < 2\n[PROOFSTEP]\nrw [hn]\n[GOAL]\nz : \u2102\nn : \u2115\nhz : z \u2260 0\nhn : n = 0\n\u22a2 0 < 2\n[PROOFSTEP]\nexact zero_lt_two\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nnne : \u2191n \u2260 0\n\u22a2 (1 - 4 * z ^ 2 / \u2191n ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    (\u2191n - 1) / \u2191n * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)\n[PROOFSTEP]\nhave := integral_cos_mul_cos_pow_aux hn hz\n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nnne : \u2191n \u2260 0\nthis :\n  \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    \u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.sin (2 * z * \u2191x) * \u2191(sin x) * \u2191(cos x) ^ (n - 1)\n\u22a2 (1 - 4 * z ^ 2 / \u2191n ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    (\u2191n - 1) / \u2191n * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)\n[PROOFSTEP]\nrw [integral_sin_mul_sin_mul_cos_pow_eq hn hz, sub_eq_neg_add, mul_add, \u2190 sub_eq_iff_eq_add] at this \n[GOAL]\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nnne : \u2191n \u2260 0\nthis :\n  (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      \u2191n / (2 * z) * (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) =\n    \u2191n / (2 * z) * -((\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))\n\u22a2 (1 - 4 * z ^ 2 / \u2191n ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    (\u2191n - 1) / \u2191n * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2)\n[PROOFSTEP]\nconvert congr_arg (fun u : \u2102 => -u * (2 * z) ^ 2 / n ^ 2) this using 1\n[GOAL]\ncase h.e'_2\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nnne : \u2191n \u2260 0\nthis :\n  (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      \u2191n / (2 * z) * (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) =\n    \u2191n / (2 * z) * -((\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))\n\u22a2 (1 - 4 * z ^ 2 / \u2191n ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n =\n    -((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n            \u2191n / (2 * z) * (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n)) *\n        (2 * z) ^ 2 /\n      \u2191(n ^ 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nnne : \u2191n \u2260 0\nthis :\n  (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      \u2191n / (2 * z) * (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) =\n    \u2191n / (2 * z) * -((\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))\n\u22a2 (\u2191n - 1) / \u2191n * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2) =\n    -(\u2191n / (2 * z) * -((\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))) *\n        (2 * z) ^ 2 /\n      \u2191(n ^ 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_2\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nnne : \u2191n \u2260 0\nthis :\n  (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      \u2191n / (2 * z) * (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) =\n    \u2191n / (2 * z) * -((\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))\n\u22a2 ((\u2191n ^ 2 - 4 * z ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ n) *\n      (2 * z * (2 * z) * \u2191n ^ 2) =\n    (\u2191n * (\u2191n * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ n) -\n          (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ n) * (2 * z * (2 * z))) *\n        (2 * z) ^ 2 *\n      \u2191n ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3\nz : \u2102\nn : \u2115\nhn : 2 \u2264 n\nhz : z \u2260 0\nnne : \u2191n \u2260 0\nthis :\n  (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) -\n      \u2191n / (2 * z) * (\u2191n / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) =\n    \u2191n / (2 * z) * -((\u2191n - 1) / (2 * z) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (n - 2))\n\u22a2 ((\u2191n - 1) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (n - 2)) *\n      (2 * z * (2 * z) * \u2191n ^ 2) =\n    \u2191n * ((\u2191n - 1) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (n - 2)) * (2 * z) ^ 2 * \u2191n\n[PROOFSTEP]\nring\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 (1 - z ^ 2 / (\u2191n + 1) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n + 2) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\n[PROOFSTEP]\nconvert integral_cos_mul_cos_pow (by linarith : 2 \u2264 2 * n + 2) hz using 3\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 2 \u2264 2 * n + 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_6\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 z ^ 2 / (\u2191n + 1) ^ 2 = 4 * z ^ 2 / \u2191(2 * n + 2) ^ 2\n[PROOFSTEP]\nsimp only [Nat.cast_add, Nat.cast_mul, Nat.cast_two]\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_6\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 z ^ 2 / (\u2191n + 1) ^ 2 = 4 * z ^ 2 / (2 * \u2191n + 2) ^ 2\n[PROOFSTEP]\nnth_rw 2 [\u2190 mul_one (2 : \u2102)]\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_6\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 z ^ 2 / (\u2191n + 1) ^ 2 = 4 * z ^ 2 / (2 * \u2191n + 2 * 1) ^ 2\n[PROOFSTEP]\nrw [\u2190 mul_add, mul_pow, \u2190 div_div]\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_6\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 z ^ 2 / (\u2191n + 1) ^ 2 = 4 * z ^ 2 / 2 ^ 2 / (\u2191n + 1) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_5\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 2 * \u2191n + 1 = \u2191(2 * n + 2) - 1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_5\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 2 * \u2191n + 1 = 2 * \u2191n + 2 - 1\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_6\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 2 * \u2191n + 2 = \u2191(2 * n + 2)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_6\nz : \u2102\nn\u271d n : \u2115\nhz : z \u2260 0\n\u22a2 2 * \u2191n + 2 = 2 * \u2191n + 2\n[PROOFSTEP]\nring\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = 1 / 2 * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ n\n[PROOFSTEP]\nrw [mul_comm (1 / 2 : \u211d), \u2190 div_eq_iff (one_div_ne_zero (two_ne_zero' \u211d)), \u2190 div_mul, div_one, mul_two]\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\n\u22a2 (\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n) + \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ n\n[PROOFSTEP]\nhave L : IntervalIntegrable _ volume 0 (\u03c0 / 2) := (continuous_sin.pow n).intervalIntegrable _ _\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\n\u22a2 (\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n) + \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ n\n[PROOFSTEP]\nhave R : IntervalIntegrable _ volume (\u03c0 / 2) \u03c0 := (continuous_sin.pow n).intervalIntegrable _ _\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 (\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n) + \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ n\n[PROOFSTEP]\nrw [\u2190 integral_add_adjacent_intervals L R]\n  -- Porting note: was `congr 1` but it timeouts\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 (\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n) + \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n =\n    (\u222b (x : \u211d) in 0 ..\u03c0 / 2, sin x ^ n) + \u222b (x : \u211d) in \u03c0 / 2 ..\u03c0, sin x ^ n\n[PROOFSTEP]\nrefine congr_arg\u2082 _ ?_ ?_\n[GOAL]\ncase refine_1\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in 0 ..\u03c0 / 2, sin x ^ n\n[PROOFSTEP]\nnth_rw 1 [(by ring : 0 = \u03c0 / 2 - \u03c0 / 2)]\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 0 = \u03c0 / 2 - \u03c0 / 2\n[PROOFSTEP]\nring\n[GOAL]\ncase refine_1\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in \u03c0 / 2 - \u03c0 / 2 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in 0 ..\u03c0 / 2, sin x ^ n\n[PROOFSTEP]\nnth_rw 3 [(by ring : \u03c0 / 2 = \u03c0 / 2 - 0)]\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u03c0 / 2 = \u03c0 / 2 - 0\n[PROOFSTEP]\nring\n[GOAL]\ncase refine_1\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in \u03c0 / 2 - \u03c0 / 2 ..\u03c0 / 2 - 0, cos x ^ n = \u222b (x : \u211d) in 0 ..\u03c0 / 2, sin x ^ n\n[PROOFSTEP]\nrw [\u2190 integral_comp_sub_left]\n[GOAL]\ncase refine_1\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos (\u03c0 / 2 - x) ^ n = \u222b (x : \u211d) in 0 ..\u03c0 / 2, sin x ^ n\n[PROOFSTEP]\nrefine' integral_congr fun x _ => _\n[GOAL]\ncase refine_1\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 cos (\u03c0 / 2 - x) ^ n = sin x ^ n\n[PROOFSTEP]\nrw [cos_pi_div_two_sub]\n[GOAL]\ncase refine_2\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in \u03c0 / 2 ..\u03c0, sin x ^ n\n[PROOFSTEP]\nnth_rw 3 [(by ring : \u03c0 = \u03c0 / 2 + \u03c0 / 2)]\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u03c0 = \u03c0 / 2 + \u03c0 / 2\n[PROOFSTEP]\nring\n[GOAL]\ncase refine_2\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in \u03c0 / 2 ..\u03c0 / 2 + \u03c0 / 2, sin x ^ n\n[PROOFSTEP]\nnth_rw 2 [(by ring : \u03c0 / 2 = 0 + \u03c0 / 2)]\n[GOAL]\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u03c0 / 2 = 0 + \u03c0 / 2\n[PROOFSTEP]\nring\n[GOAL]\ncase refine_2\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in 0 + \u03c0 / 2 ..\u03c0 / 2 + \u03c0 / 2, sin x ^ n\n[PROOFSTEP]\nrw [\u2190 integral_comp_add_right]\n[GOAL]\ncase refine_2\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n = \u222b (x : \u211d) in 0 ..\u03c0 / 2, sin (x + \u03c0 / 2) ^ n\n[PROOFSTEP]\nrefine' integral_congr fun x _ => _\n[GOAL]\ncase refine_2\nz : \u2102\nn\u271d n : \u2115\nL : IntervalIntegrable (fun b => sin b ^ n) volume 0 (\u03c0 / 2)\nR : IntervalIntegrable (fun b => sin b ^ n) volume (\u03c0 / 2) \u03c0\nx : \u211d\nx\u271d : x \u2208 uIcc 0 (\u03c0 / 2)\n\u22a2 cos x ^ n = sin (x + \u03c0 / 2) ^ n\n[PROOFSTEP]\nrw [sin_add_pi_div_two]\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nn : \u2115\n\u22a2 Complex.sin (\u2191\u03c0 * z) =\n    ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n[PROOFSTEP]\nrcases eq_or_ne z 0 with (rfl | hz)\n[GOAL]\ncase inl\nz : \u2102\nn\u271d n : \u2115\n\u22a2 Complex.sin (\u2191\u03c0 * 0) =\n    ((\u2191\u03c0 * 0 * \u220f j in Finset.range n, (1 - 0 ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * 0 * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nn : \u2115\nhz : z \u2260 0\n\u22a2 Complex.sin (\u2191\u03c0 * z) =\n    ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase inr.zero\nz\u271d : \u2102\nn : \u2115\nz : \u2102\nhz : z \u2260 0\n\u22a2 Complex.sin (\u2191\u03c0 * z) =\n    ((\u2191\u03c0 * z * \u220f j in Finset.range Nat.zero, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.zero)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.zero))\n[PROOFSTEP]\nsimp_rw [Nat.zero_eq, mul_zero, pow_zero, mul_one, Finset.prod_range_zero, mul_one, integral_one, sub_zero]\n[GOAL]\ncase inr.zero\nz\u271d : \u2102\nn : \u2115\nz : \u2102\nhz : z \u2260 0\n\u22a2 Complex.sin (\u2191\u03c0 * z) = (\u2191\u03c0 * z * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x)) / \u2191(\u03c0 / 2)\n[PROOFSTEP]\nrw [integral_cos_mul_complex (mul_ne_zero two_ne_zero hz), Complex.ofReal_zero, mul_zero, Complex.sin_zero, zero_div,\n  sub_zero, (by push_cast ; field_simp; ring : 2 * z * \u2191(\u03c0 / 2) = \u03c0 * z)]\n[GOAL]\nz\u271d : \u2102\nn : \u2115\nz : \u2102\nhz : z \u2260 0\n\u22a2 2 * z * \u2191(\u03c0 / 2) = \u2191\u03c0 * z\n[PROOFSTEP]\npush_cast\n[GOAL]\nz\u271d : \u2102\nn : \u2115\nz : \u2102\nhz : z \u2260 0\n\u22a2 2 * z * (\u2191\u03c0 / 2) = \u2191\u03c0 * z\n[PROOFSTEP]\nfield_simp\n[GOAL]\nz\u271d : \u2102\nn : \u2115\nz : \u2102\nhz : z \u2260 0\n\u22a2 2 * z * \u2191\u03c0 = \u2191\u03c0 * z * 2\n[PROOFSTEP]\nring\n[GOAL]\ncase inr.zero\nz\u271d : \u2102\nn : \u2115\nz : \u2102\nhz : z \u2260 0\n\u22a2 Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * (Complex.sin (\u2191\u03c0 * z) / (2 * z)) / \u2191(\u03c0 / 2)\n[PROOFSTEP]\nfield_simp [Complex.ofReal_ne_zero.mpr pi_pos.ne']\n[GOAL]\ncase inr.zero\nz\u271d : \u2102\nn : \u2115\nz : \u2102\nhz : z \u2260 0\n\u22a2 Complex.sin (\u2191\u03c0 * z) * (2 * z * \u2191\u03c0) = \u2191\u03c0 * z * Complex.sin (\u2191\u03c0 * z) * 2\n[PROOFSTEP]\nring\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nhn :\n  Complex.sin (\u2191\u03c0 * z) =\n    ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n\u22a2 Complex.sin (\u2191\u03c0 * z) =\n    ((\u2191\u03c0 * z * \u220f j in Finset.range (Nat.succ n), (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n))\n[PROOFSTEP]\nrw [hn, Finset.prod_range_succ]\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nhn :\n  Complex.sin (\u2191\u03c0 * z) =\n    ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n\u22a2 ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)) =\n    (\u2191\u03c0 * z * ((\u220f x in Finset.range n, (1 - z ^ 2 / (\u2191x + 1) ^ 2)) * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n))\n[PROOFSTEP]\nset A := \u220f j in Finset.range n, ((1 : \u2102) - z ^ 2 / ((j : \u2102) + 1) ^ 2)\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nhn :\n  Complex.sin (\u2191\u03c0 * z) =\n    (\u2191\u03c0 * z * A * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n\u22a2 (\u2191\u03c0 * z * A * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)) =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n))\n[PROOFSTEP]\nset B := \u222b x in (0 : \u211d)..\u03c0 / 2, Complex.cos (2 * z * x) * (cos x : \u2102) ^ (2 * n)\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n\u22a2 \u2191\u03c0 * z * A * B / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)) =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n))\n[PROOFSTEP]\nset C := \u222b x in (0 : \u211d)..\u03c0 / 2, cos x ^ (2 * n)\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n))\n[PROOFSTEP]\nhave aux' : 2 * n.succ = 2 * n + 2 := by rw [Nat.succ_eq_add_one, mul_add, mul_one]\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\n\u22a2 2 * Nat.succ n = 2 * n + 2\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, mul_add, mul_one]\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n))\n[PROOFSTEP]\nhave : (\u222b x in (0 : \u211d)..\u03c0 / 2, cos x ^ (2 * n.succ)) = (2 * (n : \u211d) + 1) / (2 * n + 2) * C :=\n  by\n  rw [integral_cos_pow_eq]\n  dsimp only\n  rw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ, zero_mul, zero_mul, zero_mul, sub_zero,\n    zero_div, zero_add, \u2190 mul_assoc, \u2190 mul_assoc, mul_comm (1 / 2 : \u211d) _, Nat.cast_mul, Nat.cast_eq_ofNat]\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n[PROOFSTEP]\nrw [integral_cos_pow_eq]\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\n\u22a2 1 / 2 * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n[PROOFSTEP]\ndsimp only\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\n\u22a2 1 / 2 * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\n[PROOFSTEP]\nrw [integral_cos_pow_eq, aux', integral_sin_pow, sin_zero, sin_pi, pow_succ, zero_mul, zero_mul, zero_mul, sub_zero,\n  zero_div, zero_add, \u2190 mul_assoc, \u2190 mul_assoc, mul_comm (1 / 2 : \u211d) _, Nat.cast_mul, Nat.cast_eq_ofNat]\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n))\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191((2 * \u2191n + 1) / (2 * \u2191n + 2) * C)\n[PROOFSTEP]\nchange\n  \u03c0 * z * A * B / C =\n    (\u03c0 * z * (A * ((1 : \u2102) - z ^ 2 / ((n : \u2102) + 1) ^ 2)) *\n        \u222b x in (0 : \u211d)..\u03c0 / 2, Complex.cos (2 * z * x) * (cos x : \u2102) ^ (2 * n.succ)) /\n      ((2 * n + 1) / (2 * n + 2) * C : \u211d)\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191((2 * \u2191n + 1) / (2 * \u2191n + 2) * C)\n[PROOFSTEP]\nhave :\n  (\u03c0 * z * (A * ((1 : \u2102) - z ^ 2 / ((n : \u2102) + 1) ^ 2)) *\n      \u222b x in (0 : \u211d)..\u03c0 / 2, Complex.cos (2 * z * x) * (cos x : \u2102) ^ (2 * n.succ)) =\n    \u03c0 * z * A *\n      (((1 : \u2102) - z ^ 2 / (n.succ : \u2102) ^ 2) *\n        \u222b x in (0 : \u211d)..\u03c0 / 2, Complex.cos (2 * z * x) * (cos x : \u2102) ^ (2 * n.succ)) :=\n  by\n  nth_rw 2 [Nat.succ_eq_add_one]\n  rw [Nat.cast_add_one]\n  ring\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n\u22a2 \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\n[PROOFSTEP]\nnth_rw 2 [Nat.succ_eq_add_one]\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n\u22a2 \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(n + 1) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\n[PROOFSTEP]\nrw [Nat.cast_add_one]\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\n\u22a2 \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / (\u2191n + 1) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\n[PROOFSTEP]\nring\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    (\u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191((2 * \u2191n + 1) / (2 * \u2191n + 2) * C)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    \u2191\u03c0 * z * A *\n        ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) *\n          \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191((2 * \u2191n + 1) / (2 * \u2191n + 2) * C)\n[PROOFSTEP]\nsuffices\n  (((1 : \u2102) - z ^ 2 / (n.succ : \u2102) ^ 2) * \u222b x in (0 : \u211d)..\u03c0 / 2, Complex.cos (2 * z * x) * (cos x : \u2102) ^ (2 * n.succ)) =\n    (2 * n + 1) / (2 * n + 2) * B\n  by\n  rw [this, Complex.ofReal_mul, Complex.ofReal_div]\n  have : (C : \u2102) \u2260 0 := Complex.ofReal_ne_zero.mpr (integral_cos_pow_pos _).ne'\n  have : 2 * (n : \u2102) + 1 \u2260 0 :=\n    by\n    convert (Nat.cast_add_one_ne_zero (2 * n) : (\u2191(2 * n) + 1 : \u2102) \u2260 0)\n    simp\n  have : 2 * (n : \u2102) + 2 \u2260 0 :=\n    by\n    convert (Nat.cast_add_one_ne_zero (2 * n + 1) : (\u2191(2 * n + 1) + 1 : \u2102) \u2260 0) using 1\n    push_cast ; ring\n  field_simp; ring\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b9 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C =\n    \u2191\u03c0 * z * A *\n        ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) *\n          \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n)) /\n      \u2191((2 * \u2191n + 1) / (2 * \u2191n + 2) * C)\n[PROOFSTEP]\nrw [this, Complex.ofReal_mul, Complex.ofReal_div]\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b9 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C = \u2191\u03c0 * z * A * ((2 * \u2191n + 1) / (2 * \u2191n + 2) * B) / (\u2191(2 * \u2191n + 1) / \u2191(2 * \u2191n + 2) * \u2191C)\n[PROOFSTEP]\nhave : (C : \u2102) \u2260 0 := Complex.ofReal_ne_zero.mpr (integral_cos_pow_pos _).ne'\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b2 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b9 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis : \u2191C \u2260 0\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C = \u2191\u03c0 * z * A * ((2 * \u2191n + 1) / (2 * \u2191n + 2) * B) / (\u2191(2 * \u2191n + 1) / \u2191(2 * \u2191n + 2) * \u2191C)\n[PROOFSTEP]\nhave : 2 * (n : \u2102) + 1 \u2260 0 :=\n  by\n  convert (Nat.cast_add_one_ne_zero (2 * n) : (\u2191(2 * n) + 1 : \u2102) \u2260 0)\n  simp\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b2 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b9 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis : \u2191C \u2260 0\n\u22a2 2 * \u2191n + 1 \u2260 0\n[PROOFSTEP]\nconvert (Nat.cast_add_one_ne_zero (2 * n) : (\u2191(2 * n) + 1 : \u2102) \u2260 0)\n[GOAL]\ncase h.e'_2.h.e'_5\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b2 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b9 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis : \u2191C \u2260 0\n\u22a2 2 * \u2191n = \u2191(2 * n)\n[PROOFSTEP]\nsimp\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b3 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b2 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d\u00b9 :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis\u271d : \u2191C \u2260 0\nthis : 2 * \u2191n + 1 \u2260 0\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C = \u2191\u03c0 * z * A * ((2 * \u2191n + 1) / (2 * \u2191n + 2) * B) / (\u2191(2 * \u2191n + 1) / \u2191(2 * \u2191n + 2) * \u2191C)\n[PROOFSTEP]\nhave : 2 * (n : \u2102) + 2 \u2260 0 :=\n  by\n  convert (Nat.cast_add_one_ne_zero (2 * n + 1) : (\u2191(2 * n + 1) + 1 : \u2102) \u2260 0) using 1\n  push_cast ; ring\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b3 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b2 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d\u00b9 :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis\u271d : \u2191C \u2260 0\nthis : 2 * \u2191n + 1 \u2260 0\n\u22a2 2 * \u2191n + 2 \u2260 0\n[PROOFSTEP]\nconvert (Nat.cast_add_one_ne_zero (2 * n + 1) : (\u2191(2 * n + 1) + 1 : \u2102) \u2260 0) using 1\n[GOAL]\ncase h.e'_2\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b3 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b2 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d\u00b9 :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis\u271d : \u2191C \u2260 0\nthis : 2 * \u2191n + 1 \u2260 0\n\u22a2 2 * \u2191n + 2 = \u2191(2 * n + 1) + 1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u00b3 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b2 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d\u00b9 :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis\u271d : \u2191C \u2260 0\nthis : 2 * \u2191n + 1 \u2260 0\n\u22a2 2 * \u2191n + 2 = 2 * \u2191n + 1 + 1\n[PROOFSTEP]\nring\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u2074 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b3 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d\u00b2 :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis\u271d\u00b9 : \u2191C \u2260 0\nthis\u271d : 2 * \u2191n + 1 \u2260 0\nthis : 2 * \u2191n + 2 \u2260 0\n\u22a2 \u2191\u03c0 * z * A * B / \u2191C = \u2191\u03c0 * z * A * ((2 * \u2191n + 1) / (2 * \u2191n + 2) * B) / (\u2191(2 * \u2191n + 1) / \u2191(2 * \u2191n + 2) * \u2191C)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d\u2074 : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis\u271d\u00b3 :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\nthis\u271d\u00b2 :\n  (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\nthis\u271d\u00b9 : \u2191C \u2260 0\nthis\u271d : 2 * \u2191n + 1 \u2260 0\nthis : 2 * \u2191n + 2 \u2260 0\n\u22a2 ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (2 * n)) *\n      ((2 * \u2191n + 1) * \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))) =\n    (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((2 * \u2191n + 1) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * Complex.cos \u2191x ^ (2 * n)) *\n      \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))\n[PROOFSTEP]\nring\n[GOAL]\ncase inr.succ\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\n\u22a2 (1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    (2 * \u2191n + 1) / (2 * \u2191n + 2) * B\n[PROOFSTEP]\nconvert integral_cos_mul_cos_pow_even n hz\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_6.h.e'_6.h.e'_5\nz\u271d : \u2102\nn\u271d : \u2115\nz : \u2102\nhz : z \u2260 0\nn : \u2115\nA : \u2102 := \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)\nB : \u2102 := \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)\nC : \u211d := \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)\nhn : Complex.sin (\u2191\u03c0 * z) = \u2191\u03c0 * z * A * B / \u2191C\naux' : 2 * Nat.succ n = 2 * n + 2\nthis\u271d : \u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * Nat.succ n) = (2 * \u2191n + 1) / (2 * \u2191n + 2) * C\nthis :\n  \u2191\u03c0 * z * (A * (1 - z ^ 2 / (\u2191n + 1) ^ 2)) *\n      \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n) =\n    \u2191\u03c0 * z * A *\n      ((1 - z ^ 2 / \u2191(Nat.succ n) ^ 2) * \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * Nat.succ n))\n\u22a2 \u2191(Nat.succ n) = \u2191n + 1\n[PROOFSTEP]\nrw [Nat.cast_succ]\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\n\u22a2 Tendsto (fun n => (\u222b (x : \u211d) in 0 ..\u03c0 / 2, \u2191(cos x) ^ n * f x) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n)) atTop (\ud835\udcdd (f 0))\n[PROOFSTEP]\nsimp_rw [div_eq_inv_mul (\u03b1 := \u2102), \u2190 Complex.ofReal_inv, integral_of_le pi_div_two_pos.le, \u2190\n  MeasureTheory.integral_Icc_eq_integral_Ioc, \u2190 Complex.ofReal_pow, \u2190 Complex.real_smul]\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\n\u22a2 Tendsto (fun n => (\u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n)\u207b\u00b9 \u2022 \u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n \u2022 f x) atTop\n    (\ud835\udcdd (f 0))\n[PROOFSTEP]\nhave c_lt : \u2200 y : \u211d, y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0 := fun y hy hy' =>\n  cos_lt_cos_of_nonneg_of_le_pi_div_two (le_refl 0) hy.2 (lt_of_le_of_ne hy.1 hy'.symm)\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\n\u22a2 Tendsto (fun n => (\u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n)\u207b\u00b9 \u2022 \u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n \u2022 f x) atTop\n    (\ud835\udcdd (f 0))\n[PROOFSTEP]\nhave c_nonneg : \u2200 x : \u211d, x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x := fun x hx =>\n  cos_nonneg_of_mem_Icc ((Icc_subset_Icc_left (neg_nonpos_of_nonneg pi_div_two_pos.le)) hx)\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\nc_nonneg : \u2200 (x : \u211d), x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x\n\u22a2 Tendsto (fun n => (\u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n)\u207b\u00b9 \u2022 \u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n \u2022 f x) atTop\n    (\ud835\udcdd (f 0))\n[PROOFSTEP]\nhave c_zero_pos : 0 < cos 0 := by rw [cos_zero]; exact zero_lt_one\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\nc_nonneg : \u2200 (x : \u211d), x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x\n\u22a2 0 < cos 0\n[PROOFSTEP]\nrw [cos_zero]\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\nc_nonneg : \u2200 (x : \u211d), x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x\n\u22a2 0 < 1\n[PROOFSTEP]\nexact zero_lt_one\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\nc_nonneg : \u2200 (x : \u211d), x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x\nc_zero_pos : 0 < cos 0\n\u22a2 Tendsto (fun n => (\u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n)\u207b\u00b9 \u2022 \u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n \u2022 f x) atTop\n    (\ud835\udcdd (f 0))\n[PROOFSTEP]\nhave zero_mem : (0 : \u211d) \u2208 closure (interior (Icc 0 (\u03c0 / 2))) :=\n  by\n  rw [interior_Icc, closure_Ioo pi_div_two_pos.ne, left_mem_Icc]\n  exact pi_div_two_pos.le\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\nc_nonneg : \u2200 (x : \u211d), x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x\nc_zero_pos : 0 < cos 0\n\u22a2 0 \u2208 closure (interior (Icc 0 (\u03c0 / 2)))\n[PROOFSTEP]\nrw [interior_Icc, closure_Ioo pi_div_two_pos.ne, left_mem_Icc]\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\nc_nonneg : \u2200 (x : \u211d), x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x\nc_zero_pos : 0 < cos 0\n\u22a2 0 \u2264 \u03c0 / 2\n[PROOFSTEP]\nexact pi_div_two_pos.le\n[GOAL]\nf : \u211d \u2192 \u2102\nhf : ContinuousOn f (Icc 0 (\u03c0 / 2))\nc_lt : \u2200 (y : \u211d), y \u2208 Icc 0 (\u03c0 / 2) \u2192 y \u2260 0 \u2192 cos y < cos 0\nc_nonneg : \u2200 (x : \u211d), x \u2208 Icc 0 (\u03c0 / 2) \u2192 0 \u2264 cos x\nc_zero_pos : 0 < cos 0\nzero_mem : 0 \u2208 closure (interior (Icc 0 (\u03c0 / 2)))\n\u22a2 Tendsto (fun n => (\u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n)\u207b\u00b9 \u2022 \u222b (x : \u211d) in Icc 0 (\u03c0 / 2), cos x ^ n \u2022 f x) atTop\n    (\ud835\udcdd (f 0))\n[PROOFSTEP]\nexact\n  tendsto_set_integral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn isCompact_Icc continuousOn_cos c_lt\n    c_nonneg c_zero_pos zero_mem hf\n[GOAL]\nz : \u2102\n\u22a2 Tendsto (fun n => \u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z)))\n[PROOFSTEP]\nhave A :\n  Tendsto\n    (fun n : \u2115 =>\n      ((\u03c0 * z * \u220f j in Finset.range n, ((1 : \u2102) - z ^ 2 / ((j : \u2102) + 1) ^ 2)) *\n          \u222b x in (0 : \u211d)..\u03c0 / 2, Complex.cos (2 * z * x) * (cos x : \u2102) ^ (2 * n)) /\n        (\u222b x in (0 : \u211d)..\u03c0 / 2, cos x ^ (2 * n) : \u211d))\n    atTop (\ud835\udcdd <| _) :=\n  Tendsto.congr (fun n => sin_pi_mul_eq z n) tendsto_const_nhds\n[GOAL]\nz : \u2102\nA :\n  Tendsto\n    (fun n =>\n      ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n          \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n        \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z)))\n\u22a2 Tendsto (fun n => \u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z)))\n[PROOFSTEP]\nhave : \ud835\udcdd (Complex.sin (\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u03c0 * z) * 1) := by rw [mul_one]\n[GOAL]\nz : \u2102\nA :\n  Tendsto\n    (fun n =>\n      ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n          \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n        \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z)))\n\u22a2 \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nz : \u2102\nA :\n  Tendsto\n    (fun n =>\n      ((\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n          \u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n        \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z)))\nthis : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\n\u22a2 Tendsto (fun n => \u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z)))\n[PROOFSTEP]\nsimp_rw [this, mul_div_assoc] at A \n[GOAL]\nz : \u2102\nthis : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\n\u22a2 Tendsto (fun n => \u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z)))\n[PROOFSTEP]\nconvert (tendsto_mul_iff_of_ne_zero _ one_ne_zero).mp A\n[GOAL]\nz : \u2102\nthis : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\n\u22a2 Tendsto\n    (fun n =>\n      (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n        \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)))\n    atTop (\ud835\udcdd 1)\n[PROOFSTEP]\nsuffices :\n  Tendsto\n    (fun n : \u2115 =>\n      (\u222b x in (0 : \u211d)..\u03c0 / 2, Complex.cos (2 * z * x) * (cos x : \u2102) ^ n) / (\u222b x in (0 : \u211d)..\u03c0 / 2, cos x ^ n : \u211d))\n    atTop (\ud835\udcdd 1)\n[GOAL]\nz : \u2102\nthis\u271d : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\nthis :\n  Tendsto\n    (fun n => (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n))\n    atTop (\ud835\udcdd 1)\n\u22a2 Tendsto\n    (fun n =>\n      (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n        \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n)))\n    atTop (\ud835\udcdd 1)\ncase this\nz : \u2102\nthis : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\n\u22a2 Tendsto\n    (fun n => (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n))\n    atTop (\ud835\udcdd 1)\n[PROOFSTEP]\nexact this.comp (tendsto_id.const_mul_atTop' zero_lt_two)\n[GOAL]\ncase this\nz : \u2102\nthis : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\n\u22a2 Tendsto\n    (fun n => (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n))\n    atTop (\ud835\udcdd 1)\n[PROOFSTEP]\nhave : ContinuousOn (fun x : \u211d => Complex.cos (2 * z * x)) (Icc 0 (\u03c0 / 2)) :=\n  (Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)).continuousOn\n[GOAL]\ncase this\nz : \u2102\nthis\u271d : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\nthis : ContinuousOn (fun x => Complex.cos (2 * z * \u2191x)) (Icc 0 (\u03c0 / 2))\n\u22a2 Tendsto\n    (fun n => (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n))\n    atTop (\ud835\udcdd 1)\n[PROOFSTEP]\nconvert tendsto_integral_cos_pow_mul_div this using 1\n[GOAL]\ncase h.e'_3\nz : \u2102\nthis\u271d : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\nthis : ContinuousOn (fun x => Complex.cos (2 * z * \u2191x)) (Icc 0 (\u03c0 / 2))\n\u22a2 (fun n => (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n)) =\n    fun n => (\u222b (x : \u211d) in 0 ..\u03c0 / 2, \u2191(cos x) ^ n * Complex.cos (2 * z * \u2191x)) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nz : \u2102\nthis\u271d : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\nthis : ContinuousOn (fun x => Complex.cos (2 * z * \u2191x)) (Icc 0 (\u03c0 / 2))\nn : \u2115\n\u22a2 (\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n) =\n    (\u222b (x : \u211d) in 0 ..\u03c0 / 2, \u2191(cos x) ^ n * Complex.cos (2 * z * \u2191x)) / \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ n)\n[PROOFSTEP]\ncongr 2 with x : 1\n[GOAL]\ncase h.e'_3.h.e_a.e_f.h\nz : \u2102\nthis\u271d : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\nthis : ContinuousOn (fun x => Complex.cos (2 * z * \u2191x)) (Icc 0 (\u03c0 / 2))\nn : \u2115\nx : \u211d\n\u22a2 Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ n = \u2191(cos x) ^ n * Complex.cos (2 * z * \u2191x)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase h.e'_5\nz : \u2102\nthis\u271d : \ud835\udcdd (Complex.sin (\u2191\u03c0 * z)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1)\nA :\n  Tendsto\n    (fun n =>\n      (\u2191\u03c0 * z * \u220f j in Finset.range n, (1 - z ^ 2 / (\u2191j + 1) ^ 2)) *\n        ((\u222b (x : \u211d) in 0 ..\u03c0 / 2, Complex.cos (2 * z * \u2191x) * \u2191(cos x) ^ (2 * n)) /\n          \u2191(\u222b (x : \u211d) in 0 ..\u03c0 / 2, cos x ^ (2 * n))))\n    atTop (\ud835\udcdd (Complex.sin (\u2191\u03c0 * z) * 1))\nthis : ContinuousOn (fun x => Complex.cos (2 * z * \u2191x)) (Icc 0 (\u03c0 / 2))\n\u22a2 \ud835\udcdd 1 = \ud835\udcdd (Complex.cos (2 * z * \u21910))\n[PROOFSTEP]\nrw [Complex.ofReal_zero, mul_zero, Complex.cos_zero]\n[GOAL]\nx : \u211d\n\u22a2 Tendsto (fun n => \u03c0 * x * \u220f j in Finset.range n, (1 - x ^ 2 / (\u2191j + 1) ^ 2)) atTop (\ud835\udcdd (sin (\u03c0 * x)))\n[PROOFSTEP]\nconvert (Complex.continuous_re.tendsto _).comp (Complex.tendsto_euler_sin_prod x) using 1\n[GOAL]\ncase h.e'_3\nx : \u211d\n\u22a2 (fun n => \u03c0 * x * \u220f j in Finset.range n, (1 - x ^ 2 / (\u2191j + 1) ^ 2)) =\n    Complex.re \u2218 fun n => \u2191\u03c0 * \u2191x * \u220f j in Finset.range n, (1 - \u2191x ^ 2 / (\u2191j + 1) ^ 2)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nx : \u211d\nn : \u2115\n\u22a2 \u03c0 * x * \u220f j in Finset.range n, (1 - x ^ 2 / (\u2191j + 1) ^ 2) =\n    (Complex.re \u2218 fun n => \u2191\u03c0 * \u2191x * \u220f j in Finset.range n, (1 - \u2191x ^ 2 / (\u2191j + 1) ^ 2)) n\n[PROOFSTEP]\nrw [Function.comp_apply, \u2190 Complex.ofReal_mul, Complex.ofReal_mul_re]\n[GOAL]\ncase h.e'_3.h\nx : \u211d\nn : \u2115\n\u22a2 \u03c0 * x * \u220f j in Finset.range n, (1 - x ^ 2 / (\u2191j + 1) ^ 2) =\n    \u03c0 * x * (\u220f j in Finset.range n, (1 - \u2191x ^ 2 / (\u2191j + 1) ^ 2)).re\n[PROOFSTEP]\nsuffices\n  (\u220f j : \u2115 in Finset.range n, ((1 : \u2102) - (x : \u2102) ^ 2 / ((j : \u2102) + 1) ^ 2)) =\n    (\u220f j : \u2115 in Finset.range n, ((1 : \u211d) - x ^ 2 / ((j : \u211d) + 1) ^ 2) : \u211d)\n  by rw [this, Complex.ofReal_re]\n[GOAL]\nx : \u211d\nn : \u2115\nthis : \u220f j in Finset.range n, (1 - \u2191x ^ 2 / (\u2191j + 1) ^ 2) = \u2191(\u220f j in Finset.range n, (1 - x ^ 2 / (\u2191j + 1) ^ 2))\n\u22a2 \u03c0 * x * \u220f j in Finset.range n, (1 - x ^ 2 / (\u2191j + 1) ^ 2) =\n    \u03c0 * x * (\u220f j in Finset.range n, (1 - \u2191x ^ 2 / (\u2191j + 1) ^ 2)).re\n[PROOFSTEP]\nrw [this, Complex.ofReal_re]\n[GOAL]\ncase h.e'_3.h\nx : \u211d\nn : \u2115\n\u22a2 \u220f j in Finset.range n, (1 - \u2191x ^ 2 / (\u2191j + 1) ^ 2) = \u2191(\u220f j in Finset.range n, (1 - x ^ 2 / (\u2191j + 1) ^ 2))\n[PROOFSTEP]\nrw [Complex.ofReal_prod]\n[GOAL]\ncase h.e'_3.h\nx : \u211d\nn : \u2115\n\u22a2 \u220f j in Finset.range n, (1 - \u2191x ^ 2 / (\u2191j + 1) ^ 2) = \u220f i in Finset.range n, \u2191(1 - x ^ 2 / (\u2191i + 1) ^ 2)\n[PROOFSTEP]\nrefine' Finset.prod_congr (by rfl) fun n _ => _\n[GOAL]\nx : \u211d\nn : \u2115\n\u22a2 Finset.range n = Finset.range n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h\nx : \u211d\nn\u271d n : \u2115\nx\u271d : n \u2208 Finset.range n\u271d\n\u22a2 1 - \u2191x ^ 2 / (\u2191n + 1) ^ 2 = \u2191(1 - x ^ 2 / (\u2191n + 1) ^ 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_5\nx : \u211d\n\u22a2 \ud835\udcdd (sin (\u03c0 * x)) = \ud835\udcdd (Complex.sin (\u2191\u03c0 * \u2191x)).re\n[PROOFSTEP]\nrw [\u2190 Complex.ofReal_mul, \u2190 Complex.ofReal_sin, Complex.ofReal_re]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd", "llama_tokens": 48905, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9086178944582997, "lm_q2_score": 0.74316801430083, "lm_q1q2_score": 0.6752557563827757}}
{"text": "[GOAL]\na b c d : \u2124\nhb : b \u2260 0\nhbc : b \u2223 c\nh : b * a = c * d\n\u22a2 a = c / b * d\n[PROOFSTEP]\ncases' hbc with k hk\n[GOAL]\ncase intro\na b c d : \u2124\nhb : b \u2260 0\nh : b * a = c * d\nk : \u2124\nhk : c = b * k\n\u22a2 a = c / b * d\n[PROOFSTEP]\nsubst hk\n[GOAL]\ncase intro\na b d : \u2124\nhb : b \u2260 0\nk : \u2124\nh : b * a = b * k * d\n\u22a2 a = b * k / b * d\n[PROOFSTEP]\nrw [Int.mul_ediv_cancel_left _ hb]\n[GOAL]\ncase intro\na b d : \u2124\nhb : b \u2260 0\nk : \u2124\nh : b * a = b * k * d\n\u22a2 a = k * d\n[PROOFSTEP]\nrw [mul_assoc] at h \n[GOAL]\ncase intro\na b d : \u2124\nhb : b \u2260 0\nk : \u2124\nh : b * a = b * (k * d)\n\u22a2 a = k * d\n[PROOFSTEP]\napply mul_left_cancel\u2080 hb h\n[GOAL]\na b : \u2124\nw : a \u2223 b\nh : natAbs b < natAbs a\n\u22a2 b = 0\n[PROOFSTEP]\nrw [\u2190 natAbs_dvd, \u2190 dvd_natAbs, coe_nat_dvd] at w \n[GOAL]\na b : \u2124\nw : natAbs a \u2223 natAbs b\nh : natAbs b < natAbs a\n\u22a2 b = 0\n[PROOFSTEP]\nrw [\u2190 natAbs_eq_zero]\n[GOAL]\na b : \u2124\nw : natAbs a \u2223 natAbs b\nh : natAbs b < natAbs a\n\u22a2 natAbs b = 0\n[PROOFSTEP]\nexact eq_zero_of_dvd_of_lt w h\n[GOAL]\nm n : \u2115\nh : Nat.succ n \u2264 m\n\u22a2 ofNat m + -[n+1] = ofNat (m - Nat.succ n)\n[PROOFSTEP]\nrw [negSucc_eq, ofNat_eq_cast, ofNat_eq_cast, \u2190 Nat.cast_one, \u2190 Nat.cast_add, \u2190 sub_eq_add_neg, \u2190 Nat.cast_sub h]\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Div", "llama_tokens": 662, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256512199032, "lm_q2_score": 0.8006919925839875, "lm_q1q2_score": 0.6740430580835771}}
{"text": "[GOAL]\nk : Type u_1\ninst\u271d : LinearOrderedField k\n\u22a2 k \u2243o \u2191(Ioo (-1) 1)\n[PROOFSTEP]\nrefine' StrictMono.orderIsoOfRightInverse _ _ (fun x \u21a6 x / (1 - |\u2191x|)) _\n[GOAL]\ncase refine'_1\nk : Type u_1\ninst\u271d : LinearOrderedField k\n\u22a2 k \u2192 \u2191(Ioo (-1) 1)\n[PROOFSTEP]\nrefine' codRestrict (fun x \u21a6 x / (1 + |x|)) _ fun x \u21a6 abs_lt.1 _\n[GOAL]\ncase refine'_1\nk : Type u_1\ninst\u271d : LinearOrderedField k\nx : k\n\u22a2 |(fun x => x / (1 + |x|)) x| < 1\n[PROOFSTEP]\nhave H : 0 < 1 + |x| := (abs_nonneg x).trans_lt (lt_one_add _)\n[GOAL]\ncase refine'_1\nk : Type u_1\ninst\u271d : LinearOrderedField k\nx : k\nH : 0 < 1 + |x|\n\u22a2 |(fun x => x / (1 + |x|)) x| < 1\n[PROOFSTEP]\ncalc\n  |x / (1 + |x|)| = |x| / (1 + |x|) := by rw [abs_div, abs_of_pos H]\n  _ < 1 := (div_lt_one H).2 (lt_one_add _)\n[GOAL]\nk : Type u_1\ninst\u271d : LinearOrderedField k\nx : k\nH : 0 < 1 + |x|\n\u22a2 |x / (1 + |x|)| = |x| / (1 + |x|)\n[PROOFSTEP]\nrw [abs_div, abs_of_pos H]\n[GOAL]\ncase refine'_2\nk : Type u_1\ninst\u271d : LinearOrderedField k\n\u22a2 StrictMono\n    (codRestrict (fun x => x / (1 + |x|)) (Ioo (-1) 1)\n      (_ : \u2200 (x : k), -1 < (fun x => x / (1 + |x|)) x \u2227 (fun x => x / (1 + |x|)) x < 1))\n[PROOFSTEP]\nrefine' (strictMono_of_odd_strictMonoOn_nonneg _ _).codRestrict _\n[GOAL]\ncase refine'_2.refine'_1\nk : Type u_1\ninst\u271d : LinearOrderedField k\n\u22a2 \u2200 (x : k), -x / (1 + |(-x)|) = -(x / (1 + |x|))\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2.refine'_1\nk : Type u_1\ninst\u271d : LinearOrderedField k\nx : k\n\u22a2 -x / (1 + |(-x)|) = -(x / (1 + |x|))\n[PROOFSTEP]\nsimp only [abs_neg, neg_div]\n[GOAL]\ncase refine'_2.refine'_2\nk : Type u_1\ninst\u271d : LinearOrderedField k\n\u22a2 StrictMonoOn (fun x => x / (1 + |x|)) (Ici 0)\n[PROOFSTEP]\nrintro x (hx : 0 \u2264 x) y (hy : 0 \u2264 y) hxy\n[GOAL]\ncase refine'_2.refine'_2\nk : Type u_1\ninst\u271d : LinearOrderedField k\nx : k\nhx : 0 \u2264 x\ny : k\nhy : 0 \u2264 y\nhxy : x < y\n\u22a2 (fun x => x / (1 + |x|)) x < (fun x => x / (1 + |x|)) y\n[PROOFSTEP]\nsimp [abs_of_nonneg, mul_add, mul_comm x y, div_lt_div_iff, hx.trans_lt (lt_one_add _), hy.trans_lt (lt_one_add _), *]\n[GOAL]\ncase refine'_3\nk : Type u_1\ninst\u271d : LinearOrderedField k\n\u22a2 Function.RightInverse (fun x => \u2191x / (1 - |\u2191x|))\n    (codRestrict (fun x => x / (1 + |x|)) (Ioo (-1) 1)\n      (_ : \u2200 (x : k), -1 < (fun x => x / (1 + |x|)) x \u2227 (fun x => x / (1 + |x|)) x < 1))\n[PROOFSTEP]\nrefine' fun x \u21a6 Subtype.ext _\n[GOAL]\ncase refine'_3\nk : Type u_1\ninst\u271d : LinearOrderedField k\nx : \u2191(Ioo (-1) 1)\n\u22a2 \u2191(codRestrict (fun x => x / (1 + |x|)) (Ioo (-1) 1)\n        (_ : \u2200 (x : k), -1 < (fun x => x / (1 + |x|)) x \u2227 (fun x => x / (1 + |x|)) x < 1)\n        ((fun x => \u2191x / (1 - |\u2191x|)) x)) =\n    \u2191x\n[PROOFSTEP]\nhave : 0 < 1 - |(x : k)| := sub_pos.2 (abs_lt.2 x.2)\n[GOAL]\ncase refine'_3\nk : Type u_1\ninst\u271d : LinearOrderedField k\nx : \u2191(Ioo (-1) 1)\nthis : 0 < 1 - |\u2191x|\n\u22a2 \u2191(codRestrict (fun x => x / (1 + |x|)) (Ioo (-1) 1)\n        (_ : \u2200 (x : k), -1 < (fun x => x / (1 + |x|)) x \u2227 (fun x => x / (1 + |x|)) x < 1)\n        ((fun x => \u2191x / (1 - |\u2191x|)) x)) =\n    \u2191x\n[PROOFSTEP]\nfield_simp [abs_div, this.ne', abs_of_pos this]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.IsoIoo", "llama_tokens": 1564, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357460591569, "lm_q2_score": 0.7772998663336157, "lm_q1q2_score": 0.6739467695182494}}
{"text": "[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\n\u22a2 dist (secondInter s p v) s.center = dist p s.center\n[PROOFSTEP]\nrw [Sphere.secondInter]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\n\u22a2 dist ((-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p) s.center = dist p s.center\n[PROOFSTEP]\nby_cases hv : v = 0\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : v = 0\n\u22a2 dist ((-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p) s.center = dist p s.center\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\n\u22a2 dist ((-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p) s.center = dist p s.center\n[PROOFSTEP]\nrw [dist_smul_vadd_eq_dist _ _ hv]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\n\u22a2 -2 * inner v (p -\u1d65 s.center) / inner v v = 0 \u2228\n    -2 * inner v (p -\u1d65 s.center) / inner v v = -2 * inner v (p -\u1d65 s.center) / inner v v\n[PROOFSTEP]\nexact Or.inr rfl\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\n\u22a2 secondInter s p v \u2208 s \u2194 p \u2208 s\n[PROOFSTEP]\nsimp_rw [mem_sphere, Sphere.secondInter_dist]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\n\u22a2 secondInter s p 0 = p\n[PROOFSTEP]\nsimp [Sphere.secondInter]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\n\u22a2 secondInter s p v = p \u2194 inner v (p -\u1d65 s.center) = 0\n[PROOFSTEP]\nrefine' \u27e8fun hp => _, fun hp => _\u27e9\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhp : secondInter s p v = p\n\u22a2 inner v (p -\u1d65 s.center) = 0\n[PROOFSTEP]\nby_cases hv : v = 0\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhp : secondInter s p v = p\nhv : v = 0\n\u22a2 inner v (p -\u1d65 s.center) = 0\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhp : secondInter s p v = p\nhv : \u00acv = 0\n\u22a2 inner v (p -\u1d65 s.center) = 0\n[PROOFSTEP]\nrwa [Sphere.secondInter, eq_comm, eq_vadd_iff_vsub_eq, vsub_self, eq_comm, smul_eq_zero, or_iff_left hv,\n  div_eq_zero_iff, inner_self_eq_zero, or_iff_left hv, mul_eq_zero, or_iff_right (by norm_num : (-2 : \u211d) \u2260 0)] at hp \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhp : -2 = 0 \u2228 inner v (p -\u1d65 s.center) = 0\nhv : \u00acv = 0\n\u22a2 -2 \u2260 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhp : inner v (p -\u1d65 s.center) = 0\n\u22a2 secondInter s p v = p\n[PROOFSTEP]\nrw [Sphere.secondInter, hp, mul_zero, zero_div, zero_smul, zero_vadd]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nhp' : p' \u2208 AffineSubspace.mk' p (Submodule.span \u211d {v})\n\u22a2 p' = p \u2228 p' = secondInter s p v \u2194 p' \u2208 s\n[PROOFSTEP]\nrefine' \u27e8fun h => _, fun h => _\u27e9\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nhp' : p' \u2208 AffineSubspace.mk' p (Submodule.span \u211d {v})\nh : p' = p \u2228 p' = secondInter s p v\n\u22a2 p' \u2208 s\n[PROOFSTEP]\nrcases h with (h | h)\n[GOAL]\ncase refine'_1.inl\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nhp' : p' \u2208 AffineSubspace.mk' p (Submodule.span \u211d {v})\nh : p' = p\n\u22a2 p' \u2208 s\n[PROOFSTEP]\nrwa [h]\n[GOAL]\ncase refine'_1.inr\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nhp' : p' \u2208 AffineSubspace.mk' p (Submodule.span \u211d {v})\nh : p' = secondInter s p v\n\u22a2 p' \u2208 s\n[PROOFSTEP]\nrwa [h, Sphere.secondInter_mem]\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nhp' : p' \u2208 AffineSubspace.mk' p (Submodule.span \u211d {v})\nh : p' \u2208 s\n\u22a2 p' = p \u2228 p' = secondInter s p v\n[PROOFSTEP]\nrw [AffineSubspace.mem_mk'_iff_vsub_mem, Submodule.mem_span_singleton] at hp' \n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nhp' : \u2203 a, a \u2022 v = p' -\u1d65 p\nh : p' \u2208 s\n\u22a2 p' = p \u2228 p' = secondInter s p v\n[PROOFSTEP]\nrcases hp' with \u27e8r, hr\u27e9\n[GOAL]\ncase refine'_2.intro\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nh : p' \u2208 s\nr : \u211d\nhr : r \u2022 v = p' -\u1d65 p\n\u22a2 p' = p \u2228 p' = secondInter s p v\n[PROOFSTEP]\nrw [eq_comm, \u2190 eq_vadd_iff_vsub_eq] at hr \n[GOAL]\ncase refine'_2.intro\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\np' : P\nh : p' \u2208 s\nr : \u211d\nhr : p' = r \u2022 v +\u1d65 p\n\u22a2 p' = p \u2228 p' = secondInter s p v\n[PROOFSTEP]\nsubst hr\n[GOAL]\ncase refine'_2.intro\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\nr : \u211d\nh : r \u2022 v +\u1d65 p \u2208 s\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = secondInter s p v\n[PROOFSTEP]\nby_cases hv : v = 0\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\nr : \u211d\nh : r \u2022 v +\u1d65 p \u2208 s\nhv : v = 0\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = secondInter s p v\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\nr : \u211d\nh : r \u2022 v +\u1d65 p \u2208 s\nhv : \u00acv = 0\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = secondInter s p v\n[PROOFSTEP]\nrw [Sphere.secondInter]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : p \u2208 s\nv : V\nr : \u211d\nh : r \u2022 v +\u1d65 p \u2208 s\nhv : \u00acv = 0\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = (-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p\n[PROOFSTEP]\nrw [mem_sphere] at h hp \n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : dist p s.center = s.radius\nv : V\nr : \u211d\nh : dist (r \u2022 v +\u1d65 p) s.center = s.radius\nhv : \u00acv = 0\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = (-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p\n[PROOFSTEP]\nrw [\u2190 hp, dist_smul_vadd_eq_dist _ _ hv] at h \n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : dist p s.center = s.radius\nv : V\nr : \u211d\nh : r = 0 \u2228 r = -2 * inner v (p -\u1d65 s.center) / inner v v\nhv : \u00acv = 0\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = (-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p\n[PROOFSTEP]\nrcases h with (h | h)\n[GOAL]\ncase neg.inl\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : dist p s.center = s.radius\nv : V\nr : \u211d\nhv : \u00acv = 0\nh : r = 0\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = (-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg.inr\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nhp : dist p s.center = s.radius\nv : V\nr : \u211d\nhv : \u00acv = 0\nh : r = -2 * inner v (p -\u1d65 s.center) / inner v v\n\u22a2 r \u2022 v +\u1d65 p = p \u2228 r \u2022 v +\u1d65 p = (-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nr : \u211d\nhr : r \u2260 0\n\u22a2 secondInter s p (r \u2022 v) = secondInter s p v\n[PROOFSTEP]\nsimp_rw [Sphere.secondInter, real_inner_smul_left, inner_smul_right, smul_smul, div_mul_eq_div_div]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nr : \u211d\nhr : r \u2260 0\n\u22a2 (-2 * (r * inner v (p -\u1d65 s.center)) / r / r / inner v v * r) \u2022 v +\u1d65 p =\n    (-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65 p\n[PROOFSTEP]\nrw [mul_comm, \u2190 mul_div_assoc, \u2190 mul_div_assoc, mul_div_cancel_left _ hr, mul_comm, mul_assoc, mul_div_cancel_left _ hr,\n  mul_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\n\u22a2 secondInter s p (-v) = secondInter s p v\n[PROOFSTEP]\nrw [\u2190 neg_one_smul \u211d v, s.secondInter_smul p v (by norm_num : (-1 : \u211d) \u2260 0)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\n\u22a2 -1 \u2260 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\n\u22a2 secondInter s (secondInter s p v) v = p\n[PROOFSTEP]\nby_cases hv : v = 0\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : v = 0\n\u22a2 secondInter s (secondInter s p v) v = p\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\n\u22a2 secondInter s (secondInter s p v) v = p\n[PROOFSTEP]\nhave hv' : \u27eav, v\u27eb \u2260 0 := inner_self_ne_zero.2 hv\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\nhv' : inner v v \u2260 0\n\u22a2 secondInter s (secondInter s p v) v = p\n[PROOFSTEP]\nsimp only [Sphere.secondInter, vadd_vsub_assoc, vadd_vadd, inner_add_right, inner_smul_right, div_mul_cancel _ hv']\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\nhv' : inner v v \u2260 0\n\u22a2 (-2 * (-2 * inner v (p -\u1d65 s.center) + inner v (p -\u1d65 s.center)) / inner v v) \u2022 v +\n        (-2 * inner v (p -\u1d65 s.center) / inner v v) \u2022 v +\u1d65\n      p =\n    p\n[PROOFSTEP]\nrw [\u2190 @vsub_eq_zero_iff_eq V, vadd_vsub, \u2190 add_smul, \u2190 add_div]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\nhv' : inner v v \u2260 0\n\u22a2 ((-2 * (-2 * inner v (p -\u1d65 s.center) + inner v (p -\u1d65 s.center)) + -2 * inner v (p -\u1d65 s.center)) / inner v v) \u2022 v = 0\n[PROOFSTEP]\nconvert zero_smul \u211d (M := V) _\n[GOAL]\ncase h.e'_2.h.e'_5\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\nhv' : inner v v \u2260 0\n\u22a2 (-2 * (-2 * inner v (p -\u1d65 s.center) + inner v (p -\u1d65 s.center)) + -2 * inner v (p -\u1d65 s.center)) / inner v v = 0\n[PROOFSTEP]\nconvert zero_div (G\u2080 := \u211d) _\n[GOAL]\ncase h.e'_2.h.e'_5\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np : P\nv : V\nhv : \u00acv = 0\nhv' : inner v v \u2260 0\n\u22a2 -2 * (-2 * inner v (p -\u1d65 s.center) + inner v (p -\u1d65 s.center)) + -2 * inner v (p -\u1d65 s.center) = 0\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\n\u22a2 Collinear \u211d {p, p', secondInter s p (p' -\u1d65 p)}\n[PROOFSTEP]\nrw [Set.pair_comm, Set.insert_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\n\u22a2 Collinear \u211d {secondInter s p (p' -\u1d65 p), p, p'}\n[PROOFSTEP]\nexact (collinear_insert_iff_of_mem_affineSpan (s.secondInter_vsub_mem_affineSpan _ _)).2 (collinear_pair \u211d _ _)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center \u2264 s.radius\n\u22a2 Wbtw \u211d p p' (secondInter s p (p' -\u1d65 p))\n[PROOFSTEP]\nby_cases h : p' = p\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center \u2264 s.radius\nh : p' = p\n\u22a2 Wbtw \u211d p p' (secondInter s p (p' -\u1d65 p))\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center \u2264 s.radius\nh : \u00acp' = p\n\u22a2 Wbtw \u211d p p' (secondInter s p (p' -\u1d65 p))\n[PROOFSTEP]\nrefine'\n  wbtw_of_collinear_of_dist_center_le_radius (s.secondInter_collinear p p') hp hp' ((Sphere.secondInter_mem _).2 hp) _\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center \u2264 s.radius\nh : \u00acp' = p\n\u22a2 p \u2260 secondInter s p (p' -\u1d65 p)\n[PROOFSTEP]\nintro he\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center \u2264 s.radius\nh : \u00acp' = p\nhe : p = secondInter s p (p' -\u1d65 p)\n\u22a2 False\n[PROOFSTEP]\nrw [eq_comm, Sphere.secondInter_eq_self_iff, \u2190 neg_neg (p' -\u1d65 p), inner_neg_left, neg_vsub_eq_vsub_rev, neg_eq_zero,\n  eq_comm] at he \n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center \u2264 s.radius\nh : \u00acp' = p\nhe : 0 = inner (p -\u1d65 p') (p -\u1d65 s.center)\n\u22a2 False\n[PROOFSTEP]\nexact ((inner_pos_or_eq_of_dist_le_radius hp hp').resolve_right (Ne.symm h)).ne he\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center < s.radius\n\u22a2 Sbtw \u211d p p' (secondInter s p (p' -\u1d65 p))\n[PROOFSTEP]\nrefine' \u27e8Sphere.wbtw_secondInter hp hp'.le, _, _\u27e9\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center < s.radius\n\u22a2 p' \u2260 p\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np' : P\nhp' : dist p' s.center < s.radius\nhp : p' \u2208 s\n\u22a2 False\n[PROOFSTEP]\nrw [mem_sphere] at hp \n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np' : P\nhp' : dist p' s.center < s.radius\nhp : dist p' s.center = s.radius\n\u22a2 False\n[PROOFSTEP]\nsimp [hp] at hp' \n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center < s.radius\n\u22a2 p' \u2260 secondInter s p (p' -\u1d65 p)\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : dist p' s.center < s.radius\nh : p' = secondInter s p (p' -\u1d65 p)\n\u22a2 False\n[PROOFSTEP]\nrw [h, mem_sphere.1 ((Sphere.secondInter_mem _).2 hp)] at hp' \n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\ns : Sphere P\np p' : P\nhp : p \u2208 s\nhp' : s.radius < s.radius\nh : p' = secondInter s p (p' -\u1d65 p)\n\u22a2 False\n[PROOFSTEP]\nexact lt_irrefl _ hp'\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Sphere.SecondInter", "llama_tokens": 9116, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8887587817066392, "lm_q2_score": 0.7577943767446202, "lm_q1q2_score": 0.6734964070596907}}
{"text": "[GOAL]\na : \u2124\nh\u2081 : a \u2260 0\nh\u2082 : -a = 0\n\u22a2 False\n[PROOFSTEP]\nhave : -a = -0 := by rwa [Int.neg_zero]\n[GOAL]\na : \u2124\nh\u2081 : a \u2260 0\nh\u2082 : -a = 0\n\u22a2 -a = -0\n[PROOFSTEP]\nrwa [Int.neg_zero]\n[GOAL]\na : \u2124\nh\u2081 : a \u2260 0\nh\u2082 : -a = 0\nthis : -a = -0\n\u22a2 False\n[PROOFSTEP]\nhave : a = 0 := Int.neg_eq_neg this\n[GOAL]\na : \u2124\nh\u2081 : a \u2260 0\nh\u2082 : -a = 0\nthis\u271d : -a = -0\nthis : a = 0\n\u22a2 False\n[PROOFSTEP]\ncontradiction\n[GOAL]\na b : \u2124\nh\u2081 : 0 < a\nh\u2082 : 0 < b\nh : -a = b\n\u22a2 False\n[PROOFSTEP]\nrw [\u2190 h] at h\u2082 \n[GOAL]\na b : \u2124\nh\u2081 : 0 < a\nh\u2082 : 0 < -a\nh : -a = b\n\u22a2 False\n[PROOFSTEP]\nexact absurd (le_of_lt h\u2081) (not_le_of_gt (Int.neg_of_neg_pos h\u2082))\n[GOAL]\nn : \u2115\n\u22a2 0 + \u2191n = ofNat n\n[PROOFSTEP]\nrw [Int.zero_add, Int.coe_nat_eq]\n[GOAL]\na b : \u2124\nha : 0 \u2264 a\nhb : 0 \u2264 b\nh\u271d : natAbs a \u2260 natAbs b\nh : a = b\n\u22a2 False\n[PROOFSTEP]\nhave : (natAbs a : \u2124) = natAbs b := by rwa [ofNat_natAbs_eq_of_nonneg _ ha, ofNat_natAbs_eq_of_nonneg _ hb]\n[GOAL]\na b : \u2124\nha : 0 \u2264 a\nhb : 0 \u2264 b\nh\u271d : natAbs a \u2260 natAbs b\nh : a = b\n\u22a2 \u2191(natAbs a) = \u2191(natAbs b)\n[PROOFSTEP]\nrwa [ofNat_natAbs_eq_of_nonneg _ ha, ofNat_natAbs_eq_of_nonneg _ hb]\n[GOAL]\na b : \u2124\nha : 0 \u2264 a\nhb : 0 \u2264 b\nh\u271d : natAbs a \u2260 natAbs b\nh : a = b\nthis : \u2191(natAbs a) = \u2191(natAbs b)\n\u22a2 False\n[PROOFSTEP]\ninjection this\n[GOAL]\na b : \u2124\nha : 0 \u2264 a\nhb : 0 \u2264 b\nh\u271d : natAbs a \u2260 natAbs b\nh : a = b\na_eq\u271d : natAbs a = natAbs b\n\u22a2 False\n[PROOFSTEP]\ncontradiction\n[GOAL]\na b : \u2124\nn m : \u2115\nha : 0 \u2264 a\nhb : 0 \u2264 b\ne1 : natAbs a = n\ne2 : natAbs b = m\nh : n \u2260 m\n\u22a2 natAbs a \u2260 natAbs b\n[PROOFSTEP]\nrwa [e1, e2]\n[GOAL]\nn m : \u2115\nx\u271d\u00b9 : 0 \u2264 ofNat n\nx\u271d : 0 \u2264 ofNat m\n\u22a2 natAbs (ofNat n + ofNat m) = natAbs (ofNat n) + natAbs (ofNat m)\n[PROOFSTEP]\nsimp [natAbs_ofNat_core]\n[GOAL]\nn m : \u2115\nx\u271d\u00b9 : -[n+1] < 0\nx\u271d : -[m+1] < 0\n\u22a2 natAbs (-[n+1] + -[m+1]) = natAbs -[n+1] + natAbs -[m+1]\n[PROOFSTEP]\nsimp [natAbs_of_negSucc, Nat.succ_add, Nat.add_succ]\n[GOAL]\na : \u2124\nn : \u2115\nh : natAbs a = n\n\u22a2 natAbs (bit0 a) = bit0 n\n[PROOFSTEP]\nrw [\u2190 h]\n[GOAL]\na : \u2124\nn : \u2115\nh : natAbs a = n\n\u22a2 natAbs (bit0 a) = bit0 (natAbs a)\n[PROOFSTEP]\napply Int.natAbs_bit0\n[GOAL]\na : \u2124\nh : 0 \u2264 a\n\u22a2 natAbs (bit0 a + 1) = bit0 (natAbs a) + natAbs 1\n[PROOFSTEP]\nrw [Int.natAbs_add_nonneg (Int.bit0_nonneg h) (le_of_lt Int.zero_lt_one), Int.natAbs_bit0]\n[GOAL]\na : \u2124\nn : \u2115\nh\u2081 : 0 \u2264 a\nh\u2082 : natAbs a = n\n\u22a2 natAbs (bit1 a) = bit1 n\n[PROOFSTEP]\nrw [\u2190 h\u2082]\n[GOAL]\na : \u2124\nn : \u2115\nh\u2081 : 0 \u2264 a\nh\u2082 : natAbs a = n\n\u22a2 natAbs (bit1 a) = bit1 (natAbs a)\n[PROOFSTEP]\napply Int.natAbs_bit1_nonneg h\u2081\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Int.CompLemmas", "llama_tokens": 1464, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8596637577007394, "lm_q2_score": 0.7826624840223698, "lm_q1q2_score": 0.6728265720260653}}
{"text": "[GOAL]\na b : \u2115\n\u22a2 a \u2260 b \u2194 \u2191a \u2260 \u2191b\n[PROOFSTEP]\nsimp only [ne_eq, Int.cast_eq_cast_iff_Nat]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.Zify", "llama_tokens": 55, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9046505299595162, "lm_q2_score": 0.7431680143008301, "lm_q1q2_score": 0.6723073379862073}}
{"text": "[GOAL]\nm n : \u2115\nx\u271d : \u2191m \u2223 \u2191n\na : \u2124\nae : \u2191n = \u2191m * a\nm0 : m = 0\n\u22a2 m \u2223 n\n[PROOFSTEP]\nsimp [m0] at ae \n[GOAL]\nm n : \u2115\nx\u271d : \u2191m \u2223 \u2191n\na : \u2124\nm0 : m = 0\nae : n = 0\n\u22a2 m \u2223 n\n[PROOFSTEP]\nsimp [ae, m0]\n[GOAL]\nm n : \u2115\nx\u271d : \u2191m \u2223 \u2191n\na : \u2124\nae : \u2191n = \u2191m * a\nm0l : m > 0\n\u22a2 m \u2223 n\n[PROOFSTEP]\ncases' eq_ofNat_of_zero_le (@nonneg_of_mul_nonneg_right \u2124 _ m a (by simp [ae.symm]) (by simpa using m0l)) with k e\n[GOAL]\nm n : \u2115\nx\u271d : \u2191m \u2223 \u2191n\na : \u2124\nae : \u2191n = \u2191m * a\nm0l : m > 0\n\u22a2 0 \u2264 \u2191m * a\n[PROOFSTEP]\nsimp [ae.symm]\n[GOAL]\nm n : \u2115\nx\u271d : \u2191m \u2223 \u2191n\na : \u2124\nae : \u2191n = \u2191m * a\nm0l : m > 0\n\u22a2 0 < \u2191m\n[PROOFSTEP]\nsimpa using m0l\n[GOAL]\ncase intro\nm n : \u2115\nx\u271d : \u2191m \u2223 \u2191n\na : \u2124\nae : \u2191n = \u2191m * a\nm0l : m > 0\nk : \u2115\ne : a = \u2191k\n\u22a2 m \u2223 n\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase intro\nm n : \u2115\nx\u271d : \u2191m \u2223 \u2191n\nm0l : m > 0\nk : \u2115\nae : \u2191n = \u2191m * \u2191k\n\u22a2 m \u2223 n\n[PROOFSTEP]\nexact \u27e8k, Int.ofNat.inj ae\u27e9\n[GOAL]\nm n : \u2115\nx\u271d : m \u2223 n\nk : \u2115\ne : n = m * k\n\u22a2 \u2191m * \u2191k = \u2191n\n[PROOFSTEP]\nrw [e, Int.ofNat_mul]\n[GOAL]\nn : \u2115\nz : \u2124\n\u22a2 \u2191n \u2223 z \u2194 n \u2223 natAbs z\n[PROOFSTEP]\nrcases natAbs_eq z with (eq | eq)\n[GOAL]\ncase inl\nn : \u2115\nz : \u2124\neq : z = \u2191(natAbs z)\n\u22a2 \u2191n \u2223 z \u2194 n \u2223 natAbs z\n[PROOFSTEP]\nrw [eq]\n[GOAL]\ncase inr\nn : \u2115\nz : \u2124\neq : z = -\u2191(natAbs z)\n\u22a2 \u2191n \u2223 z \u2194 n \u2223 natAbs z\n[PROOFSTEP]\nrw [eq]\n[GOAL]\ncase inl\nn : \u2115\nz : \u2124\neq : z = \u2191(natAbs z)\n\u22a2 \u2191n \u2223 \u2191(natAbs z) \u2194 n \u2223 natAbs \u2191(natAbs z)\n[PROOFSTEP]\nsimp [\u2190 coe_nat_dvd]\n[GOAL]\ncase inr\nn : \u2115\nz : \u2124\neq : z = -\u2191(natAbs z)\n\u22a2 \u2191n \u2223 -\u2191(natAbs z) \u2194 n \u2223 natAbs (-\u2191(natAbs z))\n[PROOFSTEP]\nsimp [\u2190 coe_nat_dvd]\n[GOAL]\nn : \u2115\nz : \u2124\n\u22a2 z \u2223 \u2191n \u2194 natAbs z \u2223 n\n[PROOFSTEP]\nrcases natAbs_eq z with (eq | eq)\n[GOAL]\ncase inl\nn : \u2115\nz : \u2124\neq : z = \u2191(natAbs z)\n\u22a2 z \u2223 \u2191n \u2194 natAbs z \u2223 n\n[PROOFSTEP]\nrw [eq]\n[GOAL]\ncase inr\nn : \u2115\nz : \u2124\neq : z = -\u2191(natAbs z)\n\u22a2 z \u2223 \u2191n \u2194 natAbs z \u2223 n\n[PROOFSTEP]\nrw [eq]\n[GOAL]\ncase inl\nn : \u2115\nz : \u2124\neq : z = \u2191(natAbs z)\n\u22a2 \u2191(natAbs z) \u2223 \u2191n \u2194 natAbs \u2191(natAbs z) \u2223 n\n[PROOFSTEP]\nsimp [\u2190 coe_nat_dvd]\n[GOAL]\ncase inr\nn : \u2115\nz : \u2124\neq : z = -\u2191(natAbs z)\n\u22a2 -\u2191(natAbs z) \u2223 \u2191n \u2194 natAbs (-\u2191(natAbs z)) \u2223 n\n[PROOFSTEP]\nsimp [\u2190 coe_nat_dvd]\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Dvd.Basic", "llama_tokens": 1324, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256472515684, "lm_q2_score": 0.7981867753392728, "lm_q1q2_score": 0.6719340987776256}}
{"text": "[GOAL]\nX Y : FintypeCat\nf g : X \u27f6 Y\nh : \u2200 (x : \u2191X), f x = g x\n\u22a2 f = g\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nX Y : FintypeCat\nf g : X \u27f6 Y\nh : \u2200 (x : \u2191X), f x = g x\nx\u271d : \u2191X\n\u22a2 f x\u271d = g x\u271d\n[PROOFSTEP]\napply h\n[GOAL]\nA B : FintypeCat\n\u22a2 Function.LeftInverse\n    (fun i =>\n      { toFun := i.hom, invFun := i.inv, left_inv := (_ : \u2200 (a : \u2191A), i.inv (i.hom a) = a),\n        right_inv := (_ : \u2200 (a : \u2191B), i.hom (i.inv a) = a) })\n    fun e => Iso.mk \u2191e \u2191e.symm\n[PROOFSTEP]\naesop_cat\n[GOAL]\nA B : FintypeCat\n\u22a2 Function.RightInverse\n    (fun i =>\n      { toFun := i.hom, invFun := i.inv, left_inv := (_ : \u2200 (a : \u2191A), i.inv (i.hom a) = a),\n        right_inv := (_ : \u2200 (a : \u2191B), i.hom (i.inv a) = a) })\n    fun e => Iso.mk \u2191e \u2191e.symm\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\n\u22a2 Function.LeftInverse (fun x => (h.inv { down := x }).down) fun x => (h.hom { down := x }).down\n[PROOFSTEP]\nintro a\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len X)\n\u22a2 (fun x => (h.inv { down := x }).down) ((fun x => (h.hom { down := x }).down) a) = a\n[PROOFSTEP]\nchange ULift.down _ = _\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len X)\n\u22a2 (h.inv { down := (fun x => (h.hom { down := x }).down) a }).down = a\n[PROOFSTEP]\nrw [ULift.up_down]\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len X)\n\u22a2 (h.inv (h.hom { down := a })).down = a\n[PROOFSTEP]\nchange ((h.hom \u226b h.inv) _).down = _\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len X)\n\u22a2 ((h.hom \u226b h.inv) { down := a }).down = a\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len X)\n\u22a2 (\ud835\udfd9 X { down := a }).down = a\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\n\u22a2 Function.RightInverse (fun x => (h.inv { down := x }).down) fun x => (h.hom { down := x }).down\n[PROOFSTEP]\nintro a\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len Y)\n\u22a2 (fun x => (h.hom { down := x }).down) ((fun x => (h.inv { down := x }).down) a) = a\n[PROOFSTEP]\nchange ULift.down _ = _\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len Y)\n\u22a2 (h.hom { down := (fun x => (h.inv { down := x }).down) a }).down = a\n[PROOFSTEP]\nrw [ULift.up_down]\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len Y)\n\u22a2 (h.hom (h.inv { down := a })).down = a\n[PROOFSTEP]\nchange ((h.inv \u226b h.hom) _).down = _\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len Y)\n\u22a2 ((h.inv \u226b h.hom) { down := a }).down = a\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : Skeleton\nx\u271d : IsIsomorphic X Y\nh : X \u2245 Y\na : Fin (len Y)\n\u22a2 (\ud835\udfd9 Y { down := a }).down = a\n[PROOFSTEP]\nrfl\n[GOAL]\nn : \u2115\n\u22a2 Fintype.card \u2191(incl.obj (mk n)) = n\n[PROOFSTEP]\nconvert Finset.card_fin n\n[GOAL]\ncase h.e'_2\nn : \u2115\n\u22a2 Fintype.card \u2191(incl.obj (mk n)) = Finset.card Finset.univ\n[PROOFSTEP]\napply Fintype.ofEquiv_card\n[GOAL]\n\u22a2 IsEquivalence Skeleton.incl\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.FintypeCat", "llama_tokens": 1472, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677660619633, "lm_q2_score": 0.7905303087996143, "lm_q1q2_score": 0.6703442199570829}}
{"text": "[GOAL]\nx\u271d\u00b9 x\u271d : \u2115\n\u22a2 (fun m n => m * n) (x\u271d\u00b9 + 1) x\u271d = x\u271d + (fun m n => m * n) x\u271d\u00b9 x\u271d\n[PROOFSTEP]\ndsimp only\n[GOAL]\nx\u271d\u00b9 x\u271d : \u2115\n\u22a2 (x\u271d\u00b9 + 1) * x\u271d = x\u271d + x\u271d\u00b9 * x\u271d\n[PROOFSTEP]\nrw [Nat.add_comm, Nat.right_distrib, Nat.one_mul]\n[GOAL]\nm n k : \u2115\np : \u2115 \u2192 Prop\n\u22a2 (\u2203 n, p n) \u2192 p 0 \u2228 \u2203 n, p (n + 1)\n[PROOFSTEP]\nrintro \u27e8_ | n, hn\u27e9\n[GOAL]\ncase intro.zero\nm n k : \u2115\np : \u2115 \u2192 Prop\nhn : p zero\n\u22a2 p 0 \u2228 \u2203 n, p (n + 1)\ncase intro.succ m n\u271d k : \u2115 p : \u2115 \u2192 Prop n : \u2115 hn : p (succ n) \u22a2 p 0 \u2228 \u2203 n, p (n + 1)\n[PROOFSTEP]\nexacts [Or.inl hn, Or.inr \u27e8n, hn\u27e9]\n[GOAL]\nm\u271d n\u271d k m n : \u2115\n\u22a2 max (succ m) (succ n) = succ (max m n)\n[PROOFSTEP]\nby_cases h1 : m \u2264 n\n[GOAL]\ncase pos\nm\u271d n\u271d k m n : \u2115\nh1 : m \u2264 n\n\u22a2 max (succ m) (succ n) = succ (max m n)\ncase neg m\u271d n\u271d k m n : \u2115 h1 : \u00acm \u2264 n \u22a2 max (succ m) (succ n) = succ (max m n)\n[PROOFSTEP]\nrw [max_eq_right h1, max_eq_right (succ_le_succ h1)]\n[GOAL]\ncase neg\nm\u271d n\u271d k m n : \u2115\nh1 : \u00acm \u2264 n\n\u22a2 max (succ m) (succ n) = succ (max m n)\n[PROOFSTEP]\nrw [not_le] at h1 \n[GOAL]\ncase neg\nm\u271d n\u271d k m n : \u2115\nh1 : n < m\n\u22a2 max (succ m) (succ n) = succ (max m n)\n[PROOFSTEP]\nhave h2 := le_of_lt h1\n[GOAL]\ncase neg\nm\u271d n\u271d k m n : \u2115\nh1 : n < m\nh2 : n \u2264 m\n\u22a2 max (succ m) (succ n) = succ (max m n)\n[PROOFSTEP]\nrw [max_eq_left h2, max_eq_left (succ_le_succ h2)]\n[GOAL]\nm\u271d n\u271d k m n : \u2115\n\u22a2 m < n \u2194 m + 1 \u2264 n\n[PROOFSTEP]\nrw [succ_le_iff]\n[GOAL]\nm n k a b : \u2115\n\u22a2 a < 1 + b \u2194 a \u2264 b\n[PROOFSTEP]\nsimp only [add_comm, lt_succ_iff]\n[GOAL]\nm n k a b : \u2115\n\u22a2 1 + a \u2264 b \u2194 a < b\n[PROOFSTEP]\nsimp only [add_comm, add_one_le_iff]\n[GOAL]\nm\u271d n\u271d k\u271d m n k : \u2115\nn0 : 0 < n\n\u22a2 m / n \u2264 k \u2194 m \u2264 n * k + (n - 1)\n[PROOFSTEP]\nrw [\u2190 lt_succ_iff, div_lt_iff_lt_mul n0, succ_mul, mul_comm]\n[GOAL]\nm\u271d n\u271d k\u271d m n k : \u2115\nn0 : 0 < n\n\u22a2 m < n * k + n \u2194 m \u2264 n * k + (n - 1)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm\u271d n k\u271d m k : \u2115\nn0 : 0 < zero\n\u22a2 m < zero * k + zero \u2194 m \u2264 zero * k + (zero - 1)\n[PROOFSTEP]\ncases n0\n[GOAL]\ncase succ\nm\u271d n k\u271d m k n\u271d : \u2115\nn0 : 0 < succ n\u271d\n\u22a2 m < succ n\u271d * k + succ n\u271d \u2194 m \u2264 succ n\u271d * k + (succ n\u271d - 1)\n[PROOFSTEP]\nexact lt_succ_iff\n[GOAL]\nm n\u271d k n : \u2115\nx\u271d\u00b2 : n + 3 \u2260 0\nx\u271d\u00b9 : n + 3 \u2260 1\nx\u271d : n + 3 \u2260 2\n\u22a2 2 < n + 3\n[PROOFSTEP]\nrw [Nat.lt_iff_add_one_le]\n[GOAL]\nm n\u271d k n : \u2115\nx\u271d\u00b2 : n + 3 \u2260 0\nx\u271d\u00b9 : n + 3 \u2260 1\nx\u271d : n + 3 \u2260 2\n\u22a2 2 + 1 \u2264 n + 3\n[PROOFSTEP]\nconvert Nat.le_add_left 3 n\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Prop\nn : \u2115\n\u22a2 (\u2200 (m : \u2115), m < n + 1 \u2192 P m) \u2194 (\u2200 (m : \u2115), m < n \u2192 P m) \u2227 P n\n[PROOFSTEP]\nsimp only [lt_succ_iff, Decidable.le_iff_eq_or_lt, forall_eq_or_imp, and_comm]\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Prop\nn : \u2115\n\u22a2 (\u2203 m, m < n + 1 \u2227 P m) \u2194 (\u2203 m, m < n \u2227 P m) \u2228 P n\n[PROOFSTEP]\nrw [\u2190 not_iff_not]\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Prop\nn : \u2115\n\u22a2 (\u00ac\u2203 m, m < n + 1 \u2227 P m) \u2194 \u00ac((\u2203 m, m < n \u2227 P m) \u2228 P n)\n[PROOFSTEP]\npush_neg\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Prop\nn : \u2115\n\u22a2 (\u2200 (m : \u2115), m < n + 1 \u2192 \u00acP m) \u2194 (\u2200 (m : \u2115), m < n \u2192 \u00acP m) \u2227 \u00acP n\n[PROOFSTEP]\nexact forall_lt_succ\n[GOAL]\nm n k : \u2115\nh : m < n\n\u22a2 n = m + (n - (m + 1)) + 1\n[PROOFSTEP]\nrw [add_right_comm, add_sub_of_le h]\n[GOAL]\nm\u271d n\u271d k n m : \u2115\n\u22a2 n + succ m - 1 = n + m\n[PROOFSTEP]\nrw [add_succ, succ_sub_one]\n[GOAL]\nm\u271d n\u271d k n m : \u2115\n\u22a2 succ n + m - 1 = n + m\n[PROOFSTEP]\nrw [succ_add, succ_sub_one]\n[GOAL]\nm\u271d n\u271d k m n : \u2115\nH : m = succ n\n\u22a2 pred m = n\n[PROOFSTEP]\nsimp [H]\n[GOAL]\nm\u271d n\u271d k n m : \u2115\n\u22a2 pred n = succ m \u2194 n = m + 2\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm\u271d n k m : \u2115\n\u22a2 pred zero = succ m \u2194 zero = m + 2\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ\nm\u271d n k m n\u271d : \u2115\n\u22a2 pred (succ n\u271d) = succ m \u2194 succ n\u271d = m + 2\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase zero.mp\nm\u271d n k m : \u2115\n\u22a2 pred zero = succ m \u2192 zero = m + 2\n[PROOFSTEP]\nrintro \u27e8\u27e9\n[GOAL]\ncase zero.mpr\nm\u271d n k m : \u2115\n\u22a2 zero = m + 2 \u2192 pred zero = succ m\n[PROOFSTEP]\nrintro \u27e8\u27e9\n[GOAL]\ncase succ.mp\nm\u271d n k m n\u271d : \u2115\n\u22a2 pred (succ n\u271d) = succ m \u2192 succ n\u271d = m + 2\n[PROOFSTEP]\nrintro \u27e8\u27e9\n[GOAL]\ncase succ.mpr\nm\u271d n k m n\u271d : \u2115\n\u22a2 succ n\u271d = m + 2 \u2192 pred (succ n\u271d) = succ m\n[PROOFSTEP]\nrintro \u27e8\u27e9\n[GOAL]\ncase succ.mp.refl\nm\u271d n k m : \u2115\n\u22a2 succ (succ m) = m + 2\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.mpr.refl\nm\u271d n k m : \u2115\n\u22a2 pred (succ (Nat.add m 1)) = succ m\n[PROOFSTEP]\nrfl\n[GOAL]\nm\u271d n\u271d k n m : \u2115\n\u22a2 pred n - m = pred (n - m)\n[PROOFSTEP]\nrw [\u2190 Nat.sub_one, Nat.sub_sub, one_add, sub_succ]\n[GOAL]\nm n\u271d k n : \u2115\n\u22a2 pred (1 + n) = n\n[PROOFSTEP]\nrw [add_comm, add_one, Nat.pred_succ]\n[GOAL]\nm\u271d n\u271d k n m : \u2115\n\u22a2 \u00ac2 * n % 2 = (2 * m + 1) % 2\n[PROOFSTEP]\nrw [add_comm, add_mul_mod_self_left, mul_mod_right, mod_eq_of_lt]\n[GOAL]\nm\u271d n\u271d k n m : \u2115\n\u22a2 \u00ac0 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nm\u271d n\u271d k n m : \u2115\n\u22a2 1 < 2\n[PROOFSTEP]\nsimp\n[GOAL]\nm n k a b : \u2115\nha : 0 < a\nthis : a * b = a * 1 \u2194 b = 1\n\u22a2 a * b = a \u2194 b = 1\n[PROOFSTEP]\nrwa [mul_one] at this \n[GOAL]\nm n k a b : \u2115\nhb : 0 < b\n\u22a2 a * b = b \u2194 a = 1\n[PROOFSTEP]\nrw [mul_comm, Nat.mul_right_eq_self_iff hb]\n[GOAL]\nm n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn : \u2115\nh : n \u2264 n\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n\u22a2 leRecOn h (fun {k} => next) x = x\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm n k : \u2115\nC : \u2115 \u2192 Sort u\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nh : zero \u2264 zero\nx : C zero\n\u22a2 leRecOn h (fun {k} => next) x = x\n[PROOFSTEP]\nunfold leRecOn Eq.recOn\n[GOAL]\ncase succ\nm n k : \u2115\nC : \u2115 \u2192 Sort u\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nn\u271d : \u2115\nh : succ n\u271d \u2264 succ n\u271d\nx : C (succ n\u271d)\n\u22a2 leRecOn h (fun {k} => next) x = x\n[PROOFSTEP]\nunfold leRecOn Eq.recOn\n[GOAL]\ncase zero\nm n k : \u2115\nC : \u2115 \u2192 Sort u\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nh : zero \u2264 zero\nx : C zero\n\u22a2 (_ : zero = 0) \u25b8 x = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nm n k : \u2115\nC : \u2115 \u2192 Sort u\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nn\u271d : \u2115\nh : succ n\u271d \u2264 succ n\u271d\nx : C (succ n\u271d)\n\u22a2 (Or.by_cases (_ : succ n\u271d \u2264 n\u271d \u2228 succ n\u271d = succ n\u271d) (fun h => (fun {k} => next) (leRecOn h (fun {k} => next) x))\n      fun h => h \u25b8 x) =\n    x\n[PROOFSTEP]\nunfold Or.by_cases\n[GOAL]\ncase succ\nm n k : \u2115\nC : \u2115 \u2192 Sort u\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nn\u271d : \u2115\nh : succ n\u271d \u2264 succ n\u271d\nx : C (succ n\u271d)\n\u22a2 (if hp : succ n\u271d \u2264 n\u271d then (fun h => (fun {k} => next) (leRecOn h (fun {k} => next) x)) hp\n    else (fun h => h \u25b8 x) (_ : succ n\u271d = succ n\u271d)) =\n    x\n[PROOFSTEP]\nrw [dif_neg (Nat.not_succ_le_self _)]\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nh1 : n \u2264 m\nh2 : n \u2264 m + 1\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n\u22a2 leRecOn h2 next x = next (leRecOn h1 next x)\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [leRecOn, Or.by_cases, dif_pos h1]\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nh1 : n \u2264 m\nh2 : n \u2264 m + 1\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n| leRecOn h2 next x = next (leRecOn h1 next x)\n[PROOFSTEP]\n  lhs\n  rw [leRecOn, Or.by_cases, dif_pos h1]\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nh1 : n \u2264 m\nh2 : n \u2264 m + 1\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n| leRecOn h2 next x = next (leRecOn h1 next x)\n[PROOFSTEP]\n  lhs\n  rw [leRecOn, Or.by_cases, dif_pos h1]\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nh1 : n \u2264 m\nh2 : n \u2264 m + 1\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n| leRecOn h2 next x = next (leRecOn h1 next x)\n[PROOFSTEP]\nlhs\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nh1 : n \u2264 m\nh2 : n \u2264 m + 1\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n| leRecOn h2 next x\n[PROOFSTEP]\nrw [leRecOn, Or.by_cases, dif_pos h1]\n[GOAL]\nm n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn : \u2115\nh : n \u2264 n + 1\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n\u22a2 leRecOn h (fun {k} => next) x = next x\n[PROOFSTEP]\nrw [leRecOn_succ (le_refl n), leRecOn_self]\n[GOAL]\nm\u271d n\u271d k\u271d : \u2115\nC : \u2115 \u2192 Sort u\nn m k : \u2115\nhnm : n \u2264 m\nhmk : m \u2264 k\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n\u22a2 leRecOn (_ : n \u2264 k) next x = leRecOn hmk next (leRecOn hnm next x)\n[PROOFSTEP]\ninduction' hmk with k hmk ih\n[GOAL]\ncase refl\nm\u271d n\u271d k\u271d : \u2115\nC : \u2115 \u2192 Sort u\nn m k : \u2115\nhnm : n \u2264 m\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n\u22a2 leRecOn (_ : n \u2264 m) next x = leRecOn (_ : Nat.le m m) next (leRecOn hnm next x)\n[PROOFSTEP]\nrw [leRecOn_self]\n[GOAL]\ncase step\nm\u271d n\u271d k\u271d\u00b9 : \u2115\nC : \u2115 \u2192 Sort u\nn m k\u271d : \u2115\nhnm : n \u2264 m\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\nk : \u2115\nhmk : Nat.le m k\nih : leRecOn (_ : n \u2264 k) next x = leRecOn hmk next (leRecOn hnm next x)\n\u22a2 leRecOn (_ : n \u2264 succ k) next x = leRecOn (_ : Nat.le m (succ k)) next (leRecOn hnm next x)\n[PROOFSTEP]\nrw [leRecOn_succ (le_trans hnm hmk), ih, leRecOn_succ]\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nh1 : n \u2264 m\nh2 : n + 1 \u2264 m\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nx : C n\n\u22a2 leRecOn h2 (fun {k} => next) (next x) = leRecOn h1 (fun {k} => next) x\n[PROOFSTEP]\nrw [Subsingleton.elim h1 (le_trans (le_succ n) h2), leRecOn_trans (le_succ n) h2, leRecOn_succ']\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nhnm : n \u2264 m\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Injective next\n\u22a2 Function.Injective (leRecOn hnm fun {k} => next)\n[PROOFSTEP]\ninduction' hnm with m hnm ih\n[GOAL]\ncase refl\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Injective next\n\u22a2 Function.Injective (leRecOn (_ : Nat.le n n) fun {k} => next)\n[PROOFSTEP]\nintro x y H\n[GOAL]\ncase refl\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Injective next\nx y : C n\nH : leRecOn (_ : Nat.le n n) (fun {k} => next) x = leRecOn (_ : Nat.le n n) (fun {k} => next) y\n\u22a2 x = y\n[PROOFSTEP]\nrwa [leRecOn_self, leRecOn_self] at H \n[GOAL]\ncase step\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Injective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Injective (leRecOn hnm fun {k} => next)\n\u22a2 Function.Injective (leRecOn (_ : Nat.le n (succ m)) fun {k} => next)\n[PROOFSTEP]\nintro x y H\n[GOAL]\ncase step\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Injective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Injective (leRecOn hnm fun {k} => next)\nx y : C n\nH : leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) x = leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) y\n\u22a2 x = y\n[PROOFSTEP]\nrw [leRecOn_succ hnm, leRecOn_succ hnm] at H \n[GOAL]\ncase step\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Injective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Injective (leRecOn hnm fun {k} => next)\nx y : C n\nH : next (leRecOn hnm (fun {k} => next) x) = next (leRecOn hnm (fun {k} => next) y)\n\u22a2 x = y\n[PROOFSTEP]\nexact ih (Hnext _ H)\n[GOAL]\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nhnm : n \u2264 m\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\n\u22a2 Function.Surjective (leRecOn hnm fun {k} => next)\n[PROOFSTEP]\ninduction' hnm with m hnm ih\n[GOAL]\ncase refl\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\n\u22a2 Function.Surjective (leRecOn (_ : Nat.le n n) fun {k} => next)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refl\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\nx : C n\n\u22a2 \u2203 a, leRecOn (_ : Nat.le n n) (fun {k} => next) a = x\n[PROOFSTEP]\nuse x\n[GOAL]\ncase h\nm\u271d n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\nx : C n\n\u22a2 leRecOn (_ : Nat.le n n) (fun {k} => next) x = x\n[PROOFSTEP]\nrw [leRecOn_self]\n[GOAL]\ncase step\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Surjective (leRecOn hnm fun {k} => next)\n\u22a2 Function.Surjective (leRecOn (_ : Nat.le n (succ m)) fun {k} => next)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase step\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Surjective (leRecOn hnm fun {k} => next)\nx : C (succ m)\n\u22a2 \u2203 a, leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) a = x\n[PROOFSTEP]\nrcases Hnext _ x with \u27e8w, rfl\u27e9\n[GOAL]\ncase step.intro\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Surjective (leRecOn hnm fun {k} => next)\nw : C m\n\u22a2 \u2203 a, leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) a = next w\n[PROOFSTEP]\nrcases ih w with \u27e8x, rfl\u27e9\n[GOAL]\ncase step.intro.intro\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Surjective (leRecOn hnm fun {k} => next)\nx : C n\n\u22a2 \u2203 a, leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) a = next (leRecOn hnm (fun {k} => next) x)\n[PROOFSTEP]\nuse x\n[GOAL]\ncase h\nm\u271d\u00b9 n\u271d k : \u2115\nC : \u2115 \u2192 Sort u\nn m\u271d : \u2115\nnext : {k : \u2115} \u2192 C k \u2192 C (k + 1)\nHnext : \u2200 (n : \u2115), Function.Surjective next\nm : \u2115\nhnm : Nat.le n m\nih : Function.Surjective (leRecOn hnm fun {k} => next)\nx : C n\n\u22a2 leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) x = next (leRecOn hnm (fun {k} => next) x)\n[PROOFSTEP]\nrw [leRecOn_succ]\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 ((m : \u2115) \u2192 m < n \u2192 P m) \u2192 P n\nn : \u2115\n\u22a2 strongRecOn' n h = h n fun m x => strongRecOn' m h\n[PROOFSTEP]\nsimp only [strongRecOn']\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 ((m : \u2115) \u2192 m < n \u2192 P m) \u2192 P n\nn : \u2115\n\u22a2 Nat.strongRec' h n = h n fun m x => Nat.strongRec' h m\n[PROOFSTEP]\nrw [Nat.strongRec']\n[GOAL]\nm\u271d n k m : \u2115\nP : (n : \u2115) \u2192 m \u2264 n \u2192 Prop\nbase : P m (_ : m \u2264 m)\nsucc : \u2200 (n : \u2115) (hn : m \u2264 n), P n hn \u2192 P (n + 1) (_ : m \u2264 n + 1)\n\u22a2 \u2200 (n : \u2115) (hn : m \u2264 n), P n hn\n[PROOFSTEP]\napply Nat.le.rec\n[GOAL]\ncase refl\nm\u271d n k m : \u2115\nP : (n : \u2115) \u2192 m \u2264 n \u2192 Prop\nbase : P m (_ : m \u2264 m)\nsucc : \u2200 (n : \u2115) (hn : m \u2264 n), P n hn \u2192 P (n + 1) (_ : m \u2264 n + 1)\n\u22a2 P m (_ : Nat.le m m)\n[PROOFSTEP]\nexact base\n[GOAL]\ncase step\nm\u271d n k m : \u2115\nP : (n : \u2115) \u2192 m \u2264 n \u2192 Prop\nbase : P m (_ : m \u2264 m)\nsucc : \u2200 (n : \u2115) (hn : m \u2264 n), P n hn \u2192 P (n + 1) (_ : m \u2264 n + 1)\n\u22a2 \u2200 {m_1 : \u2115} (a : Nat.le m m_1), P m_1 a \u2192 P (Nat.succ m_1) (_ : Nat.le m (Nat.succ m_1))\n[PROOFSTEP]\nintros n hn\n[GOAL]\ncase step\nm\u271d n\u271d k m : \u2115\nP : (n : \u2115) \u2192 m \u2264 n \u2192 Prop\nbase : P m (_ : m \u2264 m)\nsucc : \u2200 (n : \u2115) (hn : m \u2264 n), P n hn \u2192 P (n + 1) (_ : m \u2264 n + 1)\nn : \u2115\nhn : Nat.le m n\n\u22a2 P n hn \u2192 P (Nat.succ n) (_ : Nat.le m (Nat.succ n))\n[PROOFSTEP]\napply succ n hn\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nn : \u2115\nnn : n \u2264 n\nhP : P n\n\u22a2 decreasingInduction h nn hP = hP\n[PROOFSTEP]\ndsimp only [decreasingInduction]\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nn : \u2115\nnn : n \u2264 n\nhP : P n\n\u22a2 leRecOn nn (fun {k} ih hsk => ih (h k hsk)) (fun h => h) hP = hP\n[PROOFSTEP]\nrw [leRecOn_self]\n[GOAL]\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm n : \u2115\nmn : m \u2264 n\nmsn : m \u2264 n + 1\nhP : P (n + 1)\n\u22a2 decreasingInduction h msn hP = decreasingInduction h mn (h n hP)\n[PROOFSTEP]\ndsimp only [decreasingInduction]\n[GOAL]\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm n : \u2115\nmn : m \u2264 n\nmsn : m \u2264 n + 1\nhP : P (n + 1)\n\u22a2 leRecOn msn (fun {k} ih hsk => ih (h k hsk)) (fun h => h) hP =\n    leRecOn mn (fun {k} ih hsk => ih (h k hsk)) (fun h => h) (h n hP)\n[PROOFSTEP]\nrw [leRecOn_succ]\n[GOAL]\nm\u271d n k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm : \u2115\nmsm : m \u2264 m + 1\nhP : P (m + 1)\n\u22a2 decreasingInduction h msm hP = h m hP\n[PROOFSTEP]\ndsimp only [decreasingInduction]\n[GOAL]\nm\u271d n k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm : \u2115\nmsm : m \u2264 m + 1\nhP : P (m + 1)\n\u22a2 leRecOn msm (fun {k} ih hsk => ih (h k hsk)) (fun h => h) hP = h m hP\n[PROOFSTEP]\nrw [leRecOn_succ']\n[GOAL]\nm\u271d n\u271d k\u271d : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm n k : \u2115\nmn : m \u2264 n\nnk : n \u2264 k\nhP : P k\n\u22a2 decreasingInduction h (_ : m \u2264 k) hP = decreasingInduction h mn (decreasingInduction h nk hP)\n[PROOFSTEP]\ninduction' nk with k nk ih\n[GOAL]\ncase refl\nm\u271d n\u271d k\u271d : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm n k : \u2115\nmn : m \u2264 n\nhP\u271d : P k\nhP : P n\n\u22a2 decreasingInduction h (_ : m \u2264 n) hP = decreasingInduction h mn (decreasingInduction h (_ : Nat.le n n) hP)\n[PROOFSTEP]\nrw [decreasingInduction_self]\n[GOAL]\ncase step\nm\u271d n\u271d k\u271d\u00b9 : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm n k\u271d : \u2115\nmn : m \u2264 n\nhP\u271d : P k\u271d\nk : \u2115\nnk : Nat.le n k\nih : \u2200 (hP : P k), decreasingInduction h (_ : m \u2264 k) hP = decreasingInduction h mn (decreasingInduction h nk hP)\nhP : P (succ k)\n\u22a2 decreasingInduction h (_ : m \u2264 succ k) hP =\n    decreasingInduction h mn (decreasingInduction h (_ : Nat.le n (succ k)) hP)\n[PROOFSTEP]\nrw [decreasingInduction_succ h (le_trans mn nk), ih, decreasingInduction_succ]\n[GOAL]\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm n : \u2115\nsmn : m + 1 \u2264 n\nmn : m \u2264 n\nhP : P n\n\u22a2 decreasingInduction h mn hP = h m (decreasingInduction h smn hP)\n[PROOFSTEP]\nrw [Subsingleton.elim mn (le_trans (le_succ m) smn), decreasingInduction_trans, decreasingInduction_succ']\n[GOAL]\ncase msm\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nh : (n : \u2115) \u2192 P (n + 1) \u2192 P n\nm n : \u2115\nsmn : m + 1 \u2264 n\nmn : m \u2264 n\nhP : P n\n\u22a2 m \u2264 m + 1\n[PROOFSTEP]\napply Nat.le_succ\n[GOAL]\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n : \u2115\nh : (k : \u2115) \u2192 k < n \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k\nmn : m \u2264 n\nhP : P n\n\u22a2 P m\n[PROOFSTEP]\nrevert h hP\n[GOAL]\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n : \u2115\nmn : m \u2264 n\n\u22a2 ((k : \u2115) \u2192 k < n \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k) \u2192 P n \u2192 P m\n[PROOFSTEP]\nrefine' leRecOn' mn _ _\n[GOAL]\ncase refine'_1\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n : \u2115\nmn : m \u2264 n\n\u22a2 \u2983k : \u2115\u2984 \u2192\n    m \u2264 k \u2192\n      (((k_1 : \u2115) \u2192 k_1 < k \u2192 m \u2264 k_1 \u2192 P (k_1 + 1) \u2192 P k_1) \u2192 P k \u2192 P m) \u2192\n        ((k_1 : \u2115) \u2192 k_1 < k + 1 \u2192 m \u2264 k_1 \u2192 P (k_1 + 1) \u2192 P k_1) \u2192 P (k + 1) \u2192 P m\n[PROOFSTEP]\nintro n mn ih h hP\n[GOAL]\ncase refine'_1\nm\u271d n\u271d\u00b9 k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n\u271d : \u2115\nmn\u271d : m \u2264 n\u271d\nn : \u2115\nmn : m \u2264 n\nih : ((k : \u2115) \u2192 k < n \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k) \u2192 P n \u2192 P m\nh : (k : \u2115) \u2192 k < n + 1 \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k\nhP : P (n + 1)\n\u22a2 P m\n[PROOFSTEP]\napply ih\n[GOAL]\ncase refine'_1.h\nm\u271d n\u271d\u00b9 k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n\u271d : \u2115\nmn\u271d : m \u2264 n\u271d\nn : \u2115\nmn : m \u2264 n\nih : ((k : \u2115) \u2192 k < n \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k) \u2192 P n \u2192 P m\nh : (k : \u2115) \u2192 k < n + 1 \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k\nhP : P (n + 1)\n\u22a2 (k : \u2115) \u2192 k < n \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k\n[PROOFSTEP]\nexact fun k hk => h k (Nat.lt.step hk)\n[GOAL]\ncase refine'_1.hP\nm\u271d n\u271d\u00b9 k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n\u271d : \u2115\nmn\u271d : m \u2264 n\u271d\nn : \u2115\nmn : m \u2264 n\nih : ((k : \u2115) \u2192 k < n \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k) \u2192 P n \u2192 P m\nh : (k : \u2115) \u2192 k < n + 1 \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k\nhP : P (n + 1)\n\u22a2 P n\n[PROOFSTEP]\nexact h n (lt_succ_self n) mn hP\n[GOAL]\ncase refine'_2\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n : \u2115\nmn : m \u2264 n\n\u22a2 ((k : \u2115) \u2192 k < m \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k) \u2192 P m \u2192 P m\n[PROOFSTEP]\nintro _ hP\n[GOAL]\ncase refine'_2\nm\u271d n\u271d k : \u2115\nP : \u2115 \u2192 Sort u_1\nm n : \u2115\nmn : m \u2264 n\nh\u271d : (k : \u2115) \u2192 k < m \u2192 m \u2264 k \u2192 P (k + 1) \u2192 P k\nhP : P m\n\u22a2 P m\n[PROOFSTEP]\nexact hP\n[GOAL]\nm n k a b : \u2115\nhb : 0 < b\n\u22a2 1 \u2264 a / b \u2194 b \u2264 a\n[PROOFSTEP]\nrw [le_div_iff_mul_le hb, one_mul]\n[GOAL]\nm\u271d n\u271d k\u271d n m : \u2115\nh : n \u2264 m\nk : \u2115\nk0 : k = 0\n\u22a2 n / k \u2264 m / k\n[PROOFSTEP]\nsimp [k0]\n[GOAL]\nm n k a b : \u2115\nhba : b \u2264 a\nhb : 0 < b\nh : a / b = 0\n\u22a2 a = a % b\n[PROOFSTEP]\nsimpa [h] using (mod_add_div a b).symm\n[GOAL]\nm n k a b c : \u2115\nhc0 : c = 0\n\u22a2 a * (b / c) \u2264 a * b / c\n[PROOFSTEP]\nsimp [hc0]\n[GOAL]\nm n k a b c : \u2115\nhc0 : \u00acc = 0\n\u22a2 a * (b / c) * c \u2264 a * b\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nm n k a b c : \u2115\nhc0 : \u00acc = 0\n\u22a2 a * (b / c * c) \u2264 a * b\n[PROOFSTEP]\nexact Nat.mul_le_mul_left _ (Nat.div_mul_le_self _ _)\n[GOAL]\nm n k a b c : \u2115\nH1 : b \u2223 a\nH2 : a / b = c\n\u22a2 a = b * c\n[PROOFSTEP]\nrw [\u2190 H2, Nat.mul_div_cancel' H1]\n[GOAL]\nm n k a b c : \u2115\nH : 0 < b\nH' : b \u2223 a\n\u22a2 a / b = c \u2194 a = c * b\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm n k a b c : \u2115\nH : 0 < b\nH' : b \u2223 a\n\u22a2 a / b = c \u2194 a = b * c\n[PROOFSTEP]\nexact Nat.div_eq_iff_eq_mul_right H H'\n[GOAL]\nm n k a b c : \u2115\nH1 : b \u2223 a\nH2 : a / b = c\n\u22a2 a = c * b\n[PROOFSTEP]\nrw [mul_comm, Nat.eq_mul_of_div_eq_right H1 H2]\n[GOAL]\nm n k a b : \u2115\nHd : a \u2223 b\n\u22a2 a * (b / a) = b\n[PROOFSTEP]\nrw [mul_comm, Nat.div_mul_cancel Hd]\n[GOAL]\nm n k a b : \u2115\nhb : 0 < b\n\u22a2 a < a / b * b + b\n[PROOFSTEP]\nrw [\u2190 Nat.succ_mul, \u2190 Nat.div_lt_iff_lt_mul hb]\n[GOAL]\nm n k a b : \u2115\nhb : 0 < b\n\u22a2 a / b < succ (a / b)\n[PROOFSTEP]\nexact Nat.lt_succ_self _\n[GOAL]\nm n k a b d : \u2115\nhda : d \u2223 a\nhdb : d \u2223 b\n\u22a2 a / d = b / d \u2194 a = b\n[PROOFSTEP]\nrefine \u27e8fun h => ?_, congr_arg fun n => n / d\u27e9\n[GOAL]\nm n k a b d : \u2115\nhda : d \u2223 a\nhdb : d \u2223 b\nh : a / d = b / d\n\u22a2 a = b\n[PROOFSTEP]\nrw [\u2190 Nat.mul_div_cancel' hda, \u2190 Nat.mul_div_cancel' hdb, h]\n[GOAL]\nm n k a b : \u2115\nh : b \u2260 0\n\u22a2 a % b = a \u2194 a < b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase zero\nm n k a : \u2115\nh : zero \u2260 0\n\u22a2 a % zero = a \u2194 a < zero\ncase succ m n k a n\u271d : \u2115 h : succ n\u271d \u2260 0 \u22a2 a % succ n\u271d = a \u2194 a < succ n\u271d\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nm n k a n\u271d : \u2115\nh : succ n\u271d \u2260 0\n\u22a2 a % succ n\u271d = a \u2194 a < succ n\u271d\n[PROOFSTEP]\nexact \u27e8fun h => h.ge.trans_lt (mod_lt _ (succ_pos _)), mod_eq_of_lt\u27e9\n[GOAL]\nm\u271d n k\u271d m k : \u2115\n\u22a2 m % k + m / k * k = m\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm\u271d n k\u271d m k : \u2115\n\u22a2 m % k + k * (m / k) = m\n[PROOFSTEP]\nexact mod_add_div _ _\n[GOAL]\nm\u271d n k\u271d m k : \u2115\n\u22a2 m / k * k + m % k = m\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm\u271d n k\u271d m k : \u2115\n\u22a2 k * (m / k) + m % k = m\n[PROOFSTEP]\nexact div_add_mod _ _\n[GOAL]\nm\u271d n\u271d k\u271d n k m d : \u2115\nh : 0 < k\nx\u271d : m + k * d = n \u2227 m < k\nh\u2081 : m + k * d = n\nh\u2082 : m < k\n\u22a2 (m + k * d) / k = d \u2227 (m + k * d) % k = m\n[PROOFSTEP]\nrw [add_mul_div_left _ _ h, add_mul_mod_self_left]\n[GOAL]\nm\u271d n\u271d k\u271d n k m d : \u2115\nh : 0 < k\nx\u271d : m + k * d = n \u2227 m < k\nh\u2081 : m + k * d = n\nh\u2082 : m < k\n\u22a2 m / k + d = d \u2227 m % k = m\n[PROOFSTEP]\nsimp [div_eq_of_lt, mod_eq_of_lt, h\u2082]\n[GOAL]\nm n k a b c : \u2115\nha : 0 < a\nd : \u2115\n\u22a2 a * c = a * b * d \u2194 c = b * d\n[PROOFSTEP]\nrw [mul_assoc, mul_right_inj' ha.ne']\n[GOAL]\nm n k a b c : \u2115\nhc : 0 < c\nd : \u2115\n\u22a2 b * c = a * c * d \u2194 b = a * d\n[PROOFSTEP]\nrw [mul_right_comm, mul_left_inj' hc.ne']\n[GOAL]\nm\u271d n\u271d k\u271d n m k : \u2115\nh : m \u2223 k\n\u22a2 n % k % m = n % m\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [\u2190 mod_add_div n k]\n[GOAL]\nm\u271d n\u271d k\u271d n m k : \u2115\nh : m \u2223 k\n| n % k % m = n % m\n[PROOFSTEP]\n  rhs\n  rw [\u2190 mod_add_div n k]\n[GOAL]\nm\u271d n\u271d k\u271d n m k : \u2115\nh : m \u2223 k\n| n % k % m = n % m\n[PROOFSTEP]\n  rhs\n  rw [\u2190 mod_add_div n k]\n[GOAL]\nm\u271d n\u271d k\u271d n m k : \u2115\nh : m \u2223 k\n| n % k % m = n % m\n[PROOFSTEP]\nrhs\n[GOAL]\nm\u271d n\u271d k\u271d n m k : \u2115\nh : m \u2223 k\n| n % m\n[PROOFSTEP]\nrw [\u2190 mod_add_div n k]\n[GOAL]\nm\u271d n\u271d k\u271d n m k : \u2115\nh : m \u2223 k\n\u22a2 n % k % m = (n % k + k * (n / k)) % m\n[PROOFSTEP]\nrcases h with \u27e8t, rfl\u27e9\n[GOAL]\ncase intro\nm\u271d n\u271d k n m t : \u2115\n\u22a2 n % (m * t) % m = (n % (m * t) + m * t * (n / (m * t))) % m\n[PROOFSTEP]\nrw [mul_assoc, add_mul_mod_self_left]\n[GOAL]\nm\u271d n\u271d k\u271d m n k i : \u2115\nH : m % n = k % n\n\u22a2 (m + i) % n = (k + i) % n\n[PROOFSTEP]\nrw [\u2190 mod_add_mod, \u2190 mod_add_mod k, H]\n[GOAL]\nm\u271d n\u271d k\u271d m n k i : \u2115\nH : m % n = k % n\n\u22a2 (i + m) % n = (i + k) % n\n[PROOFSTEP]\nrw [add_comm, add_mod_eq_add_mod_right _ H, add_comm]\n[GOAL]\nm n k a b c : \u2115\nhab : c \u2223 b\nh : a \u2223 b / c\nh1 : \u2203 d, b / c = a * d\nd : \u2115\nhd : b / c = a * d\nh3 : b = a * d * c\n\u22a2 b = c * a * d\n[PROOFSTEP]\nrwa [mul_comm, \u2190 mul_assoc] at h3 \n[GOAL]\nm n k a b : \u2115\nw : a \u2223 b\nh : b / a = 1\n\u22a2 a = b\n[PROOFSTEP]\nrw [\u2190 Nat.div_mul_cancel w, h, one_mul]\n[GOAL]\nm n k a b : \u2115\nw : a \u2223 b\nh : b / a = 0\n\u22a2 b = 0\n[PROOFSTEP]\nrw [\u2190 Nat.div_mul_cancel w, h, zero_mul]\n[GOAL]\nm\u271d n\u271d k m n : \u2115\nn0 : 0 < n\n\u22a2 m < n * (m / n + 1)\n[PROOFSTEP]\nrw [mul_comm, \u2190 Nat.div_lt_iff_lt_mul' n0]\n[GOAL]\nm\u271d n\u271d k m n : \u2115\nn0 : 0 < n\n\u22a2 m / n < m / n + 1\n[PROOFSTEP]\nexact lt_succ_self _\n[GOAL]\nm n k a b c : \u2115\n\u22a2 (a * b + c) % b = c % b\n[PROOFSTEP]\nsimp [Nat.add_mod]\n[GOAL]\nm n k a b c : \u2115\nh : c < b\n\u22a2 (a * b + c) % b = c\n[PROOFSTEP]\nrw [Nat.mul_add_mod, Nat.mod_eq_of_lt h]\n[GOAL]\nm n\u271d k n : \u2115\n\u22a2 pred n = n \u2194 n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm n k : \u2115\n\u22a2 pred zero = zero \u2194 zero = 0\n[PROOFSTEP]\nsimp [(Nat.succ_ne_self _).symm]\n[GOAL]\ncase succ\nm n k n\u271d : \u2115\n\u22a2 pred (succ n\u271d) = succ n\u271d \u2194 succ n\u271d = 0\n[PROOFSTEP]\nsimp [(Nat.succ_ne_self _).symm]\n[GOAL]\nm n k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\n\u22a2 Nat.find h = m \u2194 p m \u2227 \u2200 (n : \u2115), n < m \u2192 \u00acp n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nm n k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\n\u22a2 Nat.find h = m \u2192 p m \u2227 \u2200 (n : \u2115), n < m \u2192 \u00acp n\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nn k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\n\u22a2 p (Nat.find h) \u2227 \u2200 (n : \u2115), n < Nat.find h \u2192 \u00acp n\n[PROOFSTEP]\nexact \u27e8Nat.find_spec h, fun _ => Nat.find_min h\u27e9\n[GOAL]\ncase mpr\nm n k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\n\u22a2 (p m \u2227 \u2200 (n : \u2115), n < m \u2192 \u00acp n) \u2192 Nat.find h = m\n[PROOFSTEP]\nrintro \u27e8hm, hlt\u27e9\n[GOAL]\ncase mpr.intro\nm n k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\nhm : p m\nhlt : \u2200 (n : \u2115), n < m \u2192 \u00acp n\n\u22a2 Nat.find h = m\n[PROOFSTEP]\nexact le_antisymm (Nat.find_min' h hm) (not_lt.1 <| imp_not_comm.1 (hlt _) <| Nat.find_spec h)\n[GOAL]\nm n\u271d k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\nn : \u2115\n\u22a2 Nat.find h \u2264 n \u2194 \u2203 m, m \u2264 n \u2227 p m\n[PROOFSTEP]\nsimp only [exists_prop, \u2190 lt_succ_iff, find_lt_iff]\n[GOAL]\nm n\u271d k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\nn : \u2115\n\u22a2 n \u2264 Nat.find h \u2194 \u2200 (m : \u2115), m < n \u2192 \u00acp m\n[PROOFSTEP]\nsimp_rw [\u2190 not_lt, find_lt_iff, not_exists, not_and]\n[GOAL]\nm n\u271d k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\nn : \u2115\n\u22a2 n < Nat.find h \u2194 \u2200 (m : \u2115), m \u2264 n \u2192 \u00acp m\n[PROOFSTEP]\nsimp only [\u2190 succ_le_iff, le_find_iff, succ_le_succ_iff]\n[GOAL]\nm n k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh : \u2203 n, p n\n\u22a2 Nat.find h = 0 \u2194 p 0\n[PROOFSTEP]\nsimp [find_eq_iff]\n[GOAL]\nm n k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh\u2081 : \u2203 n, p n\nh\u2082 : \u2203 n, p (n + 1)\nh0 : \u00acp 0\n\u22a2 Nat.find h\u2081 = Nat.find h\u2082 + 1\n[PROOFSTEP]\nrefine' (find_eq_iff _).2 \u27e8Nat.find_spec h\u2082, fun n hn => _\u27e9\n[GOAL]\nm n\u271d k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh\u2081 : \u2203 n, p n\nh\u2082 : \u2203 n, p (n + 1)\nh0 : \u00acp 0\nn : \u2115\nhn : n < Nat.find h\u2082 + 1\n\u22a2 \u00acp n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nm n k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh\u2081 : \u2203 n, p n\nh\u2082 : \u2203 n, p (n + 1)\nh0 : \u00acp 0\nhn : zero < Nat.find h\u2082 + 1\n\u22a2 \u00acp zero\ncase succ\nm n\u271d k : \u2115\np q : \u2115 \u2192 Prop\ninst\u271d\u00b9 : DecidablePred p\ninst\u271d : DecidablePred q\nh\u2081 : \u2203 n, p n\nh\u2082 : \u2203 n, p (n + 1)\nh0 : \u00acp 0\nn : \u2115\nhn : succ n < Nat.find h\u2082 + 1\n\u22a2 \u00acp (succ n)\n[PROOFSTEP]\nexacts [h0, @Nat.find_min (fun n => p (n + 1)) _ h\u2082 _ (succ_lt_succ_iff.1 hn)]\n[GOAL]\nm n\u271d k : \u2115\nP Q : \u2115 \u2192 Prop\ninst\u271d : DecidablePred P\nb n : \u2115\nh : P (n + 1)\n\u22a2 Nat.findGreatest P (n + 1) = n + 1\n[PROOFSTEP]\nsimp [Nat.findGreatest, h]\n[GOAL]\nm n k : \u2115\nP Q : \u2115 \u2192 Prop\ninst\u271d : DecidablePred P\nb : \u2115\nh : \u00acP (b + 1)\n\u22a2 Nat.findGreatest P (b + 1) = Nat.findGreatest P b\n[PROOFSTEP]\nsimp [Nat.findGreatest, h]\n[GOAL]\nm n\u271d k : \u2115\nP : (k : \u2115) \u2192 k < 0 \u2192 Prop\nx\u271d : (n : \u2115) \u2192 (h : n < 0) \u2192 Decidable (P n h)\nn : \u2115\nh : n < 0\n\u22a2 P n h\n[PROOFSTEP]\ncases h\n[GOAL]\nm n\u271d k n : \u2115\nP : (k : \u2115) \u2192 k < n + 1 \u2192 Prop\nH : (n_1 : \u2115) \u2192 (h : n_1 < n + 1) \u2192 Decidable (P n_1 h)\n\u22a2 Decidable (\u2200 (n_1 : \u2115) (h : n_1 < n + 1), P n_1 h)\n[PROOFSTEP]\ncases' decidableBallLT n fun k h => P k (lt_succ_of_lt h) with h h\n[GOAL]\ncase isFalse\nm n\u271d k n : \u2115\nP : (k : \u2115) \u2192 k < n + 1 \u2192 Prop\nH : (n_1 : \u2115) \u2192 (h : n_1 < n + 1) \u2192 Decidable (P n_1 h)\nh : \u00ac\u2200 (n_1 : \u2115) (h : n_1 < n), P n_1 (_ : n_1 < succ n)\n\u22a2 Decidable (\u2200 (n_1 : \u2115) (h : n_1 < n + 1), P n_1 h)\n[PROOFSTEP]\nrefine' isFalse (mt _ h)\n[GOAL]\ncase isFalse\nm n\u271d k n : \u2115\nP : (k : \u2115) \u2192 k < n + 1 \u2192 Prop\nH : (n_1 : \u2115) \u2192 (h : n_1 < n + 1) \u2192 Decidable (P n_1 h)\nh : \u00ac\u2200 (n_1 : \u2115) (h : n_1 < n), P n_1 (_ : n_1 < succ n)\n\u22a2 (\u2200 (n_1 : \u2115) (h : n_1 < n + 1), P n_1 h) \u2192 \u2200 (n_1 : \u2115) (h : n_1 < n), P n_1 (_ : n_1 < succ n)\n[PROOFSTEP]\nintro hn k h\n[GOAL]\ncase isFalse\nm n\u271d k\u271d n : \u2115\nP : (k : \u2115) \u2192 k < n + 1 \u2192 Prop\nH : (n_1 : \u2115) \u2192 (h : n_1 < n + 1) \u2192 Decidable (P n_1 h)\nh\u271d : \u00ac\u2200 (n_1 : \u2115) (h : n_1 < n), P n_1 (_ : n_1 < succ n)\nhn : \u2200 (n_1 : \u2115) (h : n_1 < n + 1), P n_1 h\nk : \u2115\nh : k < n\n\u22a2 P k (_ : k < succ n)\n[PROOFSTEP]\napply hn\n[GOAL]\ncase isTrue\nm n\u271d k n : \u2115\nP : (k : \u2115) \u2192 k < n + 1 \u2192 Prop\nH : (n_1 : \u2115) \u2192 (h : n_1 < n + 1) \u2192 Decidable (P n_1 h)\nh : \u2200 (n_1 : \u2115) (h : n_1 < n), P n_1 (_ : n_1 < succ n)\n\u22a2 Decidable (\u2200 (n_1 : \u2115) (h : n_1 < n + 1), P n_1 h)\n[PROOFSTEP]\nby_cases p : P n (lt_succ_self n)\n[GOAL]\ncase pos\nm n\u271d k n : \u2115\nP : (k : \u2115) \u2192 k < n + 1 \u2192 Prop\nH : (n_1 : \u2115) \u2192 (h : n_1 < n + 1) \u2192 Decidable (P n_1 h)\nh : \u2200 (n_1 : \u2115) (h : n_1 < n), P n_1 (_ : n_1 < succ n)\np : P n (_ : n < succ n)\n\u22a2 Decidable (\u2200 (n_1 : \u2115) (h : n_1 < n + 1), P n_1 h)\n[PROOFSTEP]\nexact\n  isTrue fun k h' =>\n    (le_of_lt_succ h').lt_or_eq_dec.elim (h _) fun e =>\n      match k, e, h' with\n      | _, rfl, _ => p\n[GOAL]\ncase neg\nm n\u271d k n : \u2115\nP : (k : \u2115) \u2192 k < n + 1 \u2192 Prop\nH : (n_1 : \u2115) \u2192 (h : n_1 < n + 1) \u2192 Decidable (P n_1 h)\nh : \u2200 (n_1 : \u2115) (h : n_1 < n), P n_1 (_ : n_1 < succ n)\np : \u00acP n (_ : n < succ n)\n\u22a2 Decidable (\u2200 (n_1 : \u2115) (h : n_1 < n + 1), P n_1 h)\n[PROOFSTEP]\nexact isFalse (mt (fun hn => hn _ _) p)\n[GOAL]\nm n k : \u2115\nP : \u2115 \u2192 Prop\nh : DecidablePred P\n\u22a2 \u00ac(fun n => \u2203 m, m < n \u2227 P m) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Prop\nh : DecidablePred P\nn : \u2115\n\u22a2 (fun n_1 => \u2203 m, m < n_1 \u2227 ?m.69545 n m) n \u2228 P n \u2194 (fun n => \u2203 m, m < n \u2227 P m) (n + 1)\n[PROOFSTEP]\nsimp only [lt_succ_iff_lt_or_eq, or_and_right, exists_or, exists_eq_left]\n[GOAL]\nm n\u271d k : \u2115\nP : \u2115 \u2192 Prop\nh : DecidablePred P\nn : \u2115\n\u22a2 (\u2203 m, m < n \u2227 ?m.69545 n m) \u2228 P n \u2194 (\u2203 x, x < n \u2227 P x) \u2228 P n\n[PROOFSTEP]\napply Iff.refl\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Basic", "llama_tokens": 16806, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246118695629, "lm_q2_score": 0.8031737892899221, "lm_q1q2_score": 0.6693044862238304}}
{"text": "[GOAL]\nE : Type u_1\ninst\u271d\u00b2 : NormedAddCommGroup E\ninst\u271d\u00b9 : NormedSpace \u211d E\ninst\u271d : CompleteSpace E\nf : \u211d \u2192 E\na b : \u211d\n\u22a2 \u2a0d (x : \u211d) in a..b, f x = \u2a0d (x : \u211d) in b..a, f x\n[PROOFSTEP]\nrw [setAverage_eq, setAverage_eq, uIoc_comm]\n[GOAL]\nE : Type u_1\ninst\u271d\u00b2 : NormedAddCommGroup E\ninst\u271d\u00b9 : NormedSpace \u211d E\ninst\u271d : CompleteSpace E\nf : \u211d \u2192 E\na b : \u211d\n\u22a2 \u2a0d (x : \u211d) in a..b, f x = (b - a)\u207b\u00b9 \u2022 \u222b (x : \u211d) in a..b, f x\n[PROOFSTEP]\ncases' le_or_lt a b with h h\n[GOAL]\ncase inl\nE : Type u_1\ninst\u271d\u00b2 : NormedAddCommGroup E\ninst\u271d\u00b9 : NormedSpace \u211d E\ninst\u271d : CompleteSpace E\nf : \u211d \u2192 E\na b : \u211d\nh : a \u2264 b\n\u22a2 \u2a0d (x : \u211d) in a..b, f x = (b - a)\u207b\u00b9 \u2022 \u222b (x : \u211d) in a..b, f x\n[PROOFSTEP]\nrw [setAverage_eq, uIoc_of_le h, Real.volume_Ioc, intervalIntegral.integral_of_le h,\n  ENNReal.toReal_ofReal (sub_nonneg.2 h)]\n[GOAL]\ncase inr\nE : Type u_1\ninst\u271d\u00b2 : NormedAddCommGroup E\ninst\u271d\u00b9 : NormedSpace \u211d E\ninst\u271d : CompleteSpace E\nf : \u211d \u2192 E\na b : \u211d\nh : b < a\n\u22a2 \u2a0d (x : \u211d) in a..b, f x = (b - a)\u207b\u00b9 \u2022 \u222b (x : \u211d) in a..b, f x\n[PROOFSTEP]\nrw [setAverage_eq, uIoc_of_lt h, Real.volume_Ioc, intervalIntegral.integral_of_ge h.le,\n  ENNReal.toReal_ofReal (sub_nonneg.2 h.le), smul_neg, \u2190 neg_smul, \u2190 inv_neg, neg_sub]\n[GOAL]\nE : Type u_1\ninst\u271d\u00b2 : NormedAddCommGroup E\ninst\u271d\u00b9 : NormedSpace \u211d E\ninst\u271d : CompleteSpace E\nf : \u211d \u2192 \u211d\na b : \u211d\n\u22a2 \u2a0d (x : \u211d) in a..b, f x = (\u222b (x : \u211d) in a..b, f x) / (b - a)\n[PROOFSTEP]\nrw [interval_average_eq, smul_eq_mul, div_eq_inv_mul]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.IntervalAverage", "llama_tokens": 766, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8633916064586998, "lm_q2_score": 0.7745833893685269, "lm_q1q2_score": 0.6687687968831171}}
{"text": "[GOAL]\nE : Type u_1\nF : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup E\ninst\u271d\u00b2 : NormedAddCommGroup F\ninst\u271d\u00b9 : InnerProductSpace \u211d E\ninst\u271d : InnerProductSpace \u211d F\nf' : E \u2192L[\u211d] F\nh : IsConformalMap f'\nu v : E\n\u22a2 angle (\u2191f' u) (\u2191f' v) = angle u v\n[PROOFSTEP]\nobtain \u27e8c, hc, li, rfl\u27e9 := h\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup E\ninst\u271d\u00b2 : NormedAddCommGroup F\ninst\u271d\u00b9 : InnerProductSpace \u211d E\ninst\u271d : InnerProductSpace \u211d F\nu v : E\nc : \u211d\nhc : c \u2260 0\nli : E \u2192\u2097\u1d62[\u211d] F\n\u22a2 angle (\u2191(c \u2022 LinearIsometry.toContinuousLinearMap li) u) (\u2191(c \u2022 LinearIsometry.toContinuousLinearMap li) v) =\n    angle u v\n[PROOFSTEP]\nexact (angle_smul_smul hc _ _).trans (li.angle_map _ _)\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Unoriented.Conformal", "llama_tokens": 327, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9219218434359675, "lm_q2_score": 0.7248702761768248, "lm_q1q2_score": 0.6682737412648772}}
{"text": "[GOAL]\n\u03b9 : Type u_1\nX : Type u_2\nE : Type u_3\ninst\u271d\u2077 : TopologicalSpace X\ninst\u271d\u2076 : AddCommGroup E\ninst\u271d\u2075 : Module \u211d E\ninst\u271d\u2074 : NormalSpace X\ninst\u271d\u00b3 : ParacompactSpace X\ninst\u271d\u00b2 : TopologicalSpace E\ninst\u271d\u00b9 : ContinuousAdd E\ninst\u271d : ContinuousSMul \u211d E\nt : X \u2192 Set E\nht : \u2200 (x : X), Convex \u211d (t x)\nH : \u2200 (x : X), \u2203 U, U \u2208 \ud835\udcdd x \u2227 \u2203 g, ContinuousOn g U \u2227 \u2200 (y : X), y \u2208 U \u2192 g y \u2208 t y\n\u22a2 \u2203 g, \u2200 (x : X), \u2191g x \u2208 t x\n[PROOFSTEP]\nchoose U hU g hgc hgt using H\n[GOAL]\n\u03b9 : Type u_1\nX : Type u_2\nE : Type u_3\ninst\u271d\u2077 : TopologicalSpace X\ninst\u271d\u2076 : AddCommGroup E\ninst\u271d\u2075 : Module \u211d E\ninst\u271d\u2074 : NormalSpace X\ninst\u271d\u00b3 : ParacompactSpace X\ninst\u271d\u00b2 : TopologicalSpace E\ninst\u271d\u00b9 : ContinuousAdd E\ninst\u271d : ContinuousSMul \u211d E\nt : X \u2192 Set E\nht : \u2200 (x : X), Convex \u211d (t x)\nU : X \u2192 Set X\nhU : \u2200 (x : X), U x \u2208 \ud835\udcdd x\ng : X \u2192 X \u2192 E\nhgc : \u2200 (x : X), ContinuousOn (g x) (U x)\nhgt : \u2200 (x y : X), y \u2208 U x \u2192 g x y \u2208 t y\n\u22a2 \u2203 g, \u2200 (x : X), \u2191g x \u2208 t x\n[PROOFSTEP]\nobtain \u27e8f, hf\u27e9 :=\n  PartitionOfUnity.exists_isSubordinate isClosed_univ (fun x => interior (U x)) (fun x => isOpen_interior) fun x _ =>\n    mem_iUnion.2 \u27e8x, mem_interior_iff_mem_nhds.2 (hU x)\u27e9\n[GOAL]\ncase intro\n\u03b9 : Type u_1\nX : Type u_2\nE : Type u_3\ninst\u271d\u2077 : TopologicalSpace X\ninst\u271d\u2076 : AddCommGroup E\ninst\u271d\u2075 : Module \u211d E\ninst\u271d\u2074 : NormalSpace X\ninst\u271d\u00b3 : ParacompactSpace X\ninst\u271d\u00b2 : TopologicalSpace E\ninst\u271d\u00b9 : ContinuousAdd E\ninst\u271d : ContinuousSMul \u211d E\nt : X \u2192 Set E\nht : \u2200 (x : X), Convex \u211d (t x)\nU : X \u2192 Set X\nhU : \u2200 (x : X), U x \u2208 \ud835\udcdd x\ng : X \u2192 X \u2192 E\nhgc : \u2200 (x : X), ContinuousOn (g x) (U x)\nhgt : \u2200 (x y : X), y \u2208 U x \u2192 g x y \u2208 t y\nf : PartitionOfUnity X X univ\nhf : PartitionOfUnity.IsSubordinate f fun x => interior (U x)\n\u22a2 \u2203 g, \u2200 (x : X), \u2191g x \u2208 t x\n[PROOFSTEP]\nrefine'\n  \u27e8\u27e8fun x => \u2211\u1da0 i, f i x \u2022 g i x,\n      hf.continuous_finsum_smul (fun i => isOpen_interior) fun i => (hgc i).mono interior_subset\u27e9,\n    fun x => f.finsum_smul_mem_convex (mem_univ x) (fun i hi => hgt _ _ _) (ht _)\u27e9\n[GOAL]\ncase intro\n\u03b9 : Type u_1\nX : Type u_2\nE : Type u_3\ninst\u271d\u2077 : TopologicalSpace X\ninst\u271d\u2076 : AddCommGroup E\ninst\u271d\u2075 : Module \u211d E\ninst\u271d\u2074 : NormalSpace X\ninst\u271d\u00b3 : ParacompactSpace X\ninst\u271d\u00b2 : TopologicalSpace E\ninst\u271d\u00b9 : ContinuousAdd E\ninst\u271d : ContinuousSMul \u211d E\nt : X \u2192 Set E\nht : \u2200 (x : X), Convex \u211d (t x)\nU : X \u2192 Set X\nhU : \u2200 (x : X), U x \u2208 \ud835\udcdd x\ng : X \u2192 X \u2192 E\nhgc : \u2200 (x : X), ContinuousOn (g x) (U x)\nhgt : \u2200 (x y : X), y \u2208 U x \u2192 g x y \u2208 t y\nf : PartitionOfUnity X X univ\nhf : PartitionOfUnity.IsSubordinate f fun x => interior (U x)\nx i : X\nhi : \u2191(\u2191f i) x \u2260 0\n\u22a2 x \u2208 U i\n[PROOFSTEP]\nexact interior_subset (hf _ <| subset_closure hi)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.PartitionOfUnity", "llama_tokens": 1277, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8918110511888303, "lm_q2_score": 0.7490872075132153, "lm_q1q2_score": 0.668044249964466}}
{"text": "[GOAL]\nn : \u2115\n\u22a2 fib (n + 2) = fib n + fib (n + 1)\n[PROOFSTEP]\nsimp [fib, Function.iterate_succ_apply']\n[GOAL]\nn : \u2115\n\u22a2 fib n \u2264 fib (n + 1)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n\u22a2 fib zero \u2264 fib (zero + 1)\n[PROOFSTEP]\nsimp [fib_add_two]\n[GOAL]\ncase succ\nn\u271d : \u2115\n\u22a2 fib (succ n\u271d) \u2264 fib (succ n\u271d + 1)\n[PROOFSTEP]\nsimp [fib_add_two]\n[GOAL]\nn : \u2115\nn_pos : 0 < n\n\u22a2 0 < fib 1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : \u2115\n\u22a2 fib (n + 2) - fib (n + 1) = fib n\n[PROOFSTEP]\nrw [fib_add_two, add_tsub_cancel_right]\n[GOAL]\nn : \u2115\nhn : 2 \u2264 n\n\u22a2 fib n < fib (n + 1)\n[PROOFSTEP]\nrcases exists_add_of_le hn with \u27e8n, rfl\u27e9\n[GOAL]\ncase intro\nn : \u2115\nhn : 2 \u2264 2 + n\n\u22a2 fib (2 + n) < fib (2 + n + 1)\n[PROOFSTEP]\nrw [\u2190 tsub_pos_iff_lt, add_comm 2, fib_add_two_sub_fib_add_one]\n[GOAL]\ncase intro\nn : \u2115\nhn : 2 \u2264 2 + n\n\u22a2 0 < fib (n + 1)\n[PROOFSTEP]\napply fib_pos (succ_pos n)\n[GOAL]\n\u22a2 StrictMono fun n => fib (n + 2)\n[PROOFSTEP]\nrefine' strictMono_nat_of_lt_succ fun n => _\n[GOAL]\nn : \u2115\n\u22a2 fib (n + 2) < fib (n + 1 + 2)\n[PROOFSTEP]\nrw [add_right_comm]\n[GOAL]\nn : \u2115\n\u22a2 fib (n + 2) < fib (n + 2 + 1)\n[PROOFSTEP]\nexact fib_lt_fib_succ (self_le_add_left _ _)\n[GOAL]\nn : \u2115\nfive_le_n : 5 \u2264 n\n\u22a2 n \u2264 fib n\n[PROOFSTEP]\ninduction' five_le_n with n five_le_n IH\n[GOAL]\ncase refl\nn : \u2115\n\u22a2 5 \u2264 fib 5\n[PROOFSTEP]\nrfl\n[GOAL]\ncase step\nn\u271d n : \u2115\nfive_le_n : Nat.le 5 n\nIH : n \u2264 fib n\n\u22a2 succ n \u2264 fib (succ n)\n[PROOFSTEP]\nrw [succ_le_iff]\n[GOAL]\ncase step\nn\u271d n : \u2115\nfive_le_n : Nat.le 5 n\nIH : n \u2264 fib n\n\u22a2 n < fib (succ n)\n[PROOFSTEP]\ncalc\n  n \u2264 fib n := IH\n  _ < fib (n + 1) := fib_lt_fib_succ (le_trans (by decide) five_le_n)\n[GOAL]\nn\u271d n : \u2115\nfive_le_n : Nat.le 5 n\nIH : n \u2264 fib n\n\u22a2 2 \u2264 5\n[PROOFSTEP]\ndecide\n[GOAL]\nn : \u2115\n\u22a2 coprime (fib n) (fib (n + 1))\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\n\u22a2 coprime (fib zero) (fib (zero + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn : \u2115\nih : coprime (fib n) (fib (n + 1))\n\u22a2 coprime (fib (succ n)) (fib (succ n + 1))\n[PROOFSTEP]\nrw [fib_add_two]\n[GOAL]\ncase succ\nn : \u2115\nih : coprime (fib n) (fib (n + 1))\n\u22a2 coprime (fib (succ n)) (fib n + fib (n + 1))\n[PROOFSTEP]\nsimp only [coprime_add_self_right]\n[GOAL]\ncase succ\nn : \u2115\nih : coprime (fib n) (fib (n + 1))\n\u22a2 coprime (fib (succ n)) (fib n)\n[PROOFSTEP]\nsimp [coprime, ih.symm]\n[GOAL]\nm n : \u2115\n\u22a2 fib (m + n + 1) = fib m * fib n + fib (m + 1) * fib (n + 1)\n[PROOFSTEP]\ninduction' n with n ih generalizing m\n[GOAL]\ncase zero\nm\u271d m : \u2115\n\u22a2 fib (m + zero + 1) = fib m * fib zero + fib (m + 1) * fib (zero + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nm\u271d n : \u2115\nih : \u2200 (m : \u2115), fib (m + n + 1) = fib m * fib n + fib (m + 1) * fib (n + 1)\nm : \u2115\n\u22a2 fib (m + succ n + 1) = fib m * fib (succ n) + fib (m + 1) * fib (succ n + 1)\n[PROOFSTEP]\nintros\n[GOAL]\ncase succ\nm\u271d n : \u2115\nih : \u2200 (m : \u2115), fib (m + n + 1) = fib m * fib n + fib (m + 1) * fib (n + 1)\nm : \u2115\n\u22a2 fib (m + succ n + 1) = fib m * fib (succ n) + fib (m + 1) * fib (succ n + 1)\n[PROOFSTEP]\nspecialize ih (m + 1)\n[GOAL]\ncase succ\nm\u271d n m : \u2115\nih : fib (m + 1 + n + 1) = fib (m + 1) * fib n + fib (m + 1 + 1) * fib (n + 1)\n\u22a2 fib (m + succ n + 1) = fib m * fib (succ n) + fib (m + 1) * fib (succ n + 1)\n[PROOFSTEP]\nrw [add_assoc m 1 n, add_comm 1 n] at ih \n[GOAL]\ncase succ\nm\u271d n m : \u2115\nih : fib (m + (n + 1) + 1) = fib (m + 1) * fib n + fib (m + 1 + 1) * fib (n + 1)\n\u22a2 fib (m + succ n + 1) = fib m * fib (succ n) + fib (m + 1) * fib (succ n + 1)\n[PROOFSTEP]\nsimp only [fib_add_two, ih]\n[GOAL]\ncase succ\nm\u271d n m : \u2115\nih : fib (m + (n + 1) + 1) = fib (m + 1) * fib n + fib (m + 1 + 1) * fib (n + 1)\n\u22a2 fib (m + 1) * fib n + (fib m + fib (m + 1)) * fib (n + 1) = fib m * fib (succ n) + fib (m + 1) * (fib n + fib (n + 1))\n[PROOFSTEP]\nring\n[GOAL]\nn : \u2115\n\u22a2 fib (2 * n) = fib n * (2 * fib (n + 1) - fib n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n\u22a2 fib (2 * zero) = fib zero * (2 * fib (zero + 1) - fib zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn\u271d : \u2115\n\u22a2 fib (2 * succ n\u271d) = fib (succ n\u271d) * (2 * fib (succ n\u271d + 1) - fib (succ n\u271d))\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, two_mul, \u2190 add_assoc, fib_add, fib_add_two, two_mul]\n[GOAL]\ncase succ\nn\u271d : \u2115\n\u22a2 fib (n\u271d + 1) * fib n\u271d + (fib n\u271d + fib (n\u271d + 1)) * fib (n\u271d + 1) =\n    fib (n\u271d + 1) * (fib n\u271d + fib (n\u271d + 1) + (fib n\u271d + fib (n\u271d + 1)) - fib (n\u271d + 1))\n[PROOFSTEP]\nsimp only [\u2190 add_assoc, add_tsub_cancel_right]\n[GOAL]\ncase succ\nn\u271d : \u2115\n\u22a2 fib (n\u271d + 1) * fib n\u271d + (fib n\u271d + fib (n\u271d + 1)) * fib (n\u271d + 1) = fib (n\u271d + 1) * (fib n\u271d + fib (n\u271d + 1) + fib n\u271d)\n[PROOFSTEP]\nring\n[GOAL]\nn : \u2115\n\u22a2 fib (2 * n + 1) = fib (n + 1) ^ 2 + fib n ^ 2\n[PROOFSTEP]\nrw [two_mul, fib_add]\n[GOAL]\nn : \u2115\n\u22a2 fib n * fib n + fib (n + 1) * fib (n + 1) = fib (n + 1) ^ 2 + fib n ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nn : \u2115\n\u22a2 fib (2 * n + 2) = fib (n + 1) * (2 * fib n + fib (n + 1))\n[PROOFSTEP]\nrw [fib_add_two, fib_two_mul, fib_two_mul_add_one]\n  -- porting note: A bunch of issues similar to [this zulip thread](https://github.com/leanprover-community/mathlib4/pull/1576) with `zify`\n[GOAL]\nn : \u2115\n\u22a2 fib n * (2 * fib (n + 1) - fib n) + (fib (n + 1) ^ 2 + fib n ^ 2) = fib (n + 1) * (2 * fib n + fib (n + 1))\n[PROOFSTEP]\nhave : fib n \u2264 2 * fib (n + 1) := le_trans (fib_le_fib_succ) (mul_comm 2 _ \u25b8 le_mul_of_pos_right two_pos)\n[GOAL]\nn : \u2115\nthis : fib n \u2264 2 * fib (n + 1)\n\u22a2 fib n * (2 * fib (n + 1) - fib n) + (fib (n + 1) ^ 2 + fib n ^ 2) = fib (n + 1) * (2 * fib n + fib (n + 1))\n[PROOFSTEP]\nzify [this]\n[GOAL]\nn : \u2115\nthis : fib n \u2264 2 * fib (n + 1)\n\u22a2 \u2191(fib n) * (2 * \u2191(fib (n + 1)) - \u2191(fib n)) + (\u2191(fib (n + 1)) ^ 2 + \u2191(fib n) ^ 2) =\n    \u2191(fib (n + 1)) * (2 * \u2191(fib n) + \u2191(fib (n + 1)))\n[PROOFSTEP]\nring\n[GOAL]\nn : \u2115\n\u22a2 fib (bit0 n) = fib n * (2 * fib (n + 1) - fib n)\n[PROOFSTEP]\nrw [bit0_eq_two_mul, fib_two_mul]\n[GOAL]\nn : \u2115\n\u22a2 fib (bit1 n) = fib (n + 1) ^ 2 + fib n ^ 2\n[PROOFSTEP]\nrw [Nat.bit1_eq_succ_bit0, bit0_eq_two_mul, fib_two_mul_add_one]\n[GOAL]\nn : \u2115\n\u22a2 fib (bit1 n + 1) = fib (n + 1) * (2 * fib n + fib (n + 1))\n[PROOFSTEP]\nrw [Nat.bit1_eq_succ_bit0, bit0_eq_two_mul, fib_two_mul_add_two]\n[GOAL]\nn : \u2115\n\u22a2 fastFibAux (bit false n) =\n    let p := fastFibAux n;\n    (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2)\n[PROOFSTEP]\nrw [fastFibAux, binaryRec_eq]\n[GOAL]\nn : \u2115\n\u22a2 (if false = true then\n      ((binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).snd ^\n            2 +\n          (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).fst ^\n            2,\n        (binaryRec (fib 0, fib 1)\n              (fun b x p =>\n                if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n              n).snd *\n          (2 *\n              (binaryRec (fib 0, fib 1)\n                  (fun b x p =>\n                    if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                    else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                  n).fst +\n            (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).snd))\n    else\n      ((binaryRec (fib 0, fib 1)\n              (fun b x p =>\n                if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n              n).fst *\n          (2 *\n              (binaryRec (fib 0, fib 1)\n                  (fun b x p =>\n                    if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                    else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                  n).snd -\n            (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).fst),\n        (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).snd ^\n            2 +\n          (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).fst ^\n            2)) =\n    let p :=\n      binaryRec (fib 0, fib 1)\n        (fun b x p =>\n          if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n          else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n        n;\n    (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h\nn : \u2115\n\u22a2 (if false = true then\n      ((fib 0, fib 1).snd ^ 2 + (fib 0, fib 1).fst ^ 2,\n        (fib 0, fib 1).snd * (2 * (fib 0, fib 1).fst + (fib 0, fib 1).snd))\n    else\n      ((fib 0, fib 1).fst * (2 * (fib 0, fib 1).snd - (fib 0, fib 1).fst),\n        (fib 0, fib 1).snd ^ 2 + (fib 0, fib 1).fst ^ 2)) =\n    (fib 0, fib 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : \u2115\n\u22a2 fastFibAux (bit true n) =\n    let p := fastFibAux n;\n    (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n[PROOFSTEP]\nrw [fastFibAux, binaryRec_eq]\n[GOAL]\nn : \u2115\n\u22a2 (if true = true then\n      ((binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).snd ^\n            2 +\n          (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).fst ^\n            2,\n        (binaryRec (fib 0, fib 1)\n              (fun b x p =>\n                if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n              n).snd *\n          (2 *\n              (binaryRec (fib 0, fib 1)\n                  (fun b x p =>\n                    if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                    else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                  n).fst +\n            (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).snd))\n    else\n      ((binaryRec (fib 0, fib 1)\n              (fun b x p =>\n                if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n              n).fst *\n          (2 *\n              (binaryRec (fib 0, fib 1)\n                  (fun b x p =>\n                    if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                    else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                  n).snd -\n            (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).fst),\n        (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).snd ^\n            2 +\n          (binaryRec (fib 0, fib 1)\n                (fun b x p =>\n                  if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n                  else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n                n).fst ^\n            2)) =\n    let p :=\n      binaryRec (fib 0, fib 1)\n        (fun b x p =>\n          if b = true then (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n          else (p.fst * (2 * p.snd - p.fst), p.snd ^ 2 + p.fst ^ 2))\n        n;\n    (p.snd ^ 2 + p.fst ^ 2, p.snd * (2 * p.fst + p.snd))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h\nn : \u2115\n\u22a2 (if false = true then\n      ((fib 0, fib 1).snd ^ 2 + (fib 0, fib 1).fst ^ 2,\n        (fib 0, fib 1).snd * (2 * (fib 0, fib 1).fst + (fib 0, fib 1).snd))\n    else\n      ((fib 0, fib 1).fst * (2 * (fib 0, fib 1).snd - (fib 0, fib 1).fst),\n        (fib 0, fib 1).snd ^ 2 + (fib 0, fib 1).fst ^ 2)) =\n    (fib 0, fib 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : \u2115\n\u22a2 fastFibAux n = (fib n, fib (n + 1))\n[PROOFSTEP]\napply Nat.binaryRec _ (fun b n' ih => _) n\n[GOAL]\nn : \u2115\n\u22a2 fastFibAux 0 = (fib 0, fib (0 + 1))\n[PROOFSTEP]\nsimp [fastFibAux]\n[GOAL]\nn : \u2115\n\u22a2 \u2200 (b : Bool) (n' : \u2115),\n    fastFibAux n' = (fib n', fib (n' + 1)) \u2192 fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))\n[PROOFSTEP]\nintro b\n[GOAL]\nn : \u2115\nb : Bool\n\u22a2 \u2200 (n' : \u2115), fastFibAux n' = (fib n', fib (n' + 1)) \u2192 fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))\n[PROOFSTEP]\nintro n'\n[GOAL]\nn : \u2115\nb : Bool\nn' : \u2115\n\u22a2 fastFibAux n' = (fib n', fib (n' + 1)) \u2192 fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))\n[PROOFSTEP]\nintro ih\n[GOAL]\nn : \u2115\nb : Bool\nn' : \u2115\nih : fastFibAux n' = (fib n', fib (n' + 1))\n\u22a2 fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn n' : \u2115\nih : fastFibAux n' = (fib n', fib (n' + 1))\n\u22a2 fastFibAux (bit false n') = (fib (bit false n'), fib (bit false n' + 1))\n[PROOFSTEP]\nsimp only [fast_fib_aux_bit_ff, fast_fib_aux_bit_tt, congr_arg Prod.fst ih, congr_arg Prod.snd ih, Prod.mk.inj_iff]\n[GOAL]\ncase true\nn n' : \u2115\nih : fastFibAux n' = (fib n', fib (n' + 1))\n\u22a2 fastFibAux (bit true n') = (fib (bit true n'), fib (bit true n' + 1))\n[PROOFSTEP]\nsimp only [fast_fib_aux_bit_ff, fast_fib_aux_bit_tt, congr_arg Prod.fst ih, congr_arg Prod.snd ih, Prod.mk.inj_iff]\n[GOAL]\ncase false\nn n' : \u2115\nih : fastFibAux n' = (fib n', fib (n' + 1))\n\u22a2 fib n' * (2 * fib (n' + 1) - fib n') = fib (bit false n') \u2227 fib (n' + 1) ^ 2 + fib n' ^ 2 = fib (bit false n' + 1)\n[PROOFSTEP]\nsimp [bit, fib_bit0, fib_bit1, fib_bit0_succ, fib_bit1_succ]\n[GOAL]\ncase true\nn n' : \u2115\nih : fastFibAux n' = (fib n', fib (n' + 1))\n\u22a2 fib (n' + 1) ^ 2 + fib n' ^ 2 = fib (bit true n') \u2227 fib (n' + 1) * (2 * fib n' + fib (n' + 1)) = fib (bit true n' + 1)\n[PROOFSTEP]\nsimp [bit, fib_bit0, fib_bit1, fib_bit0_succ, fib_bit1_succ]\n[GOAL]\nn : \u2115\n\u22a2 fastFib n = fib n\n[PROOFSTEP]\nrw [fastFib, fast_fib_aux_eq]\n[GOAL]\nm n : \u2115\n\u22a2 gcd (fib m) (fib (n + m)) = gcd (fib m) (fib n)\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos n with h h\n[GOAL]\ncase inl\nm n : \u2115\nh : n = 0\n\u22a2 gcd (fib m) (fib (n + m)) = gcd (fib m) (fib n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inl\nm n : \u2115\nh : n = 0\n\u22a2 gcd (fib m) (fib (0 + m)) = gcd (fib m) (fib 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nm n : \u2115\nh : n > 0\n\u22a2 gcd (fib m) (fib (n + m)) = gcd (fib m) (fib n)\n[PROOFSTEP]\nreplace h := Nat.succ_pred_eq_of_pos h\n[GOAL]\ncase inr\nm n : \u2115\nh : succ (pred n) = n\n\u22a2 gcd (fib m) (fib (n + m)) = gcd (fib m) (fib n)\n[PROOFSTEP]\nrw [\u2190 h, succ_eq_add_one]\n[GOAL]\ncase inr\nm n : \u2115\nh : succ (pred n) = n\n\u22a2 gcd (fib m) (fib (pred n + 1 + m)) = gcd (fib m) (fib (pred n + 1))\n[PROOFSTEP]\ncalc\n  gcd (fib m) (fib (n.pred + 1 + m)) = gcd (fib m) (fib n.pred * fib m + fib (n.pred + 1) * fib (m + 1)) :=\n    by\n    rw [\u2190 fib_add n.pred _]\n    ring_nf\n  _ = gcd (fib m) (fib (n.pred + 1) * fib (m + 1)) := by rw [add_comm, gcd_add_mul_right_right (fib m) _ (fib n.pred)]\n  _ = gcd (fib m) (fib (n.pred + 1)) :=\n    coprime.gcd_mul_right_cancel_right (fib (n.pred + 1)) (coprime.symm (fib_coprime_fib_succ m))\n[GOAL]\nm n : \u2115\nh : succ (pred n) = n\n\u22a2 gcd (fib m) (fib (pred n + 1 + m)) = gcd (fib m) (fib (pred n) * fib m + fib (pred n + 1) * fib (m + 1))\n[PROOFSTEP]\nrw [\u2190 fib_add n.pred _]\n[GOAL]\nm n : \u2115\nh : succ (pred n) = n\n\u22a2 gcd (fib m) (fib (pred n + 1 + m)) = gcd (fib m) (fib (pred n + m + 1))\n[PROOFSTEP]\nring_nf\n[GOAL]\nm n : \u2115\nh : succ (pred n) = n\n\u22a2 gcd (fib m) (fib (pred n) * fib m + fib (pred n + 1) * fib (m + 1)) = gcd (fib m) (fib (pred n + 1) * fib (m + 1))\n[PROOFSTEP]\nrw [add_comm, gcd_add_mul_right_right (fib m) _ (fib n.pred)]\n[GOAL]\nm n : \u2115\n\u22a2 gcd (fib m) (fib (n + 0 * m)) = gcd (fib m) (fib n)\n[PROOFSTEP]\nsimp\n[GOAL]\nm n k : \u2115\n\u22a2 gcd (fib m) (fib (n + (k + 1) * m)) = gcd (fib m) (fib n)\n[PROOFSTEP]\nrw [\u2190 gcd_fib_add_mul_self m n k, add_mul, \u2190 add_assoc, one_mul, gcd_fib_add_self _ _]\n[GOAL]\nm n : \u2115\n\u22a2 fib (gcd m n) = gcd (fib m) (fib n)\n[PROOFSTEP]\ninduction m, n using Nat.gcd.induction with\n| H0 => simp\n| H1 m n _ h' =>\n  rw [\u2190 gcd_rec m n] at h' \n  conv_rhs => rw [\u2190 mod_add_div' n m]\n  rwa [gcd_fib_add_mul_self m (n % m) (n / m), gcd_comm (fib m) _]\n[GOAL]\nm n : \u2115\n\u22a2 fib (gcd m n) = gcd (fib m) (fib n)\n[PROOFSTEP]\ninduction m, n using Nat.gcd.induction with\n| H0 => simp\n| H1 m n _ h' =>\n  rw [\u2190 gcd_rec m n] at h' \n  conv_rhs => rw [\u2190 mod_add_div' n m]\n  rwa [gcd_fib_add_mul_self m (n % m) (n / m), gcd_comm (fib m) _]\n[GOAL]\ncase H0\nn\u271d : \u2115\n\u22a2 fib (gcd 0 n\u271d) = gcd (fib 0) (fib n\u271d)\n[PROOFSTEP]\n\n| H0 => simp\n[GOAL]\ncase H0\nn\u271d : \u2115\n\u22a2 fib (gcd 0 n\u271d) = gcd (fib 0) (fib n\u271d)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H1\nm n : \u2115\na\u271d : 0 < m\nh' : fib (gcd (n % m) m) = gcd (fib (n % m)) (fib m)\n\u22a2 fib (gcd m n) = gcd (fib m) (fib n)\n[PROOFSTEP]\n\n| H1 m n _ h' =>\n  rw [\u2190 gcd_rec m n] at h' \n  conv_rhs => rw [\u2190 mod_add_div' n m]\n  rwa [gcd_fib_add_mul_self m (n % m) (n / m), gcd_comm (fib m) _]\n[GOAL]\ncase H1\nm n : \u2115\na\u271d : 0 < m\nh' : fib (gcd (n % m) m) = gcd (fib (n % m)) (fib m)\n\u22a2 fib (gcd m n) = gcd (fib m) (fib n)\n[PROOFSTEP]\nrw [\u2190 gcd_rec m n] at h' \n[GOAL]\ncase H1\nm n : \u2115\na\u271d : 0 < m\nh' : fib (gcd m n) = gcd (fib (n % m)) (fib m)\n\u22a2 fib (gcd m n) = gcd (fib m) (fib n)\n[PROOFSTEP]\nconv_rhs => rw [\u2190 mod_add_div' n m]\n[GOAL]\nm n : \u2115\na\u271d : 0 < m\nh' : fib (gcd m n) = gcd (fib (n % m)) (fib m)\n| gcd (fib m) (fib n)\n[PROOFSTEP]\nrw [\u2190 mod_add_div' n m]\n[GOAL]\nm n : \u2115\na\u271d : 0 < m\nh' : fib (gcd m n) = gcd (fib (n % m)) (fib m)\n| gcd (fib m) (fib n)\n[PROOFSTEP]\nrw [\u2190 mod_add_div' n m]\n[GOAL]\nm n : \u2115\na\u271d : 0 < m\nh' : fib (gcd m n) = gcd (fib (n % m)) (fib m)\n| gcd (fib m) (fib n)\n[PROOFSTEP]\nrw [\u2190 mod_add_div' n m]\n[GOAL]\ncase H1\nm n : \u2115\na\u271d : 0 < m\nh' : fib (gcd m n) = gcd (fib (n % m)) (fib m)\n\u22a2 fib (gcd m n) = gcd (fib m) (fib (n % m + n / m * m))\n[PROOFSTEP]\nrwa [gcd_fib_add_mul_self m (n % m) (n / m), gcd_comm (fib m) _]\n[GOAL]\nm n : \u2115\nh : m \u2223 n\n\u22a2 fib m \u2223 fib n\n[PROOFSTEP]\nrwa [gcd_eq_left_iff_dvd, \u2190 fib_gcd, gcd_eq_left_iff_dvd.mp]\n[GOAL]\nn : \u2115\nh1 : fib (n + 1) = \u2211 p in Finset.Nat.antidiagonal n, choose p.fst p.snd\nh2 : fib (succ n + 1) = \u2211 p in Finset.Nat.antidiagonal (succ n), choose p.fst p.snd\n\u22a2 fib (succ (succ n) + 1) = \u2211 p in Finset.Nat.antidiagonal (succ (succ n)), choose p.fst p.snd\n[PROOFSTEP]\nrw [fib_add_two, h1, h2, Finset.Nat.antidiagonal_succ_succ', Finset.Nat.antidiagonal_succ']\n[GOAL]\nn : \u2115\nh1 : fib (n + 1) = \u2211 p in Finset.Nat.antidiagonal n, choose p.fst p.snd\nh2 : fib (succ n + 1) = \u2211 p in Finset.Nat.antidiagonal (succ n), choose p.fst p.snd\n\u22a2 \u2211 p in Finset.Nat.antidiagonal n, choose p.fst p.snd +\n      \u2211 p in\n        Finset.cons (n + 1, 0)\n          (Finset.map (Function.Embedding.prodMap (Function.Embedding.refl \u2115) { toFun := succ, inj' := succ_injective })\n            (Finset.Nat.antidiagonal n))\n          (_ :\n            \u00ac(n + 1, 0) \u2208\n                Finset.map\n                  (Function.Embedding.prodMap (Function.Embedding.refl \u2115) { toFun := succ, inj' := succ_injective })\n                  (Finset.Nat.antidiagonal n)),\n        choose p.fst p.snd =\n    \u2211 p in\n      Finset.cons (0, n + 2)\n        (Finset.cons (n + 2, 0)\n          (Finset.map\n            (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }\n              { toFun := succ, inj' := succ_injective })\n            (Finset.Nat.antidiagonal n))\n          (_ :\n            \u00ac(n + 2, 0) \u2208\n                Finset.map\n                  (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }\n                    { toFun := succ, inj' := succ_injective })\n                  (Finset.Nat.antidiagonal n)))\n        (_ :\n          \u00ac(0, n + 2) \u2208\n              Finset.cons (n + 2, 0)\n                (Finset.map\n                  (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }\n                    { toFun := succ, inj' := succ_injective })\n                  (Finset.Nat.antidiagonal n))\n                (_ :\n                  \u00ac(n + 2, 0) \u2208\n                      Finset.map\n                        (Function.Embedding.prodMap { toFun := succ, inj' := succ_injective }\n                          { toFun := succ, inj' := succ_injective })\n                        (Finset.Nat.antidiagonal n))),\n      choose p.fst p.snd\n[PROOFSTEP]\nsimp [choose_succ_succ, Finset.sum_add_distrib, add_left_comm]\n[GOAL]\nn : \u2115\n\u22a2 fib (n + 1) = \u2211 k in Finset.range n, fib k + 1\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\n\u22a2 fib (zero + 1) = \u2211 k in Finset.range zero, fib k + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn : \u2115\nih : fib (n + 1) = \u2211 k in Finset.range n, fib k + 1\n\u22a2 fib (succ n + 1) = \u2211 k in Finset.range (succ n), fib k + 1\n[PROOFSTEP]\ncalc\n  fib (n + 2) = fib n + fib (n + 1) := fib_add_two\n  _ = (fib n + \u2211 k in Finset.range n, fib k) + 1 := by rw [ih, add_assoc]\n  _ = (\u2211 k in Finset.range (n + 1), fib k) + 1 := by simp [Finset.range_add_one]\n[GOAL]\nn : \u2115\nih : fib (n + 1) = \u2211 k in Finset.range n, fib k + 1\n\u22a2 fib n + fib (n + 1) = fib n + \u2211 k in Finset.range n, fib k + 1\n[PROOFSTEP]\nrw [ih, add_assoc]\n[GOAL]\nn : \u2115\nih : fib (n + 1) = \u2211 k in Finset.range n, fib k + 1\n\u22a2 fib n + \u2211 k in Finset.range n, fib k + 1 = \u2211 k in Finset.range (n + 1), fib k + 1\n[PROOFSTEP]\nsimp [Finset.range_add_one]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Fib", "llama_tokens": 11183, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9136765187126079, "lm_q2_score": 0.7310585669110203, "lm_q1q2_score": 0.6679510463902892}}
{"text": "[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx\u271d y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n k : \u2115\ne : Perm \u03b1\nx : \u03b1\nhx : IsFixedPt f x\n\u22a2 IsFixedPt f (f x)\n[PROOFSTEP]\nconvert hx\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n\u271d k : \u2115\ne : Perm \u03b1\ns : Set \u03b1\nh : IsFixedPt (Set.preimage f) s\nn : \u2115\n\u22a2 IsFixedPt (Set.preimage f^[n]) s\n[PROOFSTEP]\nrw [Set.preimage_iterate_eq]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n\u271d k : \u2115\ne : Perm \u03b1\ns : Set \u03b1\nh : IsFixedPt (Set.preimage f) s\nn : \u2115\n\u22a2 IsFixedPt (Set.preimage f)^[n] s\n[PROOFSTEP]\nexact h.iterate n\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n\u271d k : \u2115\ne : Perm \u03b1\nh : IsFixedPt (\u2191e) x\nn : \u2115\n\u22a2 IsFixedPt (\u2191(e ^ n)) x\n[PROOFSTEP]\nrw [Equiv.Perm.coe_pow]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n\u271d k : \u2115\ne : Perm \u03b1\nh : IsFixedPt (\u2191e) x\nn : \u2115\n\u22a2 IsFixedPt (\u2191e)^[n] x\n[PROOFSTEP]\nexact h.iterate _\n[GOAL]\n\u03b1\u271d : Type u\n\u03b2 : Type v\nf\u271d fa g : \u03b1\u271d \u2192 \u03b1\u271d\nx\u271d y : \u03b1\u271d\nfb : \u03b2 \u2192 \u03b2\nm n k : \u2115\ne : Perm \u03b1\u271d\n\u03b1 : Type u_1\nf : \u03b1 \u2192 \u03b1\nx : \u03b1\n\u22a2 x \u2208 fixedPoints f \u2194 f x = x\n[PROOFSTEP]\nrfl\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n k : \u2115\ne : Perm \u03b1\nx\u271d : \u03b1\n\u22a2 x\u271d \u2208 fixedPoints id \u2194 x\u271d \u2208 Set.univ\n[PROOFSTEP]\nsimpa using isFixedPt_id _\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n k : \u2115\ne : Perm \u03b1\nh : Function.Commute f g\n\u22a2 Set.InvOn f g (fixedPoints (f \u2218 g)) (fixedPoints (f \u2218 g))\n[PROOFSTEP]\nsimpa only [h.comp_eq] using Function.invOn_fixedPoints_comp f g\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n k : \u2115\ne : Perm \u03b1\nh : Function.Commute f g\n\u22a2 Set.BijOn f (fixedPoints (f \u2218 g)) (fixedPoints (f \u2218 g))\n[PROOFSTEP]\nsimpa only [h.comp_eq] using bijOn_fixedPoints_comp g f\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\nf fa g : \u03b1 \u2192 \u03b1\nx y : \u03b1\nfb : \u03b2 \u2192 \u03b2\nm n k : \u2115\ne : Perm \u03b1\nh : Function.Commute f g\n\u22a2 Set.BijOn g (fixedPoints (f \u2218 g)) (fixedPoints (f \u2218 g))\n[PROOFSTEP]\nsimpa only [h.comp_eq] using bijOn_fixedPoints_comp f g\n", "meta": {"mathlib_filename": "Mathlib.Dynamics.FixedPoints.Basic", "llama_tokens": 1048, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430394931456, "lm_q2_score": 0.8031738034238807, "lm_q1q2_score": 0.6675523162189945}}
{"text": "[GOAL]\nA : Type u_1\nB : Type u_2\ni : SetLike A B\np q : A\n\u22a2 p < q \u2194 p \u2264 q \u2227 \u2203 x, x \u2208 q \u2227 \u00acx \u2208 p\n[PROOFSTEP]\nrw [lt_iff_le_not_le, not_le_iff_exists]\n", "meta": {"mathlib_filename": "Mathlib.Data.SetLike.Basic", "llama_tokens": 88, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9207896715436482, "lm_q2_score": 0.7248702880639792, "lm_q1q2_score": 0.6674530744581811}}
{"text": "[GOAL]\nG\u2081 : Type u_1\nG\u2082 : Type u_2\ninst\u271d\u00b9 : Semigroup G\u2081\ninst\u271d : Semigroup G\u2082\nx y : G\u2081 \u00d7 G\u2082\n\u22a2 x \u2223 y \u2194 x.fst \u2223 y.fst \u2227 x.snd \u2223 y.snd\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nG\u2081 : Type u_1\nG\u2082 : Type u_2\ninst\u271d\u00b9 : Semigroup G\u2081\ninst\u271d : Semigroup G\u2082\ny : G\u2081 \u00d7 G\u2082\nfst\u271d : G\u2081\nsnd\u271d : G\u2082\n\u22a2 (fst\u271d, snd\u271d) \u2223 y \u2194 (fst\u271d, snd\u271d).fst \u2223 y.fst \u2227 (fst\u271d, snd\u271d).snd \u2223 y.snd\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nG\u2081 : Type u_1\nG\u2082 : Type u_2\ninst\u271d\u00b9 : Semigroup G\u2081\ninst\u271d : Semigroup G\u2082\nfst\u271d\u00b9 : G\u2081\nsnd\u271d\u00b9 : G\u2082\nfst\u271d : G\u2081\nsnd\u271d : G\u2082\n\u22a2 (fst\u271d\u00b9, snd\u271d\u00b9) \u2223 (fst\u271d, snd\u271d) \u2194 (fst\u271d\u00b9, snd\u271d\u00b9).fst \u2223 (fst\u271d, snd\u271d).fst \u2227 (fst\u271d\u00b9, snd\u271d\u00b9).snd \u2223 (fst\u271d, snd\u271d).snd\n[PROOFSTEP]\nsimp only [dvd_def, Prod.exists, Prod.mk_mul_mk, Prod.mk.injEq, exists_and_left, exists_and_right, and_self, true_and]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Divisibility.Prod", "llama_tokens": 490, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357563664174, "lm_q2_score": 0.7690802423634961, "lm_q1q2_score": 0.6668200696441015}}
{"text": "[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 : \u211d\n\u22a2 taylorWithin f (n + 1) s x\u2080 =\n    taylorWithin f n s x\u2080 +\n      \u2191(PolynomialModule.comp (Polynomial.X - \u2191Polynomial.C x\u2080))\n        (\u2191(PolynomialModule.single \u211d (n + 1)) (taylorCoeffWithin f (n + 1) s x\u2080))\n[PROOFSTEP]\ndsimp only [taylorWithin]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 : \u211d\n\u22a2 \u2211 k in Finset.range (n + 1 + 1),\n      \u2191(PolynomialModule.comp (Polynomial.X - \u2191Polynomial.C x\u2080))\n        (\u2191(PolynomialModule.single \u211d k) (taylorCoeffWithin f k s x\u2080)) =\n    \u2211 k in Finset.range (n + 1),\n        \u2191(PolynomialModule.comp (Polynomial.X - \u2191Polynomial.C x\u2080))\n          (\u2191(PolynomialModule.single \u211d k) (taylorCoeffWithin f k s x\u2080)) +\n      \u2191(PolynomialModule.comp (Polynomial.X - \u2191Polynomial.C x\u2080))\n        (\u2191(PolynomialModule.single \u211d (n + 1)) (taylorCoeffWithin f (n + 1) s x\u2080))\n[PROOFSTEP]\nrw [Finset.sum_range_succ]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 taylorWithinEval f (n + 1) s x\u2080 x =\n    taylorWithinEval f n s x\u2080 x + (((\u2191n + 1) * \u2191n !)\u207b\u00b9 * (x - x\u2080) ^ (n + 1)) \u2022 iteratedDerivWithin (n + 1) f s x\u2080\n[PROOFSTEP]\nsimp_rw [taylorWithinEval, taylorWithin_succ, LinearMap.map_add, PolynomialModule.comp_eval]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 \u2191(PolynomialModule.eval x) (taylorWithin f n s x\u2080) +\n      \u2191(PolynomialModule.eval (Polynomial.eval x (Polynomial.X - \u2191Polynomial.C x\u2080)))\n        (\u2191(PolynomialModule.single \u211d (n + 1)) (taylorCoeffWithin f (n + 1) s x\u2080)) =\n    \u2191(PolynomialModule.eval x) (taylorWithin f n s x\u2080) +\n      (((\u2191n + 1) * \u2191n !)\u207b\u00b9 * (x - x\u2080) ^ (n + 1)) \u2022 iteratedDerivWithin (n + 1) f s x\u2080\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 \u2191(PolynomialModule.eval (Polynomial.eval x (Polynomial.X - \u2191Polynomial.C x\u2080)))\n      (\u2191(PolynomialModule.single \u211d (n + 1)) (taylorCoeffWithin f (n + 1) s x\u2080)) =\n    (((\u2191n + 1) * \u2191n !)\u207b\u00b9 * (x - x\u2080) ^ (n + 1)) \u2022 iteratedDerivWithin (n + 1) f s x\u2080\n[PROOFSTEP]\nsimp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C, PolynomialModule.eval_single, mul_inv_rev]\n[GOAL]\ncase e_a\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 (x - x\u2080) ^ (n + 1) \u2022 taylorCoeffWithin f (n + 1) s x\u2080 =\n    ((\u2191n !)\u207b\u00b9 * (\u2191n + 1)\u207b\u00b9 * (x - x\u2080) ^ (n + 1)) \u2022 iteratedDerivWithin (n + 1) f s x\u2080\n[PROOFSTEP]\ndsimp only [taylorCoeffWithin]\n[GOAL]\ncase e_a\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 (x - x\u2080) ^ (n + 1) \u2022 (\u2191(n + 1)!)\u207b\u00b9 \u2022 iteratedDerivWithin (n + 1) f s x\u2080 =\n    ((\u2191n !)\u207b\u00b9 * (\u2191n + 1)\u207b\u00b9 * (x - x\u2080) ^ (n + 1)) \u2022 iteratedDerivWithin (n + 1) f s x\u2080\n[PROOFSTEP]\nrw [\u2190 mul_smul, mul_comm, Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, mul_inv_rev]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 taylorWithinEval f 0 s x\u2080 x = f x\u2080\n[PROOFSTEP]\ndsimp only [taylorWithinEval]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 \u2191(PolynomialModule.eval x) (taylorWithin f 0 s x\u2080) = f x\u2080\n[PROOFSTEP]\ndsimp only [taylorWithin]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 \u2191(PolynomialModule.eval x)\n      (\u2211 k in Finset.range (0 + 1),\n        \u2191(PolynomialModule.comp (Polynomial.X - \u2191Polynomial.C x\u2080))\n          (\u2191(PolynomialModule.single \u211d k) (taylorCoeffWithin f k s x\u2080))) =\n    f x\u2080\n[PROOFSTEP]\ndsimp only [taylorCoeffWithin]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 \u2191(PolynomialModule.eval x)\n      (\u2211 k in Finset.range (0 + 1),\n        \u2191(PolynomialModule.comp (Polynomial.X - \u2191Polynomial.C x\u2080))\n          (\u2191(PolynomialModule.single \u211d k) ((\u2191k !)\u207b\u00b9 \u2022 iteratedDerivWithin k f s x\u2080))) =\n    f x\u2080\n[PROOFSTEP]\nsimp\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 : \u211d\n\u22a2 taylorWithinEval f n s x\u2080 x\u2080 = f x\u2080\n[PROOFSTEP]\ninduction' n with k hk\n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 : \u211d\n\u22a2 taylorWithinEval f Nat.zero s x\u2080 x\u2080 = f x\u2080\n[PROOFSTEP]\nexact taylor_within_zero_eval _ _ _ _\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 : \u211d\nk : \u2115\nhk : taylorWithinEval f k s x\u2080 x\u2080 = f x\u2080\n\u22a2 taylorWithinEval f (Nat.succ k) s x\u2080 x\u2080 = f x\u2080\n[PROOFSTEP]\nsimp [hk]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nn : \u2115\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 taylorWithinEval f n s x\u2080 x = \u2211 k in Finset.range (n + 1), ((\u2191k !)\u207b\u00b9 * (x - x\u2080) ^ k) \u2022 iteratedDerivWithin k f s x\u2080\n[PROOFSTEP]\ninduction' n with k hk\n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 x : \u211d\n\u22a2 taylorWithinEval f Nat.zero s x\u2080 x =\n    \u2211 k in Finset.range (Nat.zero + 1), ((\u2191k !)\u207b\u00b9 * (x - x\u2080) ^ k) \u2022 iteratedDerivWithin k f s x\u2080\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 x : \u211d\nk : \u2115\nhk : taylorWithinEval f k s x\u2080 x = \u2211 k in Finset.range (k + 1), ((\u2191k !)\u207b\u00b9 * (x - x\u2080) ^ k) \u2022 iteratedDerivWithin k f s x\u2080\n\u22a2 taylorWithinEval f (Nat.succ k) s x\u2080 x =\n    \u2211 k in Finset.range (Nat.succ k + 1), ((\u2191k !)\u207b\u00b9 * (x - x\u2080) ^ k) \u2022 iteratedDerivWithin k f s x\u2080\n[PROOFSTEP]\nrw [taylorWithinEval_succ, Finset.sum_range_succ, hk]\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\ns : Set \u211d\nx\u2080 x : \u211d\nk : \u2115\nhk : taylorWithinEval f k s x\u2080 x = \u2211 k in Finset.range (k + 1), ((\u2191k !)\u207b\u00b9 * (x - x\u2080) ^ k) \u2022 iteratedDerivWithin k f s x\u2080\n\u22a2 \u2211 k in Finset.range (k + 1), ((\u2191k !)\u207b\u00b9 * (x - x\u2080) ^ k) \u2022 iteratedDerivWithin k f s x\u2080 +\n      (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - x\u2080) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s x\u2080 =\n    \u2211 x_1 in Finset.range (k + 1), ((\u2191x_1 !)\u207b\u00b9 * (x - x\u2080) ^ x_1) \u2022 iteratedDerivWithin x_1 f s x\u2080 +\n      ((\u2191(k + 1)!)\u207b\u00b9 * (x - x\u2080) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s x\u2080\n[PROOFSTEP]\nsimp\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\nhf : ContDiffOn \u211d (\u2191n) f s\n\u22a2 ContinuousOn (fun t => taylorWithinEval f n s t x) s\n[PROOFSTEP]\nsimp_rw [taylor_within_apply]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\nhf : ContDiffOn \u211d (\u2191n) f s\n\u22a2 ContinuousOn (fun t => \u2211 k in Finset.range (n + 1), ((\u2191k !)\u207b\u00b9 * (x - t) ^ k) \u2022 iteratedDerivWithin k f s t) s\n[PROOFSTEP]\nrefine' continuousOn_finset_sum (Finset.range (n + 1)) fun i hi => _\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\nhf : ContDiffOn \u211d (\u2191n) f s\ni : \u2115\nhi : i \u2208 Finset.range (n + 1)\n\u22a2 ContinuousOn (fun t => ((\u2191i !)\u207b\u00b9 * (x - t) ^ i) \u2022 iteratedDerivWithin i f s t) s\n[PROOFSTEP]\nrefine' (continuousOn_const.mul ((continuousOn_const.sub continuousOn_id).pow _)).smul _\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\nhf : ContDiffOn \u211d (\u2191n) f s\ni : \u2115\nhi : i \u2208 Finset.range (n + 1)\n\u22a2 ContinuousOn (fun t => iteratedDerivWithin i f s t) s\n[PROOFSTEP]\nrw [contDiffOn_iff_continuousOn_differentiableOn_deriv hs] at hf \n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\nhf :\n  (\u2200 (m : \u2115), \u2191m \u2264 \u2191n \u2192 ContinuousOn (iteratedDerivWithin m f s) s) \u2227\n    \u2200 (m : \u2115), \u2191m < \u2191n \u2192 DifferentiableOn \u211d (iteratedDerivWithin m f s) s\ni : \u2115\nhi : i \u2208 Finset.range (n + 1)\n\u22a2 ContinuousOn (fun t => iteratedDerivWithin i f s t) s\n[PROOFSTEP]\ncases' hf with hf_left\n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\ni : \u2115\nhi : i \u2208 Finset.range (n + 1)\nhf_left : \u2200 (m : \u2115), \u2191m \u2264 \u2191n \u2192 ContinuousOn (iteratedDerivWithin m f s) s\nright\u271d : \u2200 (m : \u2115), \u2191m < \u2191n \u2192 DifferentiableOn \u211d (iteratedDerivWithin m f s) s\n\u22a2 ContinuousOn (fun t => iteratedDerivWithin i f s t) s\n[PROOFSTEP]\nspecialize hf_left i\n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\ni : \u2115\nhi : i \u2208 Finset.range (n + 1)\nright\u271d : \u2200 (m : \u2115), \u2191m < \u2191n \u2192 DifferentiableOn \u211d (iteratedDerivWithin m f s) s\nhf_left : \u2191i \u2264 \u2191n \u2192 ContinuousOn (iteratedDerivWithin i f s) s\n\u22a2 ContinuousOn (fun t => iteratedDerivWithin i f s t) s\n[PROOFSTEP]\nsimp only [Finset.mem_range] at hi \n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\ni : \u2115\nright\u271d : \u2200 (m : \u2115), \u2191m < \u2191n \u2192 DifferentiableOn \u211d (iteratedDerivWithin m f s) s\nhf_left : \u2191i \u2264 \u2191n \u2192 ContinuousOn (iteratedDerivWithin i f s) s\nhi : i < n + 1\n\u22a2 ContinuousOn (fun t => iteratedDerivWithin i f s t) s\n[PROOFSTEP]\nrefine' hf_left _\n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx : \u211d\nn : \u2115\ns : Set \u211d\nhs : UniqueDiffOn \u211d s\ni : \u2115\nright\u271d : \u2200 (m : \u2115), \u2191m < \u2191n \u2192 DifferentiableOn \u211d (iteratedDerivWithin m f s) s\nhf_left : \u2191i \u2264 \u2191n \u2192 ContinuousOn (iteratedDerivWithin i f s) s\nhi : i < n + 1\n\u22a2 \u2191i \u2264 \u2191n\n[PROOFSTEP]\nsimp only [WithTop.coe_le_coe, Nat.cast_le, Nat.lt_succ_iff.mp hi]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nt x : \u211d\nn : \u2115\n\u22a2 HasDerivAt (fun y => (x - y) ^ (n + 1)) (-(\u2191n + 1) * (x - t) ^ n) t\n[PROOFSTEP]\nsimp_rw [sub_eq_neg_add]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nt x : \u211d\nn : \u2115\n\u22a2 HasDerivAt (fun y => (-y + x) ^ (n + 1)) (-(\u2191n + 1) * (-t + x) ^ n) t\n[PROOFSTEP]\nrw [\u2190 neg_one_mul, mul_comm (-1 : \u211d), mul_assoc, mul_comm (-1 : \u211d), \u2190 mul_assoc]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nt x : \u211d\nn : \u2115\n\u22a2 HasDerivAt (fun y => (-y + x) ^ (n + 1)) ((\u2191n + 1) * (-t + x) ^ n * -1) t\n[PROOFSTEP]\nconvert HasDerivAt.pow (n + 1) ((hasDerivAt_id t).neg.add_const x)\n[GOAL]\ncase h.e'_7.h.e'_5.h.e'_5\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nt x : \u211d\nn : \u2115\n\u22a2 \u2191n + 1 = \u2191(n + 1)\n[PROOFSTEP]\nsimp only [Nat.cast_add, Nat.cast_one]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : DifferentiableWithinAt \u211d (iteratedDerivWithin (k + 1) f s) s y\n\u22a2 HasDerivWithinAt (fun z => (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - z) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s z)\n    ((((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 2) f s y -\n      ((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y)\n    t y\n[PROOFSTEP]\nreplace hf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y :=\n  by\n  convert (hf.mono_of_mem hs).hasDerivWithinAt using 1\n  rw [iteratedDerivWithin_succ (ht.mono_nhds (nhdsWithin_le_iff.mpr hs))]\n  exact (derivWithin_of_mem hs ht hf).symm\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : DifferentiableWithinAt \u211d (iteratedDerivWithin (k + 1) f s) s y\n\u22a2 HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\n[PROOFSTEP]\nconvert (hf.mono_of_mem hs).hasDerivWithinAt using 1\n[GOAL]\ncase h.e'_7\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : DifferentiableWithinAt \u211d (iteratedDerivWithin (k + 1) f s) s y\n\u22a2 iteratedDerivWithin (k + 2) f s y = derivWithin (iteratedDerivWithin (k + 1) f s) t y\n[PROOFSTEP]\nrw [iteratedDerivWithin_succ (ht.mono_nhds (nhdsWithin_le_iff.mpr hs))]\n[GOAL]\ncase h.e'_7\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : DifferentiableWithinAt \u211d (iteratedDerivWithin (k + 1) f s) s y\n\u22a2 derivWithin (iteratedDerivWithin (k + 1) f s) s y = derivWithin (iteratedDerivWithin (k + 1) f s) t y\n[PROOFSTEP]\nexact (derivWithin_of_mem hs ht hf).symm\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\n\u22a2 HasDerivWithinAt (fun z => (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - z) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s z)\n    ((((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 2) f s y -\n      ((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y)\n    t y\n[PROOFSTEP]\nhave : HasDerivWithinAt (fun t => ((k + 1 : \u211d) * k !)\u207b\u00b9 * (x - t) ^ (k + 1)) (-((k ! : \u211d)\u207b\u00b9 * (x - y) ^ k)) t y := by\n  -- Commuting the factors:\n  have : -((k ! : \u211d)\u207b\u00b9 * (x - y) ^ k) = ((k + 1 : \u211d) * k !)\u207b\u00b9 * (-(k + 1) * (x - y) ^ k) :=\n    by\n    field_simp [k.factorial_ne_zero]\n      -- Porting note: was `ring_nf`\n    rw [mul_div_mul_right, \u2190 neg_add_rev, neg_mul, neg_div, mul_div_cancel_left]\n    \u00b7 exact k.cast_add_one_ne_zero\n    \u00b7 simp [k.factorial_ne_zero]\n  rw [this]\n  exact (monomial_has_deriv_aux y x _).hasDerivWithinAt.const_mul _\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\n\u22a2 HasDerivWithinAt (fun t => ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) (-((\u2191k !)\u207b\u00b9 * (x - y) ^ k)) t y\n[PROOFSTEP]\nhave : -((k ! : \u211d)\u207b\u00b9 * (x - y) ^ k) = ((k + 1 : \u211d) * k !)\u207b\u00b9 * (-(k + 1) * (x - y) ^ k) :=\n  by\n  field_simp [k.factorial_ne_zero]\n    -- Porting note: was `ring_nf`\n  rw [mul_div_mul_right, \u2190 neg_add_rev, neg_mul, neg_div, mul_div_cancel_left]\n  \u00b7 exact k.cast_add_one_ne_zero\n  \u00b7 simp [k.factorial_ne_zero]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\n\u22a2 -((\u2191k !)\u207b\u00b9 * (x - y) ^ k) = ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (-(\u2191k + 1) * (x - y) ^ k)\n[PROOFSTEP]\nfield_simp [k.factorial_ne_zero]\n  -- Porting note: was `ring_nf`\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\n\u22a2 -(x - y) ^ k = (-1 + -\u2191k) * (x - y) ^ k * \u2191k ! / ((\u2191k + 1) * \u2191k !)\n[PROOFSTEP]\nrw [mul_div_mul_right, \u2190 neg_add_rev, neg_mul, neg_div, mul_div_cancel_left]\n[GOAL]\ncase ha\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\n\u22a2 \u2191k + 1 \u2260 0\n[PROOFSTEP]\nexact k.cast_add_one_ne_zero\n[GOAL]\ncase hc\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\n\u22a2 \u2191k ! \u2260 0\n[PROOFSTEP]\nsimp [k.factorial_ne_zero]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\nthis : -((\u2191k !)\u207b\u00b9 * (x - y) ^ k) = ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (-(\u2191k + 1) * (x - y) ^ k)\n\u22a2 HasDerivWithinAt (fun t => ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) (-((\u2191k !)\u207b\u00b9 * (x - y) ^ k)) t y\n[PROOFSTEP]\nrw [this]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\nthis : -((\u2191k !)\u207b\u00b9 * (x - y) ^ k) = ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (-(\u2191k + 1) * (x - y) ^ k)\n\u22a2 HasDerivWithinAt (fun t => ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (-(\u2191k + 1) * (x - y) ^ k))\n    t y\n[PROOFSTEP]\nexact (monomial_has_deriv_aux y x _).hasDerivWithinAt.const_mul _\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\nthis : HasDerivWithinAt (fun t => ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) (-((\u2191k !)\u207b\u00b9 * (x - y) ^ k)) t y\n\u22a2 HasDerivWithinAt (fun z => (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - z) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s z)\n    ((((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 2) f s y -\n      ((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y)\n    t y\n[PROOFSTEP]\nconvert this.smul hf using 1\n[GOAL]\ncase h.e'_7\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\nthis : HasDerivWithinAt (fun t => ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) (-((\u2191k !)\u207b\u00b9 * (x - y) ^ k)) t y\n\u22a2 (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 2) f s y -\n      ((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y =\n    (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 2) f s y +\n      -((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y\n[PROOFSTEP]\nfield_simp [Nat.cast_add_one_ne_zero k, Nat.factorial_ne_zero k]\n[GOAL]\ncase h.e'_7\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nk : \u2115\ns t : Set \u211d\nht : UniqueDiffWithinAt \u211d t y\nhs : s \u2208 \ud835\udcdd[t] y\nhf : HasDerivWithinAt (iteratedDerivWithin (k + 1) f s) (iteratedDerivWithin (k + 2) f s y) t y\nthis : HasDerivWithinAt (fun t => ((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) (-((\u2191k !)\u207b\u00b9 * (x - y) ^ k)) t y\n\u22a2 ((x - y) ^ (k + 1) / ((\u2191k + 1) * \u2191k !)) \u2022 iteratedDerivWithin (k + 2) f s y -\n      ((x - y) ^ k / \u2191k !) \u2022 iteratedDerivWithin (k + 1) f s y =\n    ((x - y) ^ (k + 1) / ((\u2191k + 1) * \u2191k !)) \u2022 iteratedDerivWithin (k + 2) f s y +\n      (-(x - y) ^ k / \u2191k !) \u2022 iteratedDerivWithin (k + 1) f s y\n[PROOFSTEP]\nrw [neg_div, neg_smul, sub_eq_add_neg]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf : ContDiffOn \u211d (\u2191n) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\n\u22a2 HasDerivWithinAt (fun t => taylorWithinEval f n s t x) (((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f s y)\n    s' y\n[PROOFSTEP]\ninduction' n with k hk\n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nhf : ContDiffOn \u211d (\u2191Nat.zero) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin Nat.zero f s) s y\n\u22a2 HasDerivWithinAt (fun t => taylorWithinEval f Nat.zero s t x)\n    (((\u2191Nat.zero !)\u207b\u00b9 * (x - y) ^ Nat.zero) \u2022 iteratedDerivWithin (Nat.zero + 1) f s y) s' y\n[PROOFSTEP]\nsimp only [taylor_within_zero_eval, Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, mul_one, zero_add, one_smul]\n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nhf : ContDiffOn \u211d (\u2191Nat.zero) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin Nat.zero f s) s y\n\u22a2 HasDerivWithinAt (fun t => f t) (iteratedDerivWithin (Nat.zero + 1) f s y) s' y\n[PROOFSTEP]\nsimp only [iteratedDerivWithin_zero] at hf' \n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nhf : ContDiffOn \u211d (\u2191Nat.zero) f s\nhf' : DifferentiableWithinAt \u211d f s y\n\u22a2 HasDerivWithinAt (fun t => f t) (iteratedDerivWithin (Nat.zero + 1) f s y) s' y\n[PROOFSTEP]\nrw [iteratedDerivWithin_one (hs_unique _ (h hy))]\n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nhf : ContDiffOn \u211d (\u2191Nat.zero) f s\nhf' : DifferentiableWithinAt \u211d f s y\n\u22a2 HasDerivWithinAt (fun t => f t) (derivWithin f s y) s' y\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase zero\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nhf : ContDiffOn \u211d (\u2191Nat.zero) f s\nhf' : DifferentiableWithinAt \u211d f s y\n\u22a2 HasDerivWithinAt (fun t => f t) (derivWithin f s y) s' y\n[PROOFSTEP]\nexact hf'.hasDerivWithinAt.mono h\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhk :\n  ContDiffOn \u211d (\u2191k) f s \u2192\n    DifferentiableWithinAt \u211d (iteratedDerivWithin k f s) s y \u2192\n      HasDerivWithinAt (fun t => taylorWithinEval f k s t x)\n        (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y) s' y\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\n\u22a2 HasDerivWithinAt (fun t => taylorWithinEval f (Nat.succ k) s t x)\n    (((\u2191(Nat.succ k)!)\u207b\u00b9 * (x - y) ^ Nat.succ k) \u2022 iteratedDerivWithin (Nat.succ k + 1) f s y) s' y\n[PROOFSTEP]\nsimp_rw [Nat.add_succ, taylorWithinEval_succ]\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhk :\n  ContDiffOn \u211d (\u2191k) f s \u2192\n    DifferentiableWithinAt \u211d (iteratedDerivWithin k f s) s y \u2192\n      HasDerivWithinAt (fun t => taylorWithinEval f k s t x)\n        (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y) s' y\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\n\u22a2 HasDerivWithinAt\n    (fun t =>\n      taylorWithinEval f k s t x + (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s t)\n    (((\u2191(Nat.succ k)!)\u207b\u00b9 * (x - y) ^ Nat.succ k) \u2022 iteratedDerivWithin (Nat.succ (Nat.succ k + 0)) f s y) s' y\n[PROOFSTEP]\nsimp only [add_zero, Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one]\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhk :\n  ContDiffOn \u211d (\u2191k) f s \u2192\n    DifferentiableWithinAt \u211d (iteratedDerivWithin k f s) s y \u2192\n      HasDerivWithinAt (fun t => taylorWithinEval f k s t x)\n        (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y) s' y\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\n\u22a2 HasDerivWithinAt\n    (fun t =>\n      taylorWithinEval f k s t x + (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s t)\n    ((((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ Nat.succ k) \u2022 iteratedDerivWithin (Nat.succ (Nat.succ k)) f s y) s' y\n[PROOFSTEP]\nhave hdiff : DifferentiableOn \u211d (iteratedDerivWithin k f s) s' :=\n  by\n  have coe_lt_succ : (k : WithTop \u2115) < k.succ := Nat.cast_lt.2 k.lt_succ_self\n  refine' DifferentiableOn.mono _ h\n  exact hf.differentiableOn_iteratedDerivWithin coe_lt_succ hs_unique\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhk :\n  ContDiffOn \u211d (\u2191k) f s \u2192\n    DifferentiableWithinAt \u211d (iteratedDerivWithin k f s) s y \u2192\n      HasDerivWithinAt (fun t => taylorWithinEval f k s t x)\n        (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y) s' y\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\n\u22a2 DifferentiableOn \u211d (iteratedDerivWithin k f s) s'\n[PROOFSTEP]\nhave coe_lt_succ : (k : WithTop \u2115) < k.succ := Nat.cast_lt.2 k.lt_succ_self\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhk :\n  ContDiffOn \u211d (\u2191k) f s \u2192\n    DifferentiableWithinAt \u211d (iteratedDerivWithin k f s) s y \u2192\n      HasDerivWithinAt (fun t => taylorWithinEval f k s t x)\n        (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y) s' y\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\ncoe_lt_succ : \u2191k < \u2191(Nat.succ k)\n\u22a2 DifferentiableOn \u211d (iteratedDerivWithin k f s) s'\n[PROOFSTEP]\nrefine' DifferentiableOn.mono _ h\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhk :\n  ContDiffOn \u211d (\u2191k) f s \u2192\n    DifferentiableWithinAt \u211d (iteratedDerivWithin k f s) s y \u2192\n      HasDerivWithinAt (fun t => taylorWithinEval f k s t x)\n        (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y) s' y\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\ncoe_lt_succ : \u2191k < \u2191(Nat.succ k)\n\u22a2 DifferentiableOn \u211d (iteratedDerivWithin k f s) s\n[PROOFSTEP]\nexact hf.differentiableOn_iteratedDerivWithin coe_lt_succ hs_unique\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhk :\n  ContDiffOn \u211d (\u2191k) f s \u2192\n    DifferentiableWithinAt \u211d (iteratedDerivWithin k f s) s y \u2192\n      HasDerivWithinAt (fun t => taylorWithinEval f k s t x)\n        (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y) s' y\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\nhdiff : DifferentiableOn \u211d (iteratedDerivWithin k f s) s'\n\u22a2 HasDerivWithinAt\n    (fun t =>\n      taylorWithinEval f k s t x + (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s t)\n    ((((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ Nat.succ k) \u2022 iteratedDerivWithin (Nat.succ (Nat.succ k)) f s y) s' y\n[PROOFSTEP]\nspecialize hk hf.of_succ ((hdiff y hy).mono_of_mem hs')\n[GOAL]\ncase succ\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\nhdiff : DifferentiableOn \u211d (iteratedDerivWithin k f s) s'\nhk :\n  HasDerivWithinAt (fun t => taylorWithinEval f k s t x) (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y)\n    s' y\n\u22a2 HasDerivWithinAt\n    (fun t =>\n      taylorWithinEval f k s t x + (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - t) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 1) f s t)\n    ((((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ Nat.succ k) \u2022 iteratedDerivWithin (Nat.succ (Nat.succ k)) f s y) s' y\n[PROOFSTEP]\nconvert hk.add (hasDerivWithinAt_taylor_coeff_within hs'_unique (nhdsWithin_mono _ h self_mem_nhdsWithin) hf') using 1\n[GOAL]\ncase h.e'_7\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\nx y : \u211d\nn : \u2115\ns s' : Set \u211d\nhs'_unique : UniqueDiffWithinAt \u211d s' y\nhs_unique : UniqueDiffOn \u211d s\nhs' : s' \u2208 \ud835\udcdd[s] y\nhy : y \u2208 s'\nh : s' \u2286 s\nhf\u271d : ContDiffOn \u211d (\u2191n) f s\nhf'\u271d : DifferentiableWithinAt \u211d (iteratedDerivWithin n f s) s y\nk : \u2115\nhf : ContDiffOn \u211d (\u2191(Nat.succ k)) f s\nhf' : DifferentiableWithinAt \u211d (iteratedDerivWithin (Nat.succ k) f s) s y\nhdiff : DifferentiableOn \u211d (iteratedDerivWithin k f s) s'\nhk :\n  HasDerivWithinAt (fun t => taylorWithinEval f k s t x) (((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y)\n    s' y\n\u22a2 (((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ Nat.succ k) \u2022 iteratedDerivWithin (Nat.succ (Nat.succ k)) f s y =\n    ((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y +\n      ((((\u2191k + 1) * \u2191k !)\u207b\u00b9 * (x - y) ^ (k + 1)) \u2022 iteratedDerivWithin (k + 2) f s y -\n        ((\u2191k !)\u207b\u00b9 * (x - y) ^ k) \u2022 iteratedDerivWithin (k + 1) f s y)\n[PROOFSTEP]\nexact (add_sub_cancel'_right _ _).symm\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf g g' : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn g (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt g (g' x_1) x_1\ng'_ne : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 g' x_1 \u2260 0\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      ((x - x') ^ n / \u2191n ! * (g x - g x\u2080) / g' x') \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x'\n[PROOFSTEP]\nrcases exists_ratio_hasDerivAt_eq_ratio_slope (fun t => taylorWithinEval f n (Icc x\u2080 x) t x)\n    (fun t => ((n ! : \u211d)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) t) hx\n    (continuousOn_taylorWithinEval (uniqueDiffOn_Icc hx) hf)\n    (fun _ hy => taylorWithinEval_hasDerivAt_Ioo x hx hy hf hf') g g' gcont gdiff with\n  \u27e8y, hy, h\u27e9\n[GOAL]\ncase intro.intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf g g' : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn g (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt g (g' x_1) x_1\ng'_ne : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 g' x_1 \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  (g x - g x\u2080) * ((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y =\n    (taylorWithinEval f n (Icc x\u2080 x) x x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x) * g' y\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      ((x - x') ^ n / \u2191n ! * (g x - g x\u2080) / g' x') \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x'\n[PROOFSTEP]\nuse y, hy\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf g g' : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn g (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt g (g' x_1) x_1\ng'_ne : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 g' x_1 \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  (g x - g x\u2080) * ((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y =\n    (taylorWithinEval f n (Icc x\u2080 x) x x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x) * g' y\n\u22a2 f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * (g x - g x\u2080) / g' y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n[PROOFSTEP]\nsimp only [taylorWithinEval_self] at h \n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf g g' : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn g (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt g (g' x_1) x_1\ng'_ne : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 g' x_1 \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  (g x - g x\u2080) * ((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y =\n    (f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x) * g' y\n\u22a2 f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * (g x - g x\u2080) / g' y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n[PROOFSTEP]\nrw [mul_comm, \u2190 div_left_inj' (g'_ne y hy), mul_div_cancel _ (g'_ne y hy)] at h \n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf g g' : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn g (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt g (g' x_1) x_1\ng'_ne : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 g' x_1 \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  ((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (g x - g x\u2080) / g' y =\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x\n\u22a2 f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * (g x - g x\u2080) / g' y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n[PROOFSTEP]\nrw [\u2190 h]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf g g' : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn g (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt g (g' x_1) x_1\ng'_ne : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 g' x_1 \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  ((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (g x - g x\u2080) / g' y =\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x\n\u22a2 ((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (g x - g x\u2080) / g' y =\n    ((x - y) ^ n / \u2191n ! * (g x - g x\u2080) / g' y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n[PROOFSTEP]\nfield_simp [g'_ne y hy, n.factorial_ne_zero]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf g g' : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn g (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt g (g' x_1) x_1\ng'_ne : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 g' x_1 \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  ((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (g x - g x\u2080) / g' y =\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x\n\u22a2 (x - y) ^ n * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (g x - g x\u2080) =\n    (x - y) ^ n * (g x - g x\u2080) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n[PROOFSTEP]\nring\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nhave gcont : ContinuousOn (fun t : \u211d => (x - t) ^ (n + 1)) (Icc x\u2080 x) :=\n  by\n  refine' Continuous.continuousOn _\n  exact\n    (continuous_const.sub continuous_id').pow\n      _\n        -- Porting note: was `continuity`\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\n\u22a2 ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\n[PROOFSTEP]\nrefine' Continuous.continuousOn _\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\n\u22a2 Continuous fun t => (x - t) ^ (n + 1)\n[PROOFSTEP]\nexact\n  (continuous_const.sub continuous_id').pow\n    _\n      -- Porting note: was `continuity`\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nhave xy_ne : \u2200 y : \u211d, y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0 :=\n  by\n  intro y hy\n  refine' pow_ne_zero _ _\n  rw [mem_Ioo] at hy \n  rw [sub_ne_zero]\n  exact hy.2.ne.symm\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\n\u22a2 \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\n[PROOFSTEP]\nintro y hy\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\n\u22a2 (x - y) ^ n \u2260 0\n[PROOFSTEP]\nrefine' pow_ne_zero _ _\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\n\u22a2 x - y \u2260 0\n[PROOFSTEP]\nrw [mem_Ioo] at hy \n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\ny : \u211d\nhy : x\u2080 < y \u2227 y < x\n\u22a2 x - y \u2260 0\n[PROOFSTEP]\nrw [sub_ne_zero]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\ny : \u211d\nhy : x\u2080 < y \u2227 y < x\n\u22a2 x \u2260 y\n[PROOFSTEP]\nexact hy.2.ne.symm\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nhave hg' : \u2200 y : \u211d, y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0 := fun y hy =>\n  mul_ne_zero (neg_ne_zero.mpr (Nat.cast_add_one_ne_zero n))\n    (xy_ne y hy)\n      -- We apply the general theorem with g(t) = (x - t)^(n+1)\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nrcases taylor_mean_remainder hx hf hf' gcont (fun y _ => monomial_has_deriv_aux y x _) hg' with \u27e8y, hy, h\u27e9\n[GOAL]\ncase intro.intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * ((x - x) ^ (n + 1) - (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nuse y, hy\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * ((x - x) ^ (n + 1) - (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nsimp only [sub_self, zero_pow', Ne.def, Nat.succ_ne_zero, not_false_iff, zero_sub, mul_neg] at h \n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nrw [h, neg_div, \u2190 div_neg, neg_mul, neg_neg]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 ((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1) / ((\u2191n + 1) * (x - y) ^ n)) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - x\u2080) ^ (n + 1) / \u2191(n + 1)!\n[PROOFSTEP]\nfield_simp\n  -- Porting note: was `ring`\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 (x - y) ^ n * (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * ((\u2191n + 1) * (x - y) ^ n)) =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - x\u2080) ^ (n + 1) / ((\u2191n + 1) * \u2191n !)\n[PROOFSTEP]\nconv_lhs =>\n  arg 2\n  rw [\u2190 mul_assoc, mul_comm]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| (x - y) ^ n * (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * ((\u2191n + 1) * (x - y) ^ n))\n[PROOFSTEP]\n  arg 2\n  rw [\u2190 mul_assoc, mul_comm]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| (x - y) ^ n * (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * ((\u2191n + 1) * (x - y) ^ n))\n[PROOFSTEP]\n  arg 2\n  rw [\u2190 mul_assoc, mul_comm]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| (x - y) ^ n * (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * ((\u2191n + 1) * (x - y) ^ n))\n[PROOFSTEP]\narg 2\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| \u2191n ! * ((\u2191n + 1) * (x - y) ^ n)\n[PROOFSTEP]\nrw [\u2190 mul_assoc, mul_comm]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 (x - y) ^ n * (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / ((x - y) ^ n * (\u2191n ! * (\u2191n + 1))) =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - x\u2080) ^ (n + 1) / ((\u2191n + 1) * \u2191n !)\n[PROOFSTEP]\nrw [mul_assoc, mul_div_mul_left _ _ (xy_ne y hy)]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * (\u2191n + 1)) =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - x\u2080) ^ (n + 1) / ((\u2191n + 1) * \u2191n !)\n[PROOFSTEP]\nconv_lhs =>\n  arg 2\n  rw [mul_comm]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * (\u2191n + 1))\n[PROOFSTEP]\n  arg 2\n  rw [mul_comm]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * (\u2191n + 1))\n[PROOFSTEP]\n  arg 2\n  rw [mul_comm]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / (\u2191n ! * (\u2191n + 1))\n[PROOFSTEP]\narg 2\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n| \u2191n ! * (\u2191n + 1)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn (fun t => (x - t) ^ (n + 1)) (Icc x\u2080 x)\nxy_ne : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 (x - y) ^ n \u2260 0\nhg' : \u2200 (y : \u211d), y \u2208 Ioo x\u2080 x \u2192 -(\u2191n + 1) * (x - y) ^ n \u2260 0\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    (-((x - y) ^ n / \u2191n ! * (x - x\u2080) ^ (n + 1)) / (-(\u2191n + 1) * (x - y) ^ n)) \u2022\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 (x - x\u2080) ^ (n + 1) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y / ((\u2191n + 1) * \u2191n !) =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - x\u2080) ^ (n + 1) / ((\u2191n + 1) * \u2191n !)\n[PROOFSTEP]\nnth_rw 1 [mul_comm]\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x') ^ n / \u2191n ! * (x - x\u2080)\n[PROOFSTEP]\nhave gcont : ContinuousOn id (Icc x\u2080 x) := Continuous.continuousOn (by continuity)\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\n\u22a2 Continuous id\n[PROOFSTEP]\ncontinuity\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn id (Icc x\u2080 x)\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x') ^ n / \u2191n ! * (x - x\u2080)\n[PROOFSTEP]\nhave gdiff : \u2200 x_1 : \u211d, x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt id ((fun _ : \u211d => (1 : \u211d)) x_1) x_1 := fun _ _ =>\n  hasDerivAt_id\n    _\n      -- We apply the general theorem with g = id\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn id (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt id ((fun x => 1) x_1) x_1\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x') ^ n / \u2191n ! * (x - x\u2080)\n[PROOFSTEP]\nrcases taylor_mean_remainder hx hf hf' gcont gdiff fun _ _ => by simp with \u27e8y, hy, h\u27e9\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn id (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt id ((fun x => 1) x_1) x_1\nx\u271d\u00b9 : \u211d\nx\u271d : x\u271d\u00b9 \u2208 Ioo x\u2080 x\n\u22a2 (fun x => 1) x\u271d\u00b9 \u2260 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn id (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt id ((fun x => 1) x_1) x_1\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * (id x - id x\u2080) / (fun x => 1) y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 \u2203 x' x_1,\n    f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n      iteratedDerivWithin (n + 1) f (Icc x\u2080 x) x' * (x - x') ^ n / \u2191n ! * (x - x\u2080)\n[PROOFSTEP]\nuse y, hy\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn id (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt id ((fun x => 1) x_1) x_1\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * (id x - id x\u2080) / (fun x => 1) y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - y) ^ n / \u2191n ! * (x - x\u2080)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn id (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt id ((fun x => 1) x_1) x_1\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * (id x - id x\u2080) / (fun x => 1) y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 ((x - y) ^ n / \u2191n ! * (id x - id x\u2080) / (fun x => 1) y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - y) ^ n / \u2191n ! * (x - x\u2080)\n[PROOFSTEP]\nfield_simp [n.factorial_ne_zero]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 \u211d\nx x\u2080 : \u211d\nn : \u2115\nhx : x\u2080 < x\nhf : ContDiffOn \u211d (\u2191n) f (Icc x\u2080 x)\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc x\u2080 x)) (Ioo x\u2080 x)\ngcont : ContinuousOn id (Icc x\u2080 x)\ngdiff : \u2200 (x_1 : \u211d), x_1 \u2208 Ioo x\u2080 x \u2192 HasDerivAt id ((fun x => 1) x_1) x_1\ny : \u211d\nhy : y \u2208 Ioo x\u2080 x\nh :\n  f x - taylorWithinEval f n (Icc x\u2080 x) x\u2080 x =\n    ((x - y) ^ n / \u2191n ! * (id x - id x\u2080) / (fun x => 1) y) \u2022 iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y\n\u22a2 (x - y) ^ n * (x - x\u2080) * iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y =\n    iteratedDerivWithin (n + 1) f (Icc x\u2080 x) y * (x - y) ^ n * (x - x\u2080)\n[PROOFSTEP]\nring\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nrcases eq_or_lt_of_le hab with (rfl | h)\n[GOAL]\ncase inl\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na C x : \u211d\nn : \u2115\nhab : a \u2264 a\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a a)\nhx : x \u2208 Icc a a\nhC : \u2200 (y : \u211d), y \u2208 Icc a a \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a a) y\u2016 \u2264 C\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a a) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nrw [Icc_self, mem_singleton_iff] at hx \n[GOAL]\ncase inl\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na C x : \u211d\nn : \u2115\nhab : a \u2264 a\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a a)\nhx : x = a\nhC : \u2200 (y : \u211d), y \u2208 Icc a a \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a a) y\u2016 \u2264 C\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a a) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nsimp [hx]\n  -- The nth iterated derivative is differentiable\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nhave hf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b) :=\n  hf.differentiableOn_iteratedDerivWithin (WithTop.coe_lt_coe.mpr n.lt_succ_self)\n    (uniqueDiffOn_Icc h)\n      -- We can uniformly bound the derivative of the Taylor polynomial\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nhave h' :\n  \u2200 (y : \u211d) (_ : y \u2208 Ico a x),\n    \u2016((n ! : \u211d)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (n ! : \u211d)\u207b\u00b9 * |x - a| ^ n * C :=\n  by\n  rintro y \u27e8hay, hyx\u27e9\n  rw [norm_smul, Real.norm_eq_abs]\n    -- Estimate the iterated derivative by `C`\n  refine'\n    mul_le_mul _ (hC y \u27e8hay, hyx.le.trans hx.2\u27e9) (by positivity)\n      (by positivity)\n        -- The rest is a trivial calculation\n  rw [abs_mul, abs_pow, abs_inv, Nat.abs_cast]\n    -- Porting note: was `mono* with 0 \u2264 (n ! : \u211d)\u207b\u00b9; any_goals positivity; linarith [hx.1, hyx]`\n  gcongr\n  rw [abs_of_nonneg, abs_of_nonneg] <;>\n    linarith\n      -- Apply the mean value theorem for vector valued functions:\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\n\u22a2 \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\n[PROOFSTEP]\nrintro y \u27e8hay, hyx\u27e9\n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\n[PROOFSTEP]\nrw [norm_smul, Real.norm_eq_abs]\n  -- Estimate the iterated derivative by `C`\n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 |(\u2191n !)\u207b\u00b9 * (x - y) ^ n| * \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\n[PROOFSTEP]\nrefine'\n  mul_le_mul _ (hC y \u27e8hay, hyx.le.trans hx.2\u27e9) (by positivity)\n    (by positivity)\n      -- The rest is a trivial calculation\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 0 \u2264 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016\n[PROOFSTEP]\npositivity\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 0 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 |(\u2191n !)\u207b\u00b9 * (x - y) ^ n| \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n\n[PROOFSTEP]\nrw [abs_mul, abs_pow, abs_inv, Nat.abs_cast]\n  -- Porting note: was `mono* with 0 \u2264 (n ! : \u211d)\u207b\u00b9; any_goals positivity; linarith [hx.1, hyx]`\n[GOAL]\ncase intro\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 (\u2191n !)\u207b\u00b9 * |x - y| ^ n \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.h.hab\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 |x - y| \u2264 |x - a|\n[PROOFSTEP]\nrw [abs_of_nonneg, abs_of_nonneg]\n[GOAL]\ncase intro.h.hab\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 x - y \u2264 x - a\n[PROOFSTEP]\nlinarith\n  -- Apply the mean value theorem for vector valued functions:\n[GOAL]\ncase intro.h.hab\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 0 \u2264 x - a\n[PROOFSTEP]\nlinarith\n  -- Apply the mean value theorem for vector valued functions:\n[GOAL]\ncase intro.h.hab\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\ny : \u211d\nhay : a \u2264 y\nhyx : y < x\n\u22a2 0 \u2264 x - y\n[PROOFSTEP]\nlinarith\n  -- Apply the mean value theorem for vector valued functions:\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nhave A :\n  \u2200 t \u2208 Icc a x,\n    HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n      (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t :=\n  by\n  intro t ht\n  have I : Icc a x \u2286 Icc a b := Icc_subset_Icc_right hx.2\n  exact (has_deriv_within_taylorWithinEval_at_Icc x h (I ht) hf.of_succ hf').mono I\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\n\u22a2 \u2200 (t : \u211d),\n    t \u2208 Icc a x \u2192\n      HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n        (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\n[PROOFSTEP]\nintro t ht\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\nt : \u211d\nht : t \u2208 Icc a x\n\u22a2 HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n    (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\n[PROOFSTEP]\nhave I : Icc a x \u2286 Icc a b := Icc_subset_Icc_right hx.2\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\nt : \u211d\nht : t \u2208 Icc a x\nI : Icc a x \u2286 Icc a b\n\u22a2 HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n    (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\n[PROOFSTEP]\nexact (has_deriv_within_taylorWithinEval_at_Icc x h (I ht) hf.of_succ hf').mono I\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\nA :\n  \u2200 (t : \u211d),\n    t \u2208 Icc a x \u2192\n      HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n        (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nhave := norm_image_sub_le_of_norm_deriv_le_segment' A h' x (right_mem_Icc.2 hx.1)\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\nA :\n  \u2200 (t : \u211d),\n    t \u2208 Icc a x \u2192\n      HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n        (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\nthis : \u2016taylorWithinEval f n (Icc a b) x x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C * (x - a)\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nsimp only [taylorWithinEval_self] at this \n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\nA :\n  \u2200 (t : \u211d),\n    t \u2208 Icc a x \u2192\n      HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n        (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\nthis : \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C * (x - a)\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nrefine'\n  this.trans_eq\n    _\n      -- The rest is a trivial calculation\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\nA :\n  \u2200 (t : \u211d),\n    t \u2208 Icc a x \u2192\n      HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n        (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\nthis : \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C * (x - a)\n\u22a2 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C * (x - a) = C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nrw [abs_of_nonneg (sub_nonneg.mpr hx.1)]\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b C x : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nhx : x \u2208 Icc a b\nhC : \u2200 (y : \u211d), y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 C\nh : a < b\nhf' : DifferentiableOn \u211d (iteratedDerivWithin n f (Icc a b)) (Icc a b)\nh' :\n  \u2200 (y : \u211d),\n    y \u2208 Ico a x \u2192 \u2016((\u2191n !)\u207b\u00b9 * (x - y) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C\nA :\n  \u2200 (t : \u211d),\n    t \u2208 Icc a x \u2192\n      HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n        (((\u2191n !)\u207b\u00b9 * (x - t) ^ n) \u2022 iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a x) t\nthis : \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 (\u2191n !)\u207b\u00b9 * |x - a| ^ n * C * (x - a)\n\u22a2 (\u2191n !)\u207b\u00b9 * (x - a) ^ n * C * (x - a) = C * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nring\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\n\u22a2 \u2203 C, \u2200 (x : \u211d), x \u2208 Icc a b \u2192 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1)\n[PROOFSTEP]\nrcases eq_or_lt_of_le hab with (rfl | h)\n[GOAL]\ncase inl\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na : \u211d\nn : \u2115\nhab : a \u2264 a\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a a)\n\u22a2 \u2203 C, \u2200 (x : \u211d), x \u2208 Icc a a \u2192 \u2016f x - taylorWithinEval f n (Icc a a) a x\u2016 \u2264 C * (x - a) ^ (n + 1)\n[PROOFSTEP]\nrefine' \u27e80, fun x hx => _\u27e9\n[GOAL]\ncase inl\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na : \u211d\nn : \u2115\nhab : a \u2264 a\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a a)\nx : \u211d\nhx : x \u2208 Icc a a\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a a) a x\u2016 \u2264 0 * (x - a) ^ (n + 1)\n[PROOFSTEP]\nhave : x = a := by simpa [\u2190 le_antisymm_iff] using hx\n[GOAL]\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na : \u211d\nn : \u2115\nhab : a \u2264 a\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a a)\nx : \u211d\nhx : x \u2208 Icc a a\n\u22a2 x = a\n[PROOFSTEP]\nsimpa [\u2190 le_antisymm_iff] using hx\n[GOAL]\ncase inl\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na : \u211d\nn : \u2115\nhab : a \u2264 a\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a a)\nx : \u211d\nhx : x \u2208 Icc a a\nthis : x = a\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a a) a x\u2016 \u2264 0 * (x - a) ^ (n + 1)\n[PROOFSTEP]\nsimp [\u2190 this]\n  -- We estimate by the supremum of the norm of the iterated derivative\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nh : a < b\n\u22a2 \u2203 C, \u2200 (x : \u211d), x \u2208 Icc a b \u2192 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1)\n[PROOFSTEP]\nlet g : \u211d \u2192 \u211d := fun y => \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016\n[GOAL]\ncase inr\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nh : a < b\ng : \u211d \u2192 \u211d := fun y => \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016\n\u22a2 \u2203 C, \u2200 (x : \u211d), x \u2208 Icc a b \u2192 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 C * (x - a) ^ (n + 1)\n[PROOFSTEP]\nuse SupSet.sSup (g '' Icc a b) / (n !)\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nh : a < b\ng : \u211d \u2192 \u211d := fun y => \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016\n\u22a2 \u2200 (x : \u211d), x \u2208 Icc a b \u2192 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 sSup (g '' Icc a b) / \u2191n ! * (x - a) ^ (n + 1)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nh : a < b\ng : \u211d \u2192 \u211d := fun y => \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016\nx : \u211d\nhx : x \u2208 Icc a b\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 sSup (g '' Icc a b) / \u2191n ! * (x - a) ^ (n + 1)\n[PROOFSTEP]\nrw [div_mul_eq_mul_div\u2080]\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nh : a < b\ng : \u211d \u2192 \u211d := fun y => \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016\nx : \u211d\nhx : x \u2208 Icc a b\n\u22a2 \u2016f x - taylorWithinEval f n (Icc a b) a x\u2016 \u2264 sSup (g '' Icc a b) * (x - a) ^ (n + 1) / \u2191n !\n[PROOFSTEP]\nrefine' taylor_mean_remainder_bound hab hf hx fun y => _\n[GOAL]\ncase h\n\ud835\udd5c : Type u_1\nE : Type u_2\nF : Type u_3\ninst\u271d\u00b9 : NormedAddCommGroup E\ninst\u271d : NormedSpace \u211d E\nf : \u211d \u2192 E\na b : \u211d\nn : \u2115\nhab : a \u2264 b\nhf : ContDiffOn \u211d (\u2191n + 1) f (Icc a b)\nh : a < b\ng : \u211d \u2192 \u211d := fun y => \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016\nx : \u211d\nhx : x \u2208 Icc a b\ny : \u211d\n\u22a2 y \u2208 Icc a b \u2192 \u2016iteratedDerivWithin (n + 1) f (Icc a b) y\u2016 \u2264 sSup (g '' Icc a b)\n[PROOFSTEP]\nexact (hf.continuousOn_iteratedDerivWithin rfl.le <| uniqueDiffOn_Icc h).norm.le_sSup_image_Icc\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Taylor", "llama_tokens": 43769, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8962513675912912, "lm_q2_score": 0.7431680086124812, "lm_q1q2_score": 0.6660653440690327}}
{"text": "[GOAL]\nn : \u2115\nh : n \u2260 0\nd m : \u2115\n\u22a2 ((fun a => a + d) \u2218 fun x => n \u2022 id x) m \u2261 d [MOD n]\n[PROOFSTEP]\nsimp [Nat.modEq_iff_dvd, \u2190 sub_sub]\n[GOAL]\nd n : \u2115\nh : d < n\n\u22a2 \u2203\u1da0 (m : \u2115) in atTop, m % n = d\n[PROOFSTEP]\nsimpa only [Nat.ModEq, mod_eq_of_lt h] using frequently_modEq h.ne_bot d\n[GOAL]\n\u22a2 \u2203\u1da0 (m : \u2115) in atTop, Even m\n[PROOFSTEP]\nsimpa only [even_iff] using frequently_mod_eq zero_lt_two\n[GOAL]\n\u22a2 \u2203\u1da0 (m : \u2115) in atTop, Odd m\n[PROOFSTEP]\nsimpa only [odd_iff] using frequently_mod_eq one_lt_two\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.ModEq", "llama_tokens": 260, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9149009596336303, "lm_q2_score": 0.7279754430043072, "lm_q1q2_score": 0.6660254313943578}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ninst\u271d : DivisionRing \u03b1\nsrc\u271d\u00b2 : DivisionSemiring \u03b1\u1d50\u1d52\u1d56 := divisionSemiring \u03b1\nsrc\u271d\u00b9 : Ring \u03b1\u1d50\u1d52\u1d56 := ring \u03b1\nsrc\u271d : RatCast \u03b1\u1d50\u1d52\u1d56 := ratCast \u03b1\na : \u2124\nb : \u2115\nhb : b \u2260 0\nh : Nat.coprime (Int.natAbs a) b\n\u22a2 unop \u2191(Rat.mk' a b) = unop (\u2191a * (\u2191b)\u207b\u00b9)\n[PROOFSTEP]\nrw [unop_ratCast, Rat.cast_def, unop_mul, unop_inv, unop_natCast, unop_intCast, Int.commute_cast, div_eq_mul_inv]\n[GOAL]\n\u03b1 : Type ?u.3697\ninst\u271d : DivisionRing \u03b1\nsrc\u271d\u00b2 : Ring \u03b1\u1d43\u1d52\u1d56 := ring \u03b1\nsrc\u271d\u00b9 : GroupWithZero \u03b1\u1d43\u1d52\u1d56 := groupWithZero \u03b1\nsrc\u271d : RatCast \u03b1\u1d43\u1d52\u1d56 := ratCast \u03b1\na : \u2124\nb : \u2115\nhb : b \u2260 0\nh : Nat.coprime (Int.natAbs a) b\n\u22a2 unop \u2191(Rat.mk' a b) = unop (\u2191a * (\u2191b)\u207b\u00b9)\n[PROOFSTEP]\nrw [unop_ratCast, Rat.cast_def, unop_mul, unop_inv, unop_natCast, unop_intCast, div_eq_mul_inv]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Field.Opposite", "llama_tokens": 425, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.880797068590724, "lm_q2_score": 0.7549149758396752, "lm_q1q2_score": 0.6649268977548232}}
{"text": "[GOAL]\nR : Type u_1\nV : Type u_2\nP : Type u_3\ninst\u271d\u2074 : DivisionRing R\ninst\u271d\u00b3 : CharZero R\ninst\u271d\u00b2 : AddCommGroup V\ninst\u271d\u00b9 : Module R V\ninst\u271d : AddTorsor V P\na b : P\n\u22a2 \u2191(lineMap a b) (1 / 2) = midpoint R a b\n[PROOFSTEP]\nrw [one_div, lineMap_inv_two]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst\u271d\u2074 : Field k\ninst\u271d\u00b3 : CharZero k\ninst\u271d\u00b2 : AddCommGroup V\ninst\u271d\u00b9 : Module k V\ninst\u271d : AddTorsor V P\na b : P\n\u22a2 \u2191(homothety a (1 / 2)) b = midpoint k a b\n[PROOFSTEP]\nrw [one_div, homothety_inv_two]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.MidpointZero", "llama_tokens": 255, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8840392817460332, "lm_q2_score": 0.7520125737597972, "lm_q1q2_score": 0.664808655570597}}
{"text": "[GOAL]\nn k : \u2115\n\u22a2 List.toFinset (factors (n ^ (k + 1))) = List.toFinset (factors n)\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nk : \u2115\n\u22a2 List.toFinset (factors (0 ^ (k + 1))) = List.toFinset (factors 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn k : \u2115\nhn : n \u2260 0\n\u22a2 List.toFinset (factors (n ^ (k + 1))) = List.toFinset (factors n)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase inr.zero\nn : \u2115\nhn : n \u2260 0\n\u22a2 List.toFinset (factors (n ^ (zero + 1))) = List.toFinset (factors n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.succ\nn : \u2115\nhn : n \u2260 0\nk : \u2115\nih : List.toFinset (factors (n ^ (k + 1))) = List.toFinset (factors n)\n\u22a2 List.toFinset (factors (n ^ (succ k + 1))) = List.toFinset (factors n)\n[PROOFSTEP]\nrw [pow_succ', factors_mul_toFinset hn (pow_ne_zero _ hn), ih, Finset.union_idempotent]\n[GOAL]\nn k : \u2115\nhk : k \u2260 0\n\u22a2 List.toFinset (factors (n ^ k)) = List.toFinset (factors n)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase zero\nn : \u2115\nhk : zero \u2260 0\n\u22a2 List.toFinset (factors (n ^ zero)) = List.toFinset (factors n)\n[PROOFSTEP]\nsimp at hk \n[GOAL]\ncase succ\nn n\u271d : \u2115\nhk : succ n\u271d \u2260 0\n\u22a2 List.toFinset (factors (n ^ succ n\u271d)) = List.toFinset (factors n)\n[PROOFSTEP]\nrw [pow_succ_factors_toFinset]\n[GOAL]\np k : \u2115\nhk : k \u2260 0\nhp : Prime p\n\u22a2 List.toFinset (factors (p ^ k)) = {p}\n[PROOFSTEP]\nsimp [pow_factors_toFinset p hk, factors_prime hp]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.PrimeFin", "llama_tokens": 662, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357563664174, "lm_q2_score": 0.7662936377487304, "lm_q1q2_score": 0.6644039838042439}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ninst\u271d : OrderedSemiring \u03b1\nx : \u2191(Icc 0 1)\n\u22a2 \u2191x = 0 \u2194 x = 0\n[PROOFSTEP]\nsymm\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : OrderedSemiring \u03b1\nx : \u2191(Icc 0 1)\n\u22a2 x = 0 \u2194 \u2191x = 0\n[PROOFSTEP]\nexact Subtype.ext_iff\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : OrderedSemiring \u03b1\nx : \u2191(Icc 0 1)\n\u22a2 \u2191x = 1 \u2194 x = 1\n[PROOFSTEP]\nsymm\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : OrderedSemiring \u03b1\nx : \u2191(Icc 0 1)\n\u22a2 x = 1 \u2194 \u2191x = 1\n[PROOFSTEP]\nexact Subtype.ext_iff\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : OrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nt : \u03b2\nht : t \u2208 Icc 0 1\n\u22a2 1 - t \u2208 Icc 0 1\n[PROOFSTEP]\nrw [mem_Icc] at *\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : OrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nt : \u03b2\nht : 0 \u2264 t \u2227 t \u2264 1\n\u22a2 0 \u2264 1 - t \u2227 1 - t \u2264 1\n[PROOFSTEP]\nexact \u27e8sub_nonneg.2 ht.2, (sub_le_self_iff _).2 ht.1\u27e9\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : OrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nx : \u2191(Icc 0 1)\n\u22a2 0 \u2264 1 - \u2191x\n[PROOFSTEP]\nsimpa using x.2.2\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : OrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nx : \u2191(Icc 0 1)\n\u22a2 1 - \u2191x \u2264 1\n[PROOFSTEP]\nsimpa using x.2.1\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : OrderedSemiring \u03b1\ninst\u271d : Nontrivial \u03b1\nx : \u2191(Ico 0 1)\n\u22a2 \u2191x = 0 \u2194 x = 0\n[PROOFSTEP]\nsymm\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : OrderedSemiring \u03b1\ninst\u271d : Nontrivial \u03b1\nx : \u2191(Ico 0 1)\n\u22a2 x = 0 \u2194 \u2191x = 0\n[PROOFSTEP]\nexact Subtype.ext_iff\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : StrictOrderedSemiring \u03b1\ninst\u271d : Nontrivial \u03b1\nx : \u2191(Ioc 0 1)\n\u22a2 \u2191x = 1 \u2194 x = 1\n[PROOFSTEP]\nsymm\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : StrictOrderedSemiring \u03b1\ninst\u271d : Nontrivial \u03b1\nx : \u2191(Ioc 0 1)\n\u22a2 x = 1 \u2194 \u2191x = 1\n[PROOFSTEP]\nexact Subtype.ext_iff\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : StrictOrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nt : \u03b2\nht : t \u2208 Ioo 0 1\n\u22a2 1 - t \u2208 Ioo 0 1\n[PROOFSTEP]\nrw [mem_Ioo] at *\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : StrictOrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nt : \u03b2\nht : 0 < t \u2227 t < 1\n\u22a2 0 < 1 - t \u2227 1 - t < 1\n[PROOFSTEP]\nrefine' \u27e8sub_pos.2 ht.2, _\u27e9\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : StrictOrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nt : \u03b2\nht : 0 < t \u2227 t < 1\n\u22a2 1 - t < 1\n[PROOFSTEP]\nexact lt_of_le_of_ne ((sub_le_self_iff 1).2 ht.1.le) (mt sub_eq_self.mp ht.1.ne')\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : StrictOrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nx : \u2191(Ioo 0 1)\n\u22a2 0 < 1 - \u2191x\n[PROOFSTEP]\nsimpa using x.2.2\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : StrictOrderedSemiring \u03b1\n\u03b2 : Type u_2\ninst\u271d : OrderedRing \u03b2\nx : \u2191(Ioo 0 1)\n\u22a2 1 - \u2191x < 1\n[PROOFSTEP]\nsimpa using x.2.1\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.Instances", "llama_tokens": 1430, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.839733983715524, "lm_q2_score": 0.7905303162021596, "lm_q1q2_score": 0.6638351716723323}}
{"text": "[GOAL]\nx y : \u2102\n\u22a2 SameRay \u211d x y \u2194 x = 0 \u2228 y = 0 \u2228 arg x = arg y\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase inl\ny : \u2102\n\u22a2 SameRay \u211d 0 y \u2194 0 = 0 \u2228 y = 0 \u2228 arg 0 = arg y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nx y : \u2102\nhx : x \u2260 0\n\u22a2 SameRay \u211d x y \u2194 x = 0 \u2228 y = 0 \u2228 arg x = arg y\n[PROOFSTEP]\nrcases eq_or_ne y 0 with (rfl | hy)\n[GOAL]\ncase inr.inl\nx : \u2102\nhx : x \u2260 0\n\u22a2 SameRay \u211d x 0 \u2194 x = 0 \u2228 0 = 0 \u2228 arg x = arg 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 SameRay \u211d x y \u2194 x = 0 \u2228 y = 0 \u2228 arg x = arg y\n[PROOFSTEP]\nsimp only [hx, hy, false_or_iff, sameRay_iff_norm_smul_eq, arg_eq_arg_iff hx hy]\n[GOAL]\ncase inr.inr\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 \u2016x\u2016 \u2022 y = \u2016y\u2016 \u2022 x \u2194 \u2191(\u2191abs y) / \u2191(\u2191abs x) * x = y\n[PROOFSTEP]\nfield_simp [hx, hy]\n[GOAL]\ncase inr.inr\nx y : \u2102\nhx : x \u2260 0\nhy : y \u2260 0\n\u22a2 \u2191(\u2191abs x) * y = \u2191(\u2191abs y) * x \u2194 \u2191(\u2191abs y) * x = y * \u2191(\u2191abs x)\n[PROOFSTEP]\nrw [mul_comm, eq_comm]\n[GOAL]\nx y : \u2102\n\u22a2 SameRay \u211d x y \u2194 arg (x / y) = 0\n[PROOFSTEP]\nrw [\u2190 Real.Angle.toReal_zero, \u2190 arg_coe_angle_eq_iff_eq_toReal, sameRay_iff]\n[GOAL]\nx y : \u2102\n\u22a2 x = 0 \u2228 y = 0 \u2228 arg x = arg y \u2194 \u2191(arg (x / y)) = 0\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nx y : \u2102\nhx : x = 0\n\u22a2 x = 0 \u2228 y = 0 \u2228 arg x = arg y \u2194 \u2191(arg (x / y)) = 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nx y : \u2102\nhx : \u00acx = 0\n\u22a2 x = 0 \u2228 y = 0 \u2228 arg x = arg y \u2194 \u2191(arg (x / y)) = 0\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nx y : \u2102\nhx : \u00acx = 0\nhy : y = 0\n\u22a2 x = 0 \u2228 y = 0 \u2228 arg x = arg y \u2194 \u2191(arg (x / y)) = 0\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase neg\nx y : \u2102\nhx : \u00acx = 0\nhy : \u00acy = 0\n\u22a2 x = 0 \u2228 y = 0 \u2228 arg x = arg y \u2194 \u2191(arg (x / y)) = 0\n[PROOFSTEP]\nsimp [hx, hy, arg_div_coe_angle, sub_eq_zero]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.Arg", "llama_tokens": 1005, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8757869851639066, "lm_q2_score": 0.7577943712746406, "lm_q1q2_score": 0.6636664477927956}}
{"text": "[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : NormalSpace X\ns t : Set X\nhs : IsClosed s\nht : IsClosed t\nhd : Disjoint s t\na b : \u211d\nhle : a \u2264 b\nf : X \u2192\u1d47 \u211d\nhfs : EqOn (\u2191f) 0 s\nhft : EqOn (\u2191f) 1 t\nhf01 : \u2200 (x : X), \u2191f x \u2208 Icc 0 1\nx : X\nhx : x \u2208 s\n\u22a2 \u2191(BoundedContinuousFunction.const X a + (b - a) \u2022 f) x = Function.const X a x\n[PROOFSTEP]\nsimp [hfs hx]\n[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : NormalSpace X\ns t : Set X\nhs : IsClosed s\nht : IsClosed t\nhd : Disjoint s t\na b : \u211d\nhle : a \u2264 b\nf : X \u2192\u1d47 \u211d\nhfs : EqOn (\u2191f) 0 s\nhft : EqOn (\u2191f) 1 t\nhf01 : \u2200 (x : X), \u2191f x \u2208 Icc 0 1\nx : X\nhx : x \u2208 t\n\u22a2 \u2191(BoundedContinuousFunction.const X a + (b - a) \u2022 f) x = Function.const X b x\n[PROOFSTEP]\nsimp [hft hx]\n[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : NormalSpace X\ns t : Set X\nhs : IsClosed s\nht : IsClosed t\nhd : Disjoint s t\na b : \u211d\nhle : a \u2264 b\nf : X \u2192\u1d47 \u211d\nhfs : EqOn (\u2191f) 0 s\nhft : EqOn (\u2191f) 1 t\nhf01 : \u2200 (x : X), \u2191f x \u2208 Icc 0 1\nx : X\n\u22a2 a \u2264 \u2191(BoundedContinuousFunction.const X a + (b - a) \u2022 f) x\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : NormalSpace X\ns t : Set X\nhs : IsClosed s\nht : IsClosed t\nhd : Disjoint s t\na b : \u211d\nhle : a \u2264 b\nf : X \u2192\u1d47 \u211d\nhfs : EqOn (\u2191f) 0 s\nhft : EqOn (\u2191f) 1 t\nhf01 : \u2200 (x : X), \u2191f x \u2208 Icc 0 1\nx : X\n\u22a2 a \u2264 a + (b - a) * \u2191f x\n[PROOFSTEP]\nnlinarith [(hf01 x).1]\n[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : NormalSpace X\ns t : Set X\nhs : IsClosed s\nht : IsClosed t\nhd : Disjoint s t\na b : \u211d\nhle : a \u2264 b\nf : X \u2192\u1d47 \u211d\nhfs : EqOn (\u2191f) 0 s\nhft : EqOn (\u2191f) 1 t\nhf01 : \u2200 (x : X), \u2191f x \u2208 Icc 0 1\nx : X\n\u22a2 \u2191(BoundedContinuousFunction.const X a + (b - a) \u2022 f) x \u2264 b\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : NormalSpace X\ns t : Set X\nhs : IsClosed s\nht : IsClosed t\nhd : Disjoint s t\na b : \u211d\nhle : a \u2264 b\nf : X \u2192\u1d47 \u211d\nhfs : EqOn (\u2191f) 0 s\nhft : EqOn (\u2191f) 1 t\nhf01 : \u2200 (x : X), \u2191f x \u2208 Icc 0 1\nx : X\n\u22a2 a + (b - a) * \u2191f x \u2264 b\n[PROOFSTEP]\nnlinarith [(hf01 x).2]\n", "meta": {"mathlib_filename": "Mathlib.Topology.UrysohnsBounded", "llama_tokens": 1088, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711604559846, "lm_q2_score": 0.7799929002541068, "lm_q1q2_score": 0.6629714705764123}}
{"text": "[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\nf : SingleObj \u03b1 \u2964q SingleObj \u03b2\ng : SingleObj \u03b2 \u2964q SingleObj \u03b3\n\u22a2 \u2191toPrefunctor.symm (f \u22d9q g) = \u2191toPrefunctor.symm g \u2218 \u2191toPrefunctor.symm f\n[PROOFSTEP]\nsimp only [Equiv.symm_apply_eq, toPrefunctor_comp, Equiv.apply_symm_apply]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\nx : SingleObj \u03b1\np : Path (star \u03b1) x\n\u22a2 listToPath (pathToList p) = Path.cast (_ : star \u03b1 = star \u03b1) (_ : x = star \u03b1) p\n[PROOFSTEP]\ninduction' p with y z p a ih\n[GOAL]\ncase nil\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\nx : SingleObj \u03b1\n\u22a2 listToPath (pathToList Path.nil) = Path.cast (_ : star \u03b1 = star \u03b1) (_ : star \u03b1 = star \u03b1) Path.nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\nx y z : SingleObj \u03b1\np : Path (star \u03b1) y\na : y \u27f6 z\nih : listToPath (pathToList p) = Path.cast (_ : star \u03b1 = star \u03b1) (_ : y = star \u03b1) p\n\u22a2 listToPath (pathToList (Path.cons p a)) = Path.cast (_ : star \u03b1 = star \u03b1) (_ : z = star \u03b1) (Path.cons p a)\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase cons\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\nx y z : SingleObj \u03b1\np : Path (star \u03b1) y\na : y \u27f6 z\nih : listToPath (pathToList p) = p\n\u22a2 Path.cons (listToPath (pathToList p)) a = Path.cons p a\n[PROOFSTEP]\nrw [ih]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\nl : List \u03b1\n\u22a2 pathToList (listToPath l) = l\n[PROOFSTEP]\ninduction' l with a l ih\n[GOAL]\ncase nil\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\n\u22a2 pathToList (listToPath []) = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\na : \u03b1\nl : List \u03b1\nih : pathToList (listToPath l) = l\n\u22a2 pathToList (listToPath (a :: l)) = a :: l\n[PROOFSTEP]\nchange a :: pathToList (listToPath l) = a :: l\n[GOAL]\ncase cons\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03b3 : Type u_3\na : \u03b1\nl : List \u03b1\nih : pathToList (listToPath l) = l\n\u22a2 a :: pathToList (listToPath l) = a :: l\n[PROOFSTEP]\nrw [ih]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Quiver.SingleObj", "llama_tokens": 823, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438951143326726, "lm_q2_score": 0.7853085708384736, "lm_q1q2_score": 0.6627180661741614}}
{"text": "[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\nF : Type u_5\ninst\u271d : Monoid F\nc : F \u2192 M \u2192 M\nh1 : c 1 = id\nhmul : \u2200 (f g : F), c (f * g) = c f \u2218 c g\nf : F\n\u22a2 c (f ^ 0) = (c f)^[0]\n[PROOFSTEP]\nrw [pow_zero, h1]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\nF : Type u_5\ninst\u271d : Monoid F\nc : F \u2192 M \u2192 M\nh1 : c 1 = id\nhmul : \u2200 (f g : F), c (f * g) = c f \u2218 c g\nf : F\n\u22a2 id = (c f)^[0]\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\nF : Type u_5\ninst\u271d : Monoid F\nc : F \u2192 M \u2192 M\nh1 : c 1 = id\nhmul : \u2200 (f g : F), c (f * g) = c f \u2218 c g\nf : F\nn : \u2115\n\u22a2 c (f ^ (n + 1)) = (c f)^[n + 1]\n[PROOFSTEP]\nrw [pow_succ, iterate_succ', hmul, hom_coe_pow c h1 hmul f n]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\ninst\u271d\u00b9 : Monoid G\na : G\nn : \u2115\ninst\u271d : MulAction G H\nb : H\n\u22a2 (fun x => a \u2022 x)^[Nat.zero] b = a ^ Nat.zero \u2022 b\n[PROOFSTEP]\nrw [iterate_zero, id.def, pow_zero, one_smul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\ninst\u271d\u00b9 : Monoid G\na : G\nn\u271d : \u2115\ninst\u271d : MulAction G H\nb : H\nn : \u2115\nih : (fun x => a \u2022 x)^[n] b = a ^ n \u2022 b\n\u22a2 (fun x => a \u2022 x)^[Nat.succ n] b = a ^ Nat.succ n \u2022 b\n[PROOFSTEP]\nrw [iterate_succ', comp_apply, ih, pow_succ, mul_smul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\ninst\u271d : Monoid G\na : G\nn : \u2115\n\u22a2 (fun x => x * a)^[n] 1 = a ^ n\n[PROOFSTEP]\nsimp [mul_right_iterate]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\ninst\u271d : Semigroup G\na b c : G\nh : SemiconjBy a b c\nj : G\n\u22a2 (fun x => a * x) ((fun x => b * x) j) = (fun x => c * x) ((fun x => a * x) j)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\ninst\u271d : Semigroup G\na b c : G\nh : SemiconjBy a b c\nj : G\n\u22a2 a * (b * j) = c * (a * j)\n[PROOFSTEP]\nrw [\u2190 mul_assoc, h.eq, mul_assoc]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nH : Type u_4\ninst\u271d : Semigroup G\na b c : G\nh : SemiconjBy a b c\nj : G\n\u22a2 (fun x => x * a) ((fun x => x * c) j) = (fun x => x * b) ((fun x => x * a) j)\n[PROOFSTEP]\nsimp_rw [mul_assoc, \u2190 h.eq]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Hom.Iterate", "llama_tokens": 1107, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424373085146, "lm_q2_score": 0.782662489091802, "lm_q1q2_score": 0.6620874136122678}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\n\u03b9 : Type u_4\n\u03ba : Type u_5\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : AddCommGroup M\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : AddCommGroup N\ninst\u271d : Module R N\nb : Basis \u03b9 R M\nc : Basis \u03ba R N\ni : \u03b9\nj : \u03ba\n\u22a2 \u2191(tensorProduct b c) (i, j) = \u2191b i \u2297\u209c[R] \u2191c j\n[PROOFSTEP]\nsimp [Basis.tensorProduct]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\n\u03b9 : Type u_4\n\u03ba : Type u_5\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : AddCommGroup M\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : AddCommGroup N\ninst\u271d : Module R N\nb : Basis \u03b9 R M\nc : Basis \u03ba R N\ni : \u03b9 \u00d7 \u03ba\n\u22a2 \u2191(tensorProduct b c) i = \u2191b i.fst \u2297\u209c[R] \u2191c i.snd\n[PROOFSTEP]\nsimp [Basis.tensorProduct]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\n\u03b9 : Type u_4\n\u03ba : Type u_5\ninst\u271d\u2074 : CommRing R\ninst\u271d\u00b3 : AddCommGroup M\ninst\u271d\u00b2 : Module R M\ninst\u271d\u00b9 : AddCommGroup N\ninst\u271d : Module R N\nb : Basis \u03b9 R M\nc : Basis \u03ba R N\nm : M\nn : N\ni : \u03b9\nj : \u03ba\n\u22a2 \u2191(\u2191(tensorProduct b c).repr (m \u2297\u209c[R] n)) (i, j) = \u2191(\u2191b.repr m) i * \u2191(\u2191c.repr n) j\n[PROOFSTEP]\nsimp [Basis.tensorProduct]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.TensorProductBasis", "llama_tokens": 535, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8596637612961506, "lm_q2_score": 0.7690802370707281, "lm_q1q2_score": 0.6611504093387573}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst\u271d\u2076 : CommSemiring R\ninst\u271d\u2075 : CommSemiring A\ninst\u271d\u2074 : Semiring B\ninst\u271d\u00b3 : Algebra R A\ninst\u271d\u00b2 : Algebra A B\ninst\u271d\u00b9 : Algebra R B\ninst\u271d : IsScalarTower R A B\nx : B\np : R[X]\n\u22a2 \u2191(aeval x) (map (algebraMap R A) p) = \u2191(aeval x) p\n[PROOFSTEP]\nrw [aeval_def, aeval_def, eval\u2082_map, IsScalarTower.algebraMap_eq R A B]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst\u271d\u2076 : CommSemiring R\ninst\u271d\u2075 : CommSemiring A\ninst\u271d\u2074 : Semiring B\ninst\u271d\u00b3 : Algebra R A\ninst\u271d\u00b2 : Algebra A B\ninst\u271d\u00b9 : Algebra R B\ninst\u271d : IsScalarTower R A B\nx : A\np : R[X]\n\u22a2 \u2191(aeval (\u2191(algebraMap A B) x)) p = \u2191(algebraMap A B) (\u2191(aeval x) p)\n[PROOFSTEP]\nrw [aeval_def, aeval_def, hom_eval\u2082, \u2190 IsScalarTower.algebraMap_eq]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst\u271d\u2078 : CommSemiring R\ninst\u271d\u2077 : CommSemiring A\ninst\u271d\u2076 : Semiring B\ninst\u271d\u2075 : Algebra R A\ninst\u271d\u2074 : Algebra A B\ninst\u271d\u00b3 : Algebra R B\ninst\u271d\u00b2 : IsScalarTower R A B\ninst\u271d\u00b9 : NoZeroSMulDivisors A B\ninst\u271d : Nontrivial B\nx : A\np : R[X]\n\u22a2 \u2191(aeval (\u2191(algebraMap A B) x)) p = 0 \u2194 \u2191(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\ninst\u271d\u2076 : CommSemiring R\ninst\u271d\u2075 : CommSemiring A\ninst\u271d\u2074 : Semiring B\ninst\u271d\u00b3 : Algebra R A\ninst\u271d\u00b2 : Algebra A B\ninst\u271d\u00b9 : Algebra R B\ninst\u271d : IsScalarTower R A B\nx : A\np : R[X]\nh : Function.Injective \u2191(algebraMap A B)\n\u22a2 \u2191(aeval (\u2191(algebraMap A B) x)) p = 0 \u2194 \u2191(aeval x) p = 0\n[PROOFSTEP]\nrw [aeval_algebraMap_apply, \u2190 (algebraMap A B).map_zero, h.eq_iff]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Tower", "llama_tokens": 812, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256313782276, "lm_q2_score": 0.785308580887758, "lm_q1q2_score": 0.6610928919325768}}
{"text": "[GOAL]\nz : \u2102\n\u22a2 z \u2208 circle \u2194 \u2191normSq z = 1\n[PROOFSTEP]\nsimp [Complex.abs]\n[GOAL]\nz : { x // x \u2208 circle }\n\u22a2 \u2191normSq \u2191z = 1\n[PROOFSTEP]\nsimp [normSq_eq_abs]\n[GOAL]\nz : { x // x \u2208 circle }\n\u22a2 \u2191z\u207b\u00b9 = \u2191(starRingEnd \u2102) \u2191z\n[PROOFSTEP]\nrw [coe_inv_circle, inv_def, normSq_eq_of_mem_circle, inv_one, ofReal_one, mul_one]\n[GOAL]\nz : \u2102\nhz : z \u2260 0\n\u22a2 \u2191Complex.abs (\u2191(starRingEnd \u2102) z / z) = 1\n[PROOFSTEP]\nrw [map_div\u2080, abs_conj, div_self]\n[GOAL]\nz : \u2102\nhz : z \u2260 0\n\u22a2 \u2191Complex.abs z \u2260 0\n[PROOFSTEP]\nexact Complex.abs.ne_zero hz\n[GOAL]\nt : \u211d\n\u22a2 exp (\u2191t * I) \u2208 circle\n[PROOFSTEP]\nsimp [exp_mul_I, abs_cos_add_sin_mul_I]\n[GOAL]\n\u22a2 \u2191(\u2191expMapCircle 0) = \u21911\n[PROOFSTEP]\nrw [expMapCircle_apply, ofReal_zero, zero_mul, exp_zero, Submonoid.coe_one]\n[GOAL]\nx y : \u211d\n\u22a2 \u2191(\u2191expMapCircle (x + y)) = \u2191(\u2191expMapCircle x * \u2191expMapCircle y)\n[PROOFSTEP]\nsimp only [expMapCircle_apply, Submonoid.coe_mul, ofReal_add, add_mul, Complex.exp_add]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.Circle", "llama_tokens": 491, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8723473813156295, "lm_q2_score": 0.7577943767446202, "lm_q1q2_score": 0.661059940128879}}
{"text": "[GOAL]\nR : Type u_1\nL : Type u_2\ninst\u271d\u2078 : CommRing R\ninst\u271d\u2077 : LieRing L\ninst\u271d\u2076 : LieAlgebra R L\nM : Type u_3\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : Module R M\ninst\u271d\u00b3 : LieRingModule L M\ninst\u271d\u00b2 : LieModule R L M\ninst\u271d\u00b9 : Module.Free R M\ninst\u271d : Module.Finite R M\nx y z : L\n\u22a2 \u2191(\u2191(traceForm R L M) \u2045x, y\u2046) z = \u2191(\u2191(traceForm R L M) x) \u2045y, z\u2046\n[PROOFSTEP]\ncalc\n  traceForm R L M \u2045x, y\u2046 z = trace R _ (\u03c6 \u2045x, y\u2046 \u2218\u2097 \u03c6 z) := by simp only [traceForm_apply_apply]\n  _ = trace R _ ((\u03c6 x * \u03c6 y - \u03c6 y * \u03c6 x) * \u03c6 z) := ?_\n  _ = trace R _ (\u03c6 x * (\u03c6 y * \u03c6 z)) - trace R _ (\u03c6 y * (\u03c6 x * \u03c6 z)) := ?_\n  _ = trace R _ (\u03c6 x * (\u03c6 y * \u03c6 z)) - trace R _ (\u03c6 x * (\u03c6 z * \u03c6 y)) := ?_\n  _ = traceForm R L M x \u2045y, z\u2046 := ?_\n[GOAL]\nR : Type u_1\nL : Type u_2\ninst\u271d\u2078 : CommRing R\ninst\u271d\u2077 : LieRing L\ninst\u271d\u2076 : LieAlgebra R L\nM : Type u_3\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : Module R M\ninst\u271d\u00b3 : LieRingModule L M\ninst\u271d\u00b2 : LieModule R L M\ninst\u271d\u00b9 : Module.Free R M\ninst\u271d : Module.Finite R M\nx y z : L\n\u22a2 \u2191(\u2191(traceForm R L M) \u2045x, y\u2046) z = \u2191(trace R M) (LinearMap.comp (\u2191\u03c6 \u2045x, y\u2046) (\u2191\u03c6 z))\n[PROOFSTEP]\nsimp only [traceForm_apply_apply]\n[GOAL]\ncase calc_1\nR : Type u_1\nL : Type u_2\ninst\u271d\u2078 : CommRing R\ninst\u271d\u2077 : LieRing L\ninst\u271d\u2076 : LieAlgebra R L\nM : Type u_3\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : Module R M\ninst\u271d\u00b3 : LieRingModule L M\ninst\u271d\u00b2 : LieModule R L M\ninst\u271d\u00b9 : Module.Free R M\ninst\u271d : Module.Finite R M\nx y z : L\n\u22a2 \u2191(trace R M) (LinearMap.comp (\u2191\u03c6 \u2045x, y\u2046) (\u2191\u03c6 z)) = \u2191(trace R M) ((\u2191\u03c6 x * \u2191\u03c6 y - \u2191\u03c6 y * \u2191\u03c6 x) * \u2191\u03c6 z)\n[PROOFSTEP]\nsimp only [LieHom.map_lie, Ring.lie_def, \u2190 LinearMap.mul_eq_comp]\n[GOAL]\ncase calc_2\nR : Type u_1\nL : Type u_2\ninst\u271d\u2078 : CommRing R\ninst\u271d\u2077 : LieRing L\ninst\u271d\u2076 : LieAlgebra R L\nM : Type u_3\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : Module R M\ninst\u271d\u00b3 : LieRingModule L M\ninst\u271d\u00b2 : LieModule R L M\ninst\u271d\u00b9 : Module.Free R M\ninst\u271d : Module.Finite R M\nx y z : L\n\u22a2 \u2191(trace R M) ((\u2191\u03c6 x * \u2191\u03c6 y - \u2191\u03c6 y * \u2191\u03c6 x) * \u2191\u03c6 z) =\n    \u2191(trace R M) (\u2191\u03c6 x * (\u2191\u03c6 y * \u2191\u03c6 z)) - \u2191(trace R M) (\u2191\u03c6 y * (\u2191\u03c6 x * \u2191\u03c6 z))\n[PROOFSTEP]\nsimp only [sub_mul, mul_sub, map_sub, mul_assoc]\n[GOAL]\ncase calc_3\nR : Type u_1\nL : Type u_2\ninst\u271d\u2078 : CommRing R\ninst\u271d\u2077 : LieRing L\ninst\u271d\u2076 : LieAlgebra R L\nM : Type u_3\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : Module R M\ninst\u271d\u00b3 : LieRingModule L M\ninst\u271d\u00b2 : LieModule R L M\ninst\u271d\u00b9 : Module.Free R M\ninst\u271d : Module.Finite R M\nx y z : L\n\u22a2 \u2191(trace R M) (\u2191\u03c6 x * (\u2191\u03c6 y * \u2191\u03c6 z)) - \u2191(trace R M) (\u2191\u03c6 y * (\u2191\u03c6 x * \u2191\u03c6 z)) =\n    \u2191(trace R M) (\u2191\u03c6 x * (\u2191\u03c6 y * \u2191\u03c6 z)) - \u2191(trace R M) (\u2191\u03c6 x * (\u2191\u03c6 z * \u2191\u03c6 y))\n[PROOFSTEP]\nsimp only [LinearMap.trace_mul_cycle' R (\u03c6 x) (\u03c6 z) (\u03c6 y)]\n[GOAL]\ncase calc_4\nR : Type u_1\nL : Type u_2\ninst\u271d\u2078 : CommRing R\ninst\u271d\u2077 : LieRing L\ninst\u271d\u2076 : LieAlgebra R L\nM : Type u_3\ninst\u271d\u2075 : AddCommGroup M\ninst\u271d\u2074 : Module R M\ninst\u271d\u00b3 : LieRingModule L M\ninst\u271d\u00b2 : LieModule R L M\ninst\u271d\u00b9 : Module.Free R M\ninst\u271d : Module.Finite R M\nx y z : L\n\u22a2 \u2191(trace R M) (\u2191\u03c6 x * (\u2191\u03c6 y * \u2191\u03c6 z)) - \u2191(trace R M) (\u2191\u03c6 x * (\u2191\u03c6 z * \u2191\u03c6 y)) = \u2191(\u2191(traceForm R L M) x) \u2045y, z\u2046\n[PROOFSTEP]\nsimp only [traceForm_apply_apply, LieHom.map_lie, Ring.lie_def, mul_sub, map_sub, \u2190 LinearMap.mul_eq_comp]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Killing", "llama_tokens": 1612, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8991213691605412, "lm_q2_score": 0.7341195327172402, "lm_q1q2_score": 0.6600625593842218}}
{"text": "[GOAL]\nf f' : \u211d \u2192 \u211d\na b l : \u211d\nhab : a < b\nhfa : Tendsto f (\ud835\udcdd[Ioi a] a) (\ud835\udcdd l)\nhfb : Tendsto f (\ud835\udcdd[Iio b] b) (\ud835\udcdd l)\n\u22a2 \u2203 c, c \u2208 Ioo a b \u2227 deriv f c = 0\n[PROOFSTEP]\nby_cases h : \u2200 x \u2208 Ioo a b, DifferentiableAt \u211d f x\n[GOAL]\ncase pos\nf f' : \u211d \u2192 \u211d\na b l : \u211d\nhab : a < b\nhfa : Tendsto f (\ud835\udcdd[Ioi a] a) (\ud835\udcdd l)\nhfb : Tendsto f (\ud835\udcdd[Iio b] b) (\ud835\udcdd l)\nh : \u2200 (x : \u211d), x \u2208 Ioo a b \u2192 DifferentiableAt \u211d f x\n\u22a2 \u2203 c, c \u2208 Ioo a b \u2227 deriv f c = 0\n[PROOFSTEP]\nexact exists_hasDerivAt_eq_zero' hab hfa hfb fun x hx => (h x hx).hasDerivAt\n[GOAL]\ncase neg\nf f' : \u211d \u2192 \u211d\na b l : \u211d\nhab : a < b\nhfa : Tendsto f (\ud835\udcdd[Ioi a] a) (\ud835\udcdd l)\nhfb : Tendsto f (\ud835\udcdd[Iio b] b) (\ud835\udcdd l)\nh : \u00ac\u2200 (x : \u211d), x \u2208 Ioo a b \u2192 DifferentiableAt \u211d f x\n\u22a2 \u2203 c, c \u2208 Ioo a b \u2227 deriv f c = 0\n[PROOFSTEP]\nobtain \u27e8c, hc, hcdiff\u27e9 : \u2203 x \u2208 Ioo a b, \u00acDifferentiableAt \u211d f x\n[GOAL]\nf f' : \u211d \u2192 \u211d\na b l : \u211d\nhab : a < b\nhfa : Tendsto f (\ud835\udcdd[Ioi a] a) (\ud835\udcdd l)\nhfb : Tendsto f (\ud835\udcdd[Iio b] b) (\ud835\udcdd l)\nh : \u00ac\u2200 (x : \u211d), x \u2208 Ioo a b \u2192 DifferentiableAt \u211d f x\n\u22a2 \u2203 x, x \u2208 Ioo a b \u2227 \u00acDifferentiableAt \u211d f x\n[PROOFSTEP]\npush_neg at h \n[GOAL]\nf f' : \u211d \u2192 \u211d\na b l : \u211d\nhab : a < b\nhfa : Tendsto f (\ud835\udcdd[Ioi a] a) (\ud835\udcdd l)\nhfb : Tendsto f (\ud835\udcdd[Iio b] b) (\ud835\udcdd l)\nh : \u2203 x, x \u2208 Ioo a b \u2227 \u00acDifferentiableAt \u211d f x\n\u22a2 \u2203 x, x \u2208 Ioo a b \u2227 \u00acDifferentiableAt \u211d f x\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg.intro.intro\nf f' : \u211d \u2192 \u211d\na b l : \u211d\nhab : a < b\nhfa : Tendsto f (\ud835\udcdd[Ioi a] a) (\ud835\udcdd l)\nhfb : Tendsto f (\ud835\udcdd[Iio b] b) (\ud835\udcdd l)\nh : \u00ac\u2200 (x : \u211d), x \u2208 Ioo a b \u2192 DifferentiableAt \u211d f x\nc : \u211d\nhc : c \u2208 Ioo a b\nhcdiff : \u00acDifferentiableAt \u211d f c\n\u22a2 \u2203 c, c \u2208 Ioo a b \u2227 deriv f c = 0\n[PROOFSTEP]\nexact \u27e8c, hc, deriv_zero_of_not_differentiableAt hcdiff\u27e9\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.LocalExtr.Rolle", "llama_tokens": 918, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424295406088, "lm_q2_score": 0.7799929053683038, "lm_q1q2_score": 0.6598290933917011}}
{"text": "[GOAL]\nR : Type u_1\ninst\u271d\u00b9 : Ring R\nn m : \u2115\ninst\u271d : CharP R m\nh : m \u2223 n\nsrc\u271d : ZMod n \u2192+* R := castHom h R\na : ZMod n\nr : (fun x => R) a\n\u22a2 \u2191a * r = r * \u2191a\n[PROOFSTEP]\nrcases ZMod.int_cast_surjective a with \u27e8k, rfl\u27e9\n[GOAL]\ncase intro\nR : Type u_1\ninst\u271d\u00b9 : Ring R\nn m : \u2115\ninst\u271d : CharP R m\nh : m \u2223 n\nsrc\u271d : ZMod n \u2192+* R := castHom h R\nk : \u2124\nr : R\n\u22a2 \u2191\u2191k * r = r * \u2191\u2191k\n[PROOFSTEP]\nshow ZMod.castHom h R k * r = r * ZMod.castHom h R k\n[GOAL]\ncase intro\nR : Type u_1\ninst\u271d\u00b9 : Ring R\nn m : \u2115\ninst\u271d : CharP R m\nh : m \u2223 n\nsrc\u271d : ZMod n \u2192+* R := castHom h R\nk : \u2124\nr : R\n\u22a2 \u2191(castHom h R) \u2191k * r = r * \u2191(castHom h R) \u2191k\n[PROOFSTEP]\nrw [map_intCast]\n[GOAL]\ncase intro\nR : Type u_1\ninst\u271d\u00b9 : Ring R\nn m : \u2115\ninst\u271d : CharP R m\nh : m \u2223 n\nsrc\u271d : ZMod n \u2192+* R := castHom h R\nk : \u2124\nr : R\n\u22a2 \u2191k * r = r * \u2191k\n[PROOFSTEP]\nexact Commute.cast_int_left r k\n", "meta": {"mathlib_filename": "Mathlib.Data.ZMod.Algebra", "llama_tokens": 463, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.863391624034103, "lm_q2_score": 0.7634837743174788, "lm_q1q2_score": 0.6591854958316546}}
{"text": "[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nhead\u271d : \u03b1\nl : List \u03b1\n\u22a2 (head\u271d :: l) \u00d7\u02e2 [] = []\n[PROOFSTEP]\nsimp [product_cons, product_nil]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nl\u2081 : List \u03b1\nl\u2082 : List \u03b2\na : \u03b1\nb : \u03b2\n\u22a2 (a, b) \u2208 l\u2081 \u00d7\u02e2 l\u2082 \u2194 a \u2208 l\u2081 \u2227 b \u2208 l\u2082\n[PROOFSTEP]\nsimp_all [SProd.sprod, product, mem_bind, mem_map, Prod.ext_iff, exists_prop, and_left_comm, exists_and_left,\n  exists_eq_left, exists_eq_right]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nl\u2081 : List \u03b1\nl\u2082 : List \u03b2\n\u22a2 length (l\u2081 \u00d7\u02e2 l\u2082) = length l\u2081 * length l\u2082\n[PROOFSTEP]\ninduction' l\u2081 with x l\u2081 IH\n[GOAL]\ncase nil\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nl\u2082 : List \u03b2\n\u22a2 length ([] \u00d7\u02e2 l\u2082) = length [] * length l\u2082\n[PROOFSTEP]\nexact (zero_mul _).symm\n[GOAL]\ncase cons\n\u03b1 : Type u_1\n\u03b2 : Type u_2\nl\u2082 : List \u03b2\nx : \u03b1\nl\u2081 : List \u03b1\nIH : length (l\u2081 \u00d7\u02e2 l\u2082) = length l\u2081 * length l\u2082\n\u22a2 length ((x :: l\u2081) \u00d7\u02e2 l\u2082) = length (x :: l\u2081) * length l\u2082\n[PROOFSTEP]\nsimp only [length, product_cons, length_append, IH, right_distrib, one_mul, length_map, add_comm]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03c3 : \u03b1 \u2192 Type u_3\nhead\u271d : \u03b1\nl : List \u03b1\n\u22a2 (List.sigma (head\u271d :: l) fun a => []) = []\n[PROOFSTEP]\nsimp [sigma_cons, sigma_nil]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03c3 : \u03b1 \u2192 Type u_3\nl\u2081 : List \u03b1\nl\u2082 : (a : \u03b1) \u2192 List (\u03c3 a)\na : \u03b1\nb : \u03c3 a\n\u22a2 { fst := a, snd := b } \u2208 List.sigma l\u2081 l\u2082 \u2194 a \u2208 l\u2081 \u2227 b \u2208 l\u2082 a\n[PROOFSTEP]\nsimp [List.sigma, mem_bind, mem_map, exists_prop, exists_and_left, and_left_comm, exists_eq_left, heq_iff_eq,\n  exists_eq_right]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03c3 : \u03b1 \u2192 Type u_3\nl\u2081 : List \u03b1\nl\u2082 : (a : \u03b1) \u2192 List (\u03c3 a)\n\u22a2 length (List.sigma l\u2081 l\u2082) = sum (map (fun a => length (l\u2082 a)) l\u2081)\n[PROOFSTEP]\ninduction' l\u2081 with x l\u2081 IH\n[GOAL]\ncase nil\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03c3 : \u03b1 \u2192 Type u_3\nl\u2082 : (a : \u03b1) \u2192 List (\u03c3 a)\n\u22a2 length (List.sigma [] l\u2082) = sum (map (fun a => length (l\u2082 a)) [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\n\u03b1 : Type u_1\n\u03b2 : Type u_2\n\u03c3 : \u03b1 \u2192 Type u_3\nl\u2082 : (a : \u03b1) \u2192 List (\u03c3 a)\nx : \u03b1\nl\u2081 : List \u03b1\nIH : length (List.sigma l\u2081 l\u2082) = sum (map (fun a => length (l\u2082 a)) l\u2081)\n\u22a2 length (List.sigma (x :: l\u2081) l\u2082) = sum (map (fun a => length (l\u2082 a)) (x :: l\u2081))\n[PROOFSTEP]\nsimp only [map, sigma_cons, length_append, length_map, IH, sum_cons]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.ProdSigma", "llama_tokens": 1038, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256512199033, "lm_q2_score": 0.7826624840223698, "lm_q1q2_score": 0.6588653552975187}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : UniformSpace \u03b1\ninst\u271d : SeparatedSpace \u03b1\ns : Set \u03b1\nh : IsComplete s\na : \u03b1\nha : ClusterPt a (\ud835\udcdf s)\n\u22a2 a \u2208 s\n[PROOFSTEP]\nlet f := \ud835\udcdd[s] a\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : UniformSpace \u03b1\ninst\u271d : SeparatedSpace \u03b1\ns : Set \u03b1\nh : IsComplete s\na : \u03b1\nha : ClusterPt a (\ud835\udcdf s)\nf : Filter \u03b1 := \ud835\udcdd[s] a\n\u22a2 a \u2208 s\n[PROOFSTEP]\nhave : Cauchy f := cauchy_nhds.mono' ha inf_le_left\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d\u00b9 : UniformSpace \u03b1\ninst\u271d : SeparatedSpace \u03b1\ns : Set \u03b1\nh : IsComplete s\na : \u03b1\nha : ClusterPt a (\ud835\udcdf s)\nf : Filter \u03b1 := \ud835\udcdd[s] a\nthis : Cauchy f\n\u22a2 a \u2208 s\n[PROOFSTEP]\nrcases h f this inf_le_right with \u27e8y, ys, fy\u27e9\n[GOAL]\ncase intro.intro\n\u03b1 : Type u_1\ninst\u271d\u00b9 : UniformSpace \u03b1\ninst\u271d : SeparatedSpace \u03b1\ns : Set \u03b1\nh : IsComplete s\na : \u03b1\nha : ClusterPt a (\ud835\udcdf s)\nf : Filter \u03b1 := \ud835\udcdd[s] a\nthis : Cauchy f\ny : \u03b1\nys : y \u2208 s\nfy : f \u2264 \ud835\udcdd y\n\u22a2 a \u2208 s\n[PROOFSTEP]\nrwa [(tendsto_nhds_unique' ha inf_le_left fy : a = y)]\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.CompleteSeparated", "llama_tokens": 468, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267898240861, "lm_q2_score": 0.7577943658046609, "lm_q1q2_score": 0.6583920461888427}}
{"text": "[GOAL]\nk : \u2115\n\u22a2 0 < W k\n[PROOFSTEP]\ninduction' k with k hk\n[GOAL]\ncase zero\n\u22a2 0 < W Nat.zero\n[PROOFSTEP]\nunfold W\n[GOAL]\ncase zero\n\u22a2 0 < \u220f i in range Nat.zero, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nk : \u2115\nhk : 0 < W k\n\u22a2 0 < W (Nat.succ k)\n[PROOFSTEP]\nrw [W_succ]\n[GOAL]\ncase succ\nk : \u2115\nhk : 0 < W k\n\u22a2 0 < W k * ((2 * \u2191k + 2) / (2 * \u2191k + 1) * ((2 * \u2191k + 2) / (2 * \u2191k + 3)))\n[PROOFSTEP]\nrefine' mul_pos hk (mul_pos (div_pos _ _) (div_pos _ _))\n[GOAL]\ncase succ.refine'_1\nk : \u2115\nhk : 0 < W k\n\u22a2 0 < 2 * \u2191k + 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine'_2\nk : \u2115\nhk : 0 < W k\n\u22a2 0 < 2 * \u2191k + 1\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine'_3\nk : \u2115\nhk : 0 < W k\n\u22a2 0 < 2 * \u2191k + 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine'_4\nk : \u2115\nhk : 0 < W k\n\u22a2 0 < 2 * \u2191k + 3\n[PROOFSTEP]\npositivity\n[GOAL]\nn : \u2115\n\u22a2 W n = \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n\u22a2 W Nat.zero = \u2191(2 ^ (4 * Nat.zero)) * \u2191(Nat.zero ! ^ 4) / (\u2191((2 * Nat.zero)! ^ 2) * (2 * \u2191Nat.zero + 1))\n[PROOFSTEP]\nsimp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero, algebraMap.coe_one, one_pow, mul_one,\n  algebraMap.coe_zero, zero_add, div_self, Ne.def, one_ne_zero, not_false_iff]\n[GOAL]\ncase zero\n\u22a2 1 = \u2191(2 ^ (4 * Nat.zero)) * \u21911 / (\u2191((2 * Nat.zero)! ^ 2) * (2 * \u2191Nat.zero + 1))\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ\nn : \u2115\nIH : W n = \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 W (Nat.succ n) = \u2191(2 ^ (4 * Nat.succ n)) * \u2191((Nat.succ n)! ^ 4) / (\u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1))\n[PROOFSTEP]\nunfold W at IH \u22a2\n[GOAL]\ncase succ\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u220f i in range (Nat.succ n), (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * Nat.succ n)) * \u2191((Nat.succ n)! ^ 4) / (\u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1))\n[PROOFSTEP]\nrw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]\n[GOAL]\ncase succ\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) * ((2 * \u2191n + 2) * (2 * \u2191n + 2)) /\n      (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3))) =\n    \u2191(2 ^ (4 * Nat.succ n)) * \u2191((Nat.succ n)! ^ 4) / (\u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1))\n[PROOFSTEP]\nrefine' (div_eq_div_iff _ _).mpr _\n[GOAL]\ncase succ.refine'_1\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191((2 * n)! ^ 2) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3)) \u2260 0\ncase succ.refine'_2\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1) \u2260 0\ncase succ.refine'_3\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) * ((2 * \u2191n + 2) * (2 * \u2191n + 2)) * (\u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1)) =\n    \u2191(2 ^ (4 * Nat.succ n)) * \u2191((Nat.succ n)! ^ 4) * (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3)))\n[PROOFSTEP]\nany_goals exact ne_of_gt (by positivity)\n[GOAL]\ncase succ.refine'_1\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191((2 * n)! ^ 2) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3)) \u2260 0\n[PROOFSTEP]\nexact ne_of_gt (by positivity)\n[GOAL]\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 0 < \u2191((2 * n)! ^ 2) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3))\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine'_2\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1) \u2260 0\n[PROOFSTEP]\nexact ne_of_gt (by positivity)\n[GOAL]\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 0 < \u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine'_3\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) * ((2 * \u2191n + 2) * (2 * \u2191n + 2)) * (\u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1)) =\n    \u2191(2 ^ (4 * Nat.succ n)) * \u2191((Nat.succ n)! ^ 4) * (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3)))\n[PROOFSTEP]\nexact ne_of_gt (by positivity)\n[GOAL]\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 ?m.19110 < ?m.19109\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine'_3\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) * ((2 * \u2191n + 2) * (2 * \u2191n + 2)) * (\u2191((2 * Nat.succ n)! ^ 2) * (2 * \u2191(Nat.succ n) + 1)) =\n    \u2191(2 ^ (4 * Nat.succ n)) * \u2191((Nat.succ n)! ^ 4) * (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3)))\n[PROOFSTEP]\nsimp_rw [Nat.mul_succ, Nat.factorial_succ, pow_succ]\n[GOAL]\ncase succ.refine'_3\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 \u2191(2 ^ (4 * n)) * \u2191(n ! * (n ! * (n ! * (n ! * n ! ^ 0)))) * ((2 * \u2191n + 2) * (2 * \u2191n + 2)) *\n      (\u2191((2 * n + 1 + 1) * ((2 * n + 1) * (2 * n)!) *\n            ((2 * n + 1 + 1) * ((2 * n + 1) * (2 * n)!) * ((2 * n + 1 + 1) * ((2 * n + 1) * (2 * n)!)) ^ 0)) *\n        (2 * \u2191(Nat.succ n) + 1)) =\n    \u2191(2 * (2 * (2 * (2 * 2 ^ (4 * n))))) *\n        \u2191((n + 1) * n ! * ((n + 1) * n ! * ((n + 1) * n ! * ((n + 1) * n ! * ((n + 1) * n !) ^ 0)))) *\n      (\u2191((2 * n)! * ((2 * n)! * (2 * n)! ^ 0)) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3)))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase succ.refine'_3\nn : \u2115\nIH :\n  \u220f i in range n, (2 * \u2191i + 2) / (2 * \u2191i + 1) * ((2 * \u2191i + 2) / (2 * \u2191i + 3)) =\n    \u2191(2 ^ (4 * n)) * \u2191(n ! ^ 4) / (\u2191((2 * n)! ^ 2) * (2 * \u2191n + 1))\n\u22a2 2 ^ (4 * n) * (\u2191n ! * (\u2191n ! * (\u2191n ! * (\u2191n ! * \u2191n ! ^ 0)))) * ((2 * \u2191n + 2) * (2 * \u2191n + 2)) *\n      ((2 * \u2191n + 1 + 1) * ((2 * \u2191n + 1) * \u2191(2 * n)!) *\n          ((2 * \u2191n + 1 + 1) * ((2 * \u2191n + 1) * \u2191(2 * n)!) * ((2 * \u2191n + 1 + 1) * ((2 * \u2191n + 1) * \u2191(2 * n)!)) ^ 0) *\n        (2 * (\u2191n + 1) + 1)) =\n    2 * (2 * (2 * (2 * 2 ^ (4 * n)))) *\n        ((\u2191n + 1) * \u2191n ! * ((\u2191n + 1) * \u2191n ! * ((\u2191n + 1) * \u2191n ! * ((\u2191n + 1) * \u2191n ! * ((\u2191n + 1) * \u2191n !) ^ 0)))) *\n      (\u2191(2 * n)! * (\u2191(2 * n)! * \u2191(2 * n)! ^ 0) * (2 * \u2191n + 1) * ((2 * \u2191n + 1) * (2 * \u2191n + 3)))\n[PROOFSTEP]\nring_nf\n[GOAL]\nk : \u2115\n\u22a2 (\u03c0 / 2)\u207b\u00b9 * W k = (\u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k + 1)) / \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k)\n[PROOFSTEP]\nrw [integral_sin_pow_even, integral_sin_pow_odd, mul_div_mul_comm, \u2190 prod_div_distrib, inv_div]\n[GOAL]\nk : \u2115\n\u22a2 2 / \u03c0 * W k = 2 / \u03c0 * \u220f x in range k, (2 * \u2191x + 2) / (2 * \u2191x + 3) / ((2 * \u2191x + 1) / (2 * \u2191x + 2))\n[PROOFSTEP]\nsimp_rw [div_div_div_comm, div_div_eq_mul_div, mul_div_assoc]\n[GOAL]\nk : \u2115\n\u22a2 2 / \u03c0 * W k = 2 / \u03c0 * \u220f x in range k, (2 * \u2191x + 2) / (2 * \u2191x + 1) * ((2 * \u2191x + 2) / (2 * \u2191x + 3))\n[PROOFSTEP]\nrfl\n[GOAL]\nk : \u2115\n\u22a2 W k \u2264 \u03c0 / 2\n[PROOFSTEP]\nrw [\u2190 div_le_one pi_div_two_pos, div_eq_inv_mul]\n[GOAL]\nk : \u2115\n\u22a2 (\u03c0 / 2)\u207b\u00b9 * W k \u2264 1\n[PROOFSTEP]\nrw [W_eq_integral_sin_pow_div_integral_sin_pow, div_le_one (integral_sin_pow_pos _)]\n[GOAL]\nk : \u2115\n\u22a2 \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k + 1) \u2264 \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k)\n[PROOFSTEP]\napply integral_sin_pow_succ_le\n[GOAL]\nk : \u2115\n\u22a2 (2 * \u2191k + 1) / (2 * \u2191k + 2) * (\u03c0 / 2) \u2264 W k\n[PROOFSTEP]\nrw [\u2190 le_div_iff pi_div_two_pos, div_eq_inv_mul (W k) _]\n[GOAL]\nk : \u2115\n\u22a2 (2 * \u2191k + 1) / (2 * \u2191k + 2) \u2264 (\u03c0 / 2)\u207b\u00b9 * W k\n[PROOFSTEP]\nrw [W_eq_integral_sin_pow_div_integral_sin_pow, le_div_iff (integral_sin_pow_pos _)]\n[GOAL]\nk : \u2115\n\u22a2 (2 * \u2191k + 1) / (2 * \u2191k + 2) * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k) \u2264 \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k + 1)\n[PROOFSTEP]\nconvert integral_sin_pow_succ_le (2 * k + 1)\n[GOAL]\ncase h.e'_3\nk : \u2115\n\u22a2 (2 * \u2191k + 1) / (2 * \u2191k + 2) * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k) = \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k + 1 + 1)\n[PROOFSTEP]\nrw [integral_sin_pow (2 * k)]\n[GOAL]\ncase h.e'_3\nk : \u2115\n\u22a2 (2 * \u2191k + 1) / (2 * \u2191k + 2) * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k) =\n    (sin 0 ^ (2 * k + 1) * cos 0 - sin \u03c0 ^ (2 * k + 1) * cos \u03c0) / (\u2191(2 * k) + 2) +\n      (\u2191(2 * k) + 1) / (\u2191(2 * k) + 2) * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k)\n[PROOFSTEP]\nsimp only [sin_zero, zero_pow', Ne.def, Nat.succ_ne_zero, zero_mul, sin_pi, tsub_zero, zero_div, zero_add]\n[GOAL]\ncase h.e'_3\nk : \u2115\n\u22a2 (2 * \u2191k + 1) / (2 * \u2191k + 2) * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k) =\n    (\u2191(2 * k) + 1) / (\u2191(2 * k) + 2) * \u222b (x : \u211d) in 0 ..\u03c0, sin x ^ (2 * k)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n\u22a2 Tendsto W atTop (\ud835\udcdd (\u03c0 / 2))\n[PROOFSTEP]\nrefine' tendsto_of_tendsto_of_tendsto_of_le_of_le _ tendsto_const_nhds le_W W_le\n[GOAL]\n\u22a2 Tendsto (fun i => (2 * \u2191i + 1) / (2 * \u2191i + 2) * (\u03c0 / 2)) atTop (\ud835\udcdd (\u03c0 / 2))\n[PROOFSTEP]\nhave : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2)) := by rw [sub_zero, one_mul]\n[GOAL]\n\u22a2 \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\n[PROOFSTEP]\nrw [sub_zero, one_mul]\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\n\u22a2 Tendsto (fun i => (2 * \u2191i + 1) / (2 * \u2191i + 2) * (\u03c0 / 2)) atTop (\ud835\udcdd (\u03c0 / 2))\n[PROOFSTEP]\nrw [this]\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\n\u22a2 Tendsto (fun i => (2 * \u2191i + 1) / (2 * \u2191i + 2) * (\u03c0 / 2)) atTop (\ud835\udcdd ((1 - 0) * (\u03c0 / 2)))\n[PROOFSTEP]\nrefine' Tendsto.mul _ tendsto_const_nhds\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\n\u22a2 Tendsto (fun i => (2 * \u2191i + 1) / (2 * \u2191i + 2)) atTop (\ud835\udcdd (1 - 0))\n[PROOFSTEP]\nhave h : \u2200 n : \u2115, ((2 : \u211d) * n + 1) / (2 * n + 2) = 1 - 1 / (2 * n + 2) :=\n  by\n  intro n\n  rw [sub_div' _ _ _\n      (ne_of_gt (add_pos_of_nonneg_of_pos (mul_nonneg (two_pos : 0 < (2 : \u211d)).le (Nat.cast_nonneg _)) two_pos)),\n    one_mul]\n  congr 1; ring\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\n\u22a2 \u2200 (n : \u2115), (2 * \u2191n + 1) / (2 * \u2191n + 2) = 1 - 1 / (2 * \u2191n + 2)\n[PROOFSTEP]\nintro n\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\nn : \u2115\n\u22a2 (2 * \u2191n + 1) / (2 * \u2191n + 2) = 1 - 1 / (2 * \u2191n + 2)\n[PROOFSTEP]\nrw [sub_div' _ _ _\n    (ne_of_gt (add_pos_of_nonneg_of_pos (mul_nonneg (two_pos : 0 < (2 : \u211d)).le (Nat.cast_nonneg _)) two_pos)),\n  one_mul]\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\nn : \u2115\n\u22a2 (2 * \u2191n + 1) / (2 * \u2191n + 2) = (2 * \u2191n + 2 - 1) / (2 * \u2191n + 2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\nn : \u2115\n\u22a2 2 * \u2191n + 1 = 2 * \u2191n + 2 - 1\n[PROOFSTEP]\nring\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\nh : \u2200 (n : \u2115), (2 * \u2191n + 1) / (2 * \u2191n + 2) = 1 - 1 / (2 * \u2191n + 2)\n\u22a2 Tendsto (fun i => (2 * \u2191i + 1) / (2 * \u2191i + 2)) atTop (\ud835\udcdd (1 - 0))\n[PROOFSTEP]\nsimp_rw [h]\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\nh : \u2200 (n : \u2115), (2 * \u2191n + 1) / (2 * \u2191n + 2) = 1 - 1 / (2 * \u2191n + 2)\n\u22a2 Tendsto (fun i => 1 - 1 / (2 * \u2191i + 2)) atTop (\ud835\udcdd (1 - 0))\n[PROOFSTEP]\nrefine' (tendsto_const_nhds.div_atTop _).const_sub _\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\nh : \u2200 (n : \u2115), (2 * \u2191n + 1) / (2 * \u2191n + 2) = 1 - 1 / (2 * \u2191n + 2)\n\u22a2 Tendsto (fun i => 2 * \u2191i + 2) atTop atTop\n[PROOFSTEP]\nrefine' Tendsto.atTop_add _ tendsto_const_nhds\n[GOAL]\nthis : \ud835\udcdd (\u03c0 / 2) = \ud835\udcdd ((1 - 0) * (\u03c0 / 2))\nh : \u2200 (n : \u2115), (2 * \u2191n + 1) / (2 * \u2191n + 2) = 1 - 1 / (2 * \u2191n + 2)\n\u22a2 Tendsto (fun i => 2 * \u2191i) atTop atTop\n[PROOFSTEP]\nexact tendsto_nat_cast_atTop_atTop.const_mul_atTop two_pos\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.Pi.Wallis", "llama_tokens": 7374, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9149009596336303, "lm_q2_score": 0.7185943925708561, "lm_q1q2_score": 0.6574426993504219}}
{"text": "[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b2 : Mul \u03b1\ninst\u271d\u00b9 : Mul \u03b2\n\u03b3 : Type u_1\ninst\u271d : Mul \u03b3\nf : \u03b1 \u2192 \u03b2\ng : \u03b2 \u2192 \u03b3\nhf : IsMulHom f\nhg : IsMulHom g\nx y : \u03b1\n\u22a2 (g \u2218 f) (x * y) = (g \u2218 f) x * (g \u2218 f) y\n[PROOFSTEP]\nsimp only [Function.comp, hf.map_mul, hg.map_mul]\n[GOAL]\n\u03b1\u271d : Type u\n\u03b2\u271d : Type v\ninst\u271d\u2074 : Mul \u03b1\u271d\ninst\u271d\u00b3 : Mul \u03b2\u271d\n\u03b3 : Type u_1\ninst\u271d\u00b2 : Mul \u03b3\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d\u00b9 : Semigroup \u03b1\ninst\u271d : CommSemigroup \u03b2\nf g : \u03b1 \u2192 \u03b2\nhf : IsMulHom f\nhg : IsMulHom g\na b : \u03b1\n\u22a2 f (a * b) * g (a * b) = f a * g a * (f b * g b)\n[PROOFSTEP]\nsimp only [hf.map_mul, hg.map_mul, mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b9 : MulOneClass \u03b1\ninst\u271d : Group \u03b2\nf : \u03b1 \u2192 \u03b2\nhf : IsMulHom f\n\u22a2 ?m.13736 hf * f 1 = ?m.13736 hf\n[PROOFSTEP]\nrw [\u2190 hf.map_mul, one_mul]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b2 : MulOneClass \u03b1\ninst\u271d\u00b9 : MulOneClass \u03b2\nf : \u03b1 \u2192 \u03b2\nhf : IsMonoidHom f\n\u03b3 : Type u_1\ninst\u271d : MulOneClass \u03b3\ng : \u03b2 \u2192 \u03b3\nhg : IsMonoidHom g\nsrc\u271d : IsMulHom (g \u2218 f) := IsMulHom.comp hf.toIsMulHom hg.toIsMulHom\n\u22a2 g (f 1) = 1\n[PROOFSTEP]\nrw [hf.map_one, hg.map_one]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b9 : Group \u03b1\ninst\u271d : Group \u03b2\nf : \u03b1 \u2192 \u03b2\nhf\u271d hf : IsGroupHom f\na : \u03b1\n\u22a2 f a\u207b\u00b9 * f a = 1\n[PROOFSTEP]\nrw [\u2190 hf.map_mul, inv_mul_self, hf.map_one]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b9 : Group \u03b1\ninst\u271d : Group \u03b2\nf : \u03b1 \u2192 \u03b2\nhf\u271d hf : IsGroupHom f\na b : \u03b1\n\u22a2 f (a / b) = f a / f b\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, hf.map_mul, hf.map_inv]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b9 : Group \u03b1\ninst\u271d : Group \u03b2\nf\u271d : \u03b1 \u2192 \u03b2\nhf\u271d : IsGroupHom f\u271d\nf : \u03b1 \u2192 \u03b2\nhf : IsGroupHom f\nh : Function.Injective f\nx\u271d : \u03b1\n\u22a2 f x\u271d = 1 \u2192 x\u271d = 1\n[PROOFSTEP]\nrw [\u2190 hf.map_one]\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b9 : Group \u03b1\ninst\u271d : Group \u03b2\nf\u271d : \u03b1 \u2192 \u03b2\nhf\u271d : IsGroupHom f\u271d\nf : \u03b1 \u2192 \u03b2\nhf : IsGroupHom f\nh : Function.Injective f\nx\u271d : \u03b1\n\u22a2 f x\u271d = f 1 \u2192 x\u271d = 1\n[PROOFSTEP]\nexact @h _ _\n[GOAL]\n\u03b1 : Type u\n\u03b2 : Type v\ninst\u271d\u00b9 : Group \u03b1\ninst\u271d : Group \u03b2\nf\u271d : \u03b1 \u2192 \u03b2\nhf\u271d : IsGroupHom f\u271d\nf : \u03b1 \u2192 \u03b2\nhf : IsGroupHom f\nh : \u2200 (a : \u03b1), f a = 1 \u2192 a = 1\nx y : \u03b1\nhxy : f x = f y\n\u22a2 f (x / y) = 1\n[PROOFSTEP]\nrwa [hf.map_div, div_eq_one]\n[GOAL]\n\u03b1\u271d : Type u\n\u03b2\u271d : Type v\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d\u00b9 : AddGroup \u03b1\ninst\u271d : AddCommGroup \u03b2\nf g : \u03b1 \u2192 \u03b2\nhf : IsAddGroupHom f\nhg : IsAddGroupHom g\n\u22a2 IsAddGroupHom fun a => f a - g a\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n", "meta": {"mathlib_filename": "Mathlib.Deprecated.Group", "llama_tokens": 1325, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8705972583359805, "lm_q2_score": 0.7549149868676283, "lm_q1q2_score": 0.6572269178436998}}
{"text": "[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf : \u03b9 \u2192 \u211d\ng : \u03b9' \u2192 \u211d\nhf : Summable f\nhg : Summable g\nhf' : 0 \u2264 f\nhg' : 0 \u2264 g\n\u22a2 Summable fun x => \u2211' (y : \u03b9'), f (x, y).fst * g (x, y).snd\n[PROOFSTEP]\nsimpa only [hg.tsum_mul_left _] using hf.mul_right (\u2211' x, g x)\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\n\u22a2 Summable fun n => \u2016\u2211 kl in antidiagonal n, f kl.fst * g kl.snd\u2016\n[PROOFSTEP]\nhave :=\n  summable_sum_mul_antidiagonal_of_summable_mul\n    (Summable.mul_of_nonneg hf hg (fun _ => norm_nonneg _) fun _ => norm_nonneg _)\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\nthis : Summable fun n => \u2211 kl in antidiagonal n, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\n\u22a2 Summable fun n => \u2016\u2211 kl in antidiagonal n, f kl.fst * g kl.snd\u2016\n[PROOFSTEP]\nrefine' summable_of_nonneg_of_le (fun _ => norm_nonneg _) _ this\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\nthis : Summable fun n => \u2211 kl in antidiagonal n, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\n\u22a2 \u2200 (b : \u2115), \u2016\u2211 kl in antidiagonal b, f kl.fst * g kl.snd\u2016 \u2264 \u2211 kl in antidiagonal b, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\n[PROOFSTEP]\nintro n\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\nthis : Summable fun n => \u2211 kl in antidiagonal n, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\nn : \u2115\n\u22a2 \u2016\u2211 kl in antidiagonal n, f kl.fst * g kl.snd\u2016 \u2264 \u2211 kl in antidiagonal n, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\n[PROOFSTEP]\ncalc\n  \u2016\u2211 kl in antidiagonal n, f kl.1 * g kl.2\u2016 \u2264 \u2211 kl in antidiagonal n, \u2016f kl.1 * g kl.2\u2016 := norm_sum_le _ _\n  _ \u2264 \u2211 kl in antidiagonal n, \u2016f kl.1\u2016 * \u2016g kl.2\u2016 := by gcongr; apply norm_mul_le\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\nthis : Summable fun n => \u2211 kl in antidiagonal n, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\nn : \u2115\n\u22a2 \u2211 kl in antidiagonal n, \u2016f kl.fst * g kl.snd\u2016 \u2264 \u2211 kl in antidiagonal n, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\nthis : Summable fun n => \u2211 kl in antidiagonal n, \u2016f kl.fst\u2016 * \u2016g kl.snd\u2016\nn : \u2115\ni\u271d : \u2115 \u00d7 \u2115\na\u271d : i\u271d \u2208 antidiagonal n\n\u22a2 \u2016f i\u271d.fst * g i\u271d.snd\u2016 \u2264 \u2016f i\u271d.fst\u2016 * \u2016g i\u271d.snd\u2016\n[PROOFSTEP]\napply norm_mul_le\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\n\u22a2 Summable fun n => \u2016\u2211 k in range (n + 1), f k * g (n - k)\u2016\n[PROOFSTEP]\nsimp_rw [\u2190 sum_antidiagonal_eq_sum_range_succ fun k l => f k * g l]\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d : NormedRing R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\n\u22a2 Summable fun n => \u2016\u2211 ij in antidiagonal n, f ij.fst * g ij.snd\u2016\n[PROOFSTEP]\nexact summable_norm_sum_mul_antidiagonal_of_summable_norm hf hg\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d\u00b9 : NormedRing R\ninst\u271d : CompleteSpace R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\n\u22a2 (\u2211' (n : \u2115), f n) * \u2211' (n : \u2115), g n = \u2211' (n : \u2115), \u2211 k in range (n + 1), f k * g (n - k)\n[PROOFSTEP]\nsimp_rw [\u2190 sum_antidiagonal_eq_sum_range_succ fun k l => f k * g l]\n[GOAL]\nR : Type u_1\n\u03b9 : Type u_2\n\u03b9' : Type u_3\ninst\u271d\u00b9 : NormedRing R\ninst\u271d : CompleteSpace R\nf g : \u2115 \u2192 R\nhf : Summable fun x => \u2016f x\u2016\nhg : Summable fun x => \u2016g x\u2016\n\u22a2 (\u2211' (n : \u2115), f n) * \u2211' (n : \u2115), g n = \u2211' (n : \u2115), \u2211 ij in antidiagonal n, f ij.fst * g ij.snd\n[PROOFSTEP]\nexact tsum_mul_tsum_eq_tsum_sum_antidiagonal_of_summable_norm hf hg\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Field.InfiniteSum", "llama_tokens": 2024, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8840392817460333, "lm_q2_score": 0.743167997235783, "lm_q1q2_score": 0.6569897024929596}}
{"text": "[GOAL]\nX : Type u_1\nY : Type u_2\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : Preorder Y\ninst\u271d : OrderClosedTopology Y\nf g : X \u2192 Y\ns : Set X\na : X\nh : IsLocalMaxOn f s a\nhc : ContinuousOn f (closure s)\n\u22a2 IsLocalMaxOn f (closure s) a\n[PROOFSTEP]\nrcases mem_nhdsWithin.1 h with \u27e8U, Uo, aU, hU\u27e9\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : Preorder Y\ninst\u271d : OrderClosedTopology Y\nf g : X \u2192 Y\ns : Set X\na : X\nh : IsLocalMaxOn f s a\nhc : ContinuousOn f (closure s)\nU : Set X\nUo : IsOpen U\naU : a \u2208 U\nhU : U \u2229 s \u2286 {x | (fun x => f x \u2264 f a) x}\n\u22a2 IsLocalMaxOn f (closure s) a\n[PROOFSTEP]\nrefine' mem_nhdsWithin.2 \u27e8U, Uo, aU, _\u27e9\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : Preorder Y\ninst\u271d : OrderClosedTopology Y\nf g : X \u2192 Y\ns : Set X\na : X\nh : IsLocalMaxOn f s a\nhc : ContinuousOn f (closure s)\nU : Set X\nUo : IsOpen U\naU : a \u2208 U\nhU : U \u2229 s \u2286 {x | (fun x => f x \u2264 f a) x}\n\u22a2 U \u2229 closure s \u2286 {x | (fun x => f x \u2264 f a) x}\n[PROOFSTEP]\nrintro x \u27e8hxU, hxs\u27e9\n[GOAL]\ncase intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : Preorder Y\ninst\u271d : OrderClosedTopology Y\nf g : X \u2192 Y\ns : Set X\na : X\nh : IsLocalMaxOn f s a\nhc : ContinuousOn f (closure s)\nU : Set X\nUo : IsOpen U\naU : a \u2208 U\nhU : U \u2229 s \u2286 {x | (fun x => f x \u2264 f a) x}\nx : X\nhxU : x \u2208 U\nhxs : x \u2208 closure s\n\u22a2 x \u2208 {x | (fun x => f x \u2264 f a) x}\n[PROOFSTEP]\nrefine' ContinuousWithinAt.closure_le _ _ continuousWithinAt_const hU\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : Preorder Y\ninst\u271d : OrderClosedTopology Y\nf g : X \u2192 Y\ns : Set X\na : X\nh : IsLocalMaxOn f s a\nhc : ContinuousOn f (closure s)\nU : Set X\nUo : IsOpen U\naU : a \u2208 U\nhU : U \u2229 s \u2286 {x | (fun x => f x \u2264 f a) x}\nx : X\nhxU : x \u2208 U\nhxs : x \u2208 closure s\n\u22a2 x \u2208 closure (U \u2229 s)\n[PROOFSTEP]\nrwa [mem_closure_iff_nhdsWithin_neBot, nhdsWithin_inter_of_mem, \u2190 mem_closure_iff_nhdsWithin_neBot]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : Preorder Y\ninst\u271d : OrderClosedTopology Y\nf g : X \u2192 Y\ns : Set X\na : X\nh : IsLocalMaxOn f s a\nhc : ContinuousOn f (closure s)\nU : Set X\nUo : IsOpen U\naU : a \u2208 U\nhU : U \u2229 s \u2286 {x | (fun x => f x \u2264 f a) x}\nx : X\nhxU : x \u2208 U\nhxs : x \u2208 closure s\n\u22a2 U \u2208 \ud835\udcdd[s] x\n[PROOFSTEP]\nexact nhdsWithin_le_nhds (Uo.mem_nhds hxU)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nX : Type u_1\nY : Type u_2\ninst\u271d\u00b3 : TopologicalSpace X\ninst\u271d\u00b2 : TopologicalSpace Y\ninst\u271d\u00b9 : Preorder Y\ninst\u271d : OrderClosedTopology Y\nf g : X \u2192 Y\ns : Set X\na : X\nh : IsLocalMaxOn f s a\nhc : ContinuousOn f (closure s)\nU : Set X\nUo : IsOpen U\naU : a \u2208 U\nhU : U \u2229 s \u2286 {x | (fun x => f x \u2264 f a) x}\nx : X\nhxU : x \u2208 U\nhxs : x \u2208 closure s\n\u22a2 ContinuousWithinAt f (U \u2229 s) x\n[PROOFSTEP]\nexact (hc _ hxs).mono ((inter_subset_right _ _).trans subset_closure)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.ExtrClosure", "llama_tokens": 1493, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.863391617003942, "lm_q2_score": 0.7606506526772884, "lm_q1q2_score": 0.6567393969901478}}
{"text": "[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn : \u2115\nh\u2080 : x 0 \u2264 y 0\nhx : \u2200 (k : \u2115), k < n \u2192 x (k + 1) \u2264 f (x k)\nhy : \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x n \u2264 y n\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn : \u2115\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n \u2192 x (k + 1) \u2264 f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\nhx : \u2200 (k : \u2115), k < Nat.zero \u2192 x (k + 1) \u2264 f (x k)\nhy : \u2200 (k : \u2115), k < Nat.zero \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x Nat.zero \u2264 y Nat.zero\n[PROOFSTEP]\nexact h\u2080\n[GOAL]\ncase succ\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) \u2264 f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn : (\u2200 (k : \u2115), k < n \u2192 x (k + 1) \u2264 f (x k)) \u2192 (\u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x n \u2264 y n\nhx : \u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) \u2264 f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x (Nat.succ n) \u2264 y (Nat.succ n)\n[PROOFSTEP]\nrefine' (hx _ n.lt_succ_self).trans ((hf $ ihn _ _).trans (hy _ n.lt_succ_self))\n[GOAL]\ncase succ.refine'_1\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) \u2264 f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn : (\u2200 (k : \u2115), k < n \u2192 x (k + 1) \u2264 f (x k)) \u2192 (\u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x n \u2264 y n\nhx : \u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) \u2264 f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 \u2200 (k : \u2115), k < n \u2192 x (k + 1) \u2264 f (x k)\ncase succ.refine'_2\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) \u2264 f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn : (\u2200 (k : \u2115), k < n \u2192 x (k + 1) \u2264 f (x k)) \u2192 (\u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x n \u2264 y n\nhx : \u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) \u2264 f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\n[PROOFSTEP]\nexact fun k hk => hx _ (hk.trans n.lt_succ_self)\n[GOAL]\ncase succ.refine'_2\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) \u2264 f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn : (\u2200 (k : \u2115), k < n \u2192 x (k + 1) \u2264 f (x k)) \u2192 (\u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x n \u2264 y n\nhx : \u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) \u2264 f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\n[PROOFSTEP]\nexact fun k hk => hy _ (hk.trans n.lt_succ_self)\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn : \u2115\nhn : 0 < n\nh\u2080 : x 0 \u2264 y 0\nhx : \u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x n < y n\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn : \u2115\nhn\u271d : 0 < n\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\nhn : 0 < Nat.zero\nhx : \u2200 (k : \u2115), k < Nat.zero \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.zero \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x Nat.zero < y Nat.zero\n[PROOFSTEP]\nexact hn.false.elim\n[GOAL]\ncase succ\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nhn\u271d : 0 < n\u271d\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn : 0 < n \u2192 (\u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)) \u2192 (\u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x n < y n\nhn : 0 < Nat.succ n\nhx : \u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x (Nat.succ n) < y (Nat.succ n)\n[PROOFSTEP]\nsuffices x n \u2264 y n from (hx n n.lt_succ_self).trans_le ((hf this).trans $ hy n n.lt_succ_self)\n[GOAL]\ncase succ\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nhn\u271d : 0 < n\u271d\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn : 0 < n \u2192 (\u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)) \u2192 (\u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x n < y n\nhn : 0 < Nat.succ n\nhx : \u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x n \u2264 y n\n[PROOFSTEP]\ncases n with\n| zero => exact h\u2080\n| succ n =>\n  refine' (ihn n.zero_lt_succ (fun k hk => hx _ _) fun k hk => hy _ _).le <;> exact hk.trans n.succ.lt_succ_self\n[GOAL]\ncase succ\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nhn\u271d : 0 < n\u271d\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn : 0 < n \u2192 (\u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)) \u2192 (\u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x n < y n\nhn : 0 < Nat.succ n\nhx : \u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x n \u2264 y n\n[PROOFSTEP]\ncases n with\n| zero => exact h\u2080\n| succ n =>\n  refine' (ihn n.zero_lt_succ (fun k hk => hx _ _) fun k hk => hy _ _).le <;> exact hk.trans n.succ.lt_succ_self\n[GOAL]\ncase succ.zero\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn : \u2115\nhn\u271d : 0 < n\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\nihn :\n  0 < Nat.zero \u2192\n    (\u2200 (k : \u2115), k < Nat.zero \u2192 x (k + 1) < f (x k)) \u2192\n      (\u2200 (k : \u2115), k < Nat.zero \u2192 f (y k) \u2264 y (k + 1)) \u2192 x Nat.zero < y Nat.zero\nhn : 0 < Nat.succ Nat.zero\nhx : \u2200 (k : \u2115), k < Nat.succ Nat.zero \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ Nat.zero \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x Nat.zero \u2264 y Nat.zero\n[PROOFSTEP]\n\n| zero => exact h\u2080\n[GOAL]\ncase succ.zero\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn : \u2115\nhn\u271d : 0 < n\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\nihn :\n  0 < Nat.zero \u2192\n    (\u2200 (k : \u2115), k < Nat.zero \u2192 x (k + 1) < f (x k)) \u2192\n      (\u2200 (k : \u2115), k < Nat.zero \u2192 f (y k) \u2264 y (k + 1)) \u2192 x Nat.zero < y Nat.zero\nhn : 0 < Nat.succ Nat.zero\nhx : \u2200 (k : \u2115), k < Nat.succ Nat.zero \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ Nat.zero \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x Nat.zero \u2264 y Nat.zero\n[PROOFSTEP]\nexact h\u2080\n[GOAL]\ncase succ.succ\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nhn\u271d : 0 < n\u271d\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn :\n  0 < Nat.succ n \u2192\n    (\u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) < f (x k)) \u2192\n      (\u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x (Nat.succ n) < y (Nat.succ n)\nhn : 0 < Nat.succ (Nat.succ n)\nhx : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x (Nat.succ n) \u2264 y (Nat.succ n)\n[PROOFSTEP]\n\n| succ n =>\n  refine' (ihn n.zero_lt_succ (fun k hk => hx _ _) fun k hk => hy _ _).le <;> exact hk.trans n.succ.lt_succ_self\n[GOAL]\ncase succ.succ\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nhn\u271d : 0 < n\u271d\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn :\n  0 < Nat.succ n \u2192\n    (\u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) < f (x k)) \u2192\n      (\u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x (Nat.succ n) < y (Nat.succ n)\nhn : 0 < Nat.succ (Nat.succ n)\nhx : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x (Nat.succ n) \u2264 y (Nat.succ n)\n[PROOFSTEP]\nrefine' (ihn n.zero_lt_succ (fun k hk => hx _ _) fun k hk => hy _ _).le\n[GOAL]\ncase succ.succ.refine'_1\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nhn\u271d : 0 < n\u271d\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn :\n  0 < Nat.succ n \u2192\n    (\u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) < f (x k)) \u2192\n      (\u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x (Nat.succ n) < y (Nat.succ n)\nhn : 0 < Nat.succ (Nat.succ n)\nhx : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 f (y k) \u2264 y (k + 1)\nk : \u2115\nhk : k < Nat.succ n\n\u22a2 k < Nat.succ (Nat.succ n)\n[PROOFSTEP]\nexact hk.trans n.succ.lt_succ_self\n[GOAL]\ncase succ.succ.refine'_2\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn\u271d : \u2115\nhn\u271d : 0 < n\u271d\nh\u2080 : x 0 \u2264 y 0\nhx\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 x (k + 1) < f (x k)\nhy\u271d : \u2200 (k : \u2115), k < n\u271d \u2192 f (y k) \u2264 y (k + 1)\nn : \u2115\nihn :\n  0 < Nat.succ n \u2192\n    (\u2200 (k : \u2115), k < Nat.succ n \u2192 x (k + 1) < f (x k)) \u2192\n      (\u2200 (k : \u2115), k < Nat.succ n \u2192 f (y k) \u2264 y (k + 1)) \u2192 x (Nat.succ n) < y (Nat.succ n)\nhn : 0 < Nat.succ (Nat.succ n)\nhx : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ (Nat.succ n) \u2192 f (y k) \u2264 y (k + 1)\nk : \u2115\nhk : k < Nat.succ n\n\u22a2 k < Nat.succ (Nat.succ n)\n[PROOFSTEP]\nexact hk.trans n.succ.lt_succ_self\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nn : \u2115\nh\u2080 : x 0 < y 0\nhx : \u2200 (k : \u2115), k < n \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < n \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x n < y n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nh\u2080 : x 0 < y 0\nhx : \u2200 (k : \u2115), k < Nat.zero \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.zero \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x Nat.zero < y Nat.zero\ncase succ\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx y : \u2115 \u2192 \u03b1\nhf : Monotone f\nh\u2080 : x 0 < y 0\nn\u271d : \u2115\nhx : \u2200 (k : \u2115), k < Nat.succ n\u271d \u2192 x (k + 1) < f (x k)\nhy : \u2200 (k : \u2115), k < Nat.succ n\u271d \u2192 f (y k) \u2264 y (k + 1)\n\u22a2 x (Nat.succ n\u271d) < y (Nat.succ n\u271d)\n[PROOFSTEP]\nexacts [h\u2080, hf.seq_pos_lt_seq_of_lt_of_le (Nat.zero_lt_succ _) h\u2080.le hx hy]\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\n\u22a2 (h \u2218 g^[n]) x \u2264 (f^[n] \u2218 h) x\n[PROOFSTEP]\napply hf.seq_le_seq n\n[GOAL]\ncase h\u2080\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\n\u22a2 (h \u2218 g^[0]) x \u2264 (f^[0] \u2218 h) x\n[PROOFSTEP]\nintros\n[GOAL]\ncase hx\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\n\u22a2 \u2200 (k : \u2115), k < n \u2192 (h \u2218 g^[k + 1]) x \u2264 f ((h \u2218 g^[k]) x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase hy\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\n\u22a2 \u2200 (k : \u2115), k < n \u2192 f ((f^[k] \u2218 h) x) \u2264 (f^[k + 1] \u2218 h) x\n[PROOFSTEP]\nintros\n[GOAL]\ncase h\u2080\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\n\u22a2 (h \u2218 g^[0]) x \u2264 (f^[0] \u2218 h) x\n[PROOFSTEP]\nsimp [iterate_succ', -iterate_succ, comp_apply, id_eq, le_refl]\n[GOAL]\ncase hx\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\nk\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 (h \u2218 g^[k\u271d + 1]) x \u2264 f ((h \u2218 g^[k\u271d]) x)\n[PROOFSTEP]\nsimp [iterate_succ', -iterate_succ, comp_apply, id_eq, le_refl]\n[GOAL]\ncase hy\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\nk\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 f ((f^[k\u271d] \u2218 h) x) \u2264 (f^[k\u271d + 1] \u2218 h) x\n[PROOFSTEP]\nsimp [iterate_succ', -iterate_succ, comp_apply, id_eq, le_refl]\n[GOAL]\ncase hx\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\nk\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 h (g (g^[k\u271d] x)) \u2264 f (h (g^[k\u271d] x))\n[PROOFSTEP]\ncase hx => exact H _\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\nk\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 h (g (g^[k\u271d] x)) \u2264 f (h (g^[k\u271d] x))\n[PROOFSTEP]\ncase hx => exact H _\n[GOAL]\n\u03b1 : Type u_1\n\u03b2 : Type u_2\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx\u271d y : \u2115 \u2192 \u03b1\ng : \u03b2 \u2192 \u03b2\nh : \u03b2 \u2192 \u03b1\nhf : Monotone f\nH : h \u2218 g \u2264 f \u2218 h\nn : \u2115\nx : \u03b2\nk\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 h (g (g^[k\u271d] x)) \u2264 f (h (g^[k\u271d] x))\n[PROOFSTEP]\nexact H _\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nh : id \u2264 f\nn : \u2115\n\u22a2 id \u2264 f^[n]\n[PROOFSTEP]\nsimpa only [iterate_id] using monotone_id.iterate_le_of_le h n\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nh : id \u2264 f\nn : \u2115\nx : \u03b1\n\u22a2 f^[n] x \u2264 f^[n + 1] x\n[PROOFSTEP]\nrw [iterate_succ_apply']\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nh : id \u2264 f\nn : \u2115\nx : \u03b1\n\u22a2 f^[n] x \u2264 f (f^[n] x)\n[PROOFSTEP]\nexact h _\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : Monotone g\nx : \u03b1\nhx : f x \u2264 g x\nn : \u2115\n\u22a2 f^[n] x \u2264 g^[n] x\n[PROOFSTEP]\napply hf.seq_le_seq n\n[GOAL]\ncase h\u2080\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : Monotone g\nx : \u03b1\nhx : f x \u2264 g x\nn : \u2115\n\u22a2 f^[0] x \u2264 g^[0] x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hx\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : Monotone g\nx : \u03b1\nhx : f x \u2264 g x\nn : \u2115\n\u22a2 \u2200 (k : \u2115), k < n \u2192 f^[k + 1] x \u2264 f (f^[k] x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase hx\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : Monotone g\nx : \u03b1\nhx : f x \u2264 g x\nn k\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 f^[k\u271d + 1] x \u2264 f (f^[k\u271d] x)\n[PROOFSTEP]\nrw [iterate_succ_apply']\n[GOAL]\ncase hy\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : Monotone g\nx : \u03b1\nhx : f x \u2264 g x\nn : \u2115\n\u22a2 \u2200 (k : \u2115), k < n \u2192 f (g^[k] x) \u2264 g^[k + 1] x\n[PROOFSTEP]\nintros\n[GOAL]\ncase hy\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : Monotone g\nx : \u03b1\nhx : f x \u2264 g x\nn k\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 f (g^[k\u271d] x) \u2264 g^[k\u271d + 1] x\n[PROOFSTEP]\nsimp [h.iterate_right _ _, hg.iterate _ hx]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nhx : f x < g x\nn : \u2115\nhn : 0 < n\n\u22a2 f^[n] x < g^[n] x\n[PROOFSTEP]\napply hf.seq_pos_lt_seq_of_le_of_lt hn\n[GOAL]\ncase h\u2080\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nhx : f x < g x\nn : \u2115\nhn : 0 < n\n\u22a2 f^[0] x \u2264 g^[0] x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hx\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nhx : f x < g x\nn : \u2115\nhn : 0 < n\n\u22a2 \u2200 (k : \u2115), k < n \u2192 f^[k + 1] x \u2264 f (f^[k] x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase hx\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nhx : f x < g x\nn : \u2115\nhn : 0 < n\nk\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 f^[k\u271d + 1] x \u2264 f (f^[k\u271d] x)\n[PROOFSTEP]\nrw [iterate_succ_apply']\n[GOAL]\ncase hy\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nhx : f x < g x\nn : \u2115\nhn : 0 < n\n\u22a2 \u2200 (k : \u2115), k < n \u2192 f (g^[k] x) < g^[k + 1] x\n[PROOFSTEP]\nintros\n[GOAL]\ncase hy\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nhx : f x < g x\nn : \u2115\nhn : 0 < n\nk\u271d : \u2115\na\u271d : k\u271d < n\n\u22a2 f (g^[k\u271d] x) < g^[k\u271d + 1] x\n[PROOFSTEP]\nsimp [h.iterate_right _ _, hg.iterate _ hx]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nn : \u2115\nhn : 0 < n\n\u22a2 f^[n] x < g^[n] x \u2194 f x < g x\n[PROOFSTEP]\nrcases lt_trichotomy (f x) (g x) with (H | H | H)\n[GOAL]\ncase inl\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nn : \u2115\nhn : 0 < n\nH : f x < g x\n\u22a2 f^[n] x < g^[n] x \u2194 f x < g x\n[PROOFSTEP]\nsimp only [*, iterate_pos_lt_of_map_lt]\n[GOAL]\ncase inr.inl\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nn : \u2115\nhn : 0 < n\nH : f x = g x\n\u22a2 f^[n] x < g^[n] x \u2194 f x < g x\n[PROOFSTEP]\nsimp only [*, h.iterate_eq_of_map_eq, lt_irrefl]\n[GOAL]\ncase inr.inr\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nn : \u2115\nhn : 0 < n\nH : g x < f x\n\u22a2 f^[n] x < g^[n] x \u2194 f x < g x\n[PROOFSTEP]\nsimp only [lt_asymm H, lt_asymm (h.symm.iterate_pos_lt_of_map_lt' hg hf H hn)]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nn : \u2115\nhn : 0 < n\n\u22a2 f^[n] x \u2264 g^[n] x \u2194 f x \u2264 g x\n[PROOFSTEP]\nsimpa only [not_lt] using not_congr (h.symm.iterate_pos_lt_iff_map_lt' hg hf hn)\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : StrictMono f\nhg : Monotone g\nx : \u03b1\nn : \u2115\nhn : 0 < n\n\u22a2 f^[n] x \u2264 g^[n] x \u2194 f x \u2264 g x\n[PROOFSTEP]\nsimpa only [not_lt] using not_congr (h.symm.iterate_pos_lt_iff_map_lt hg hf hn)\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : LinearOrder \u03b1\nf g : \u03b1 \u2192 \u03b1\nh : Commute f g\nhf : Monotone f\nhg : StrictMono g\nx : \u03b1\nn : \u2115\nhn : 0 < n\n\u22a2 f^[n] x = g^[n] x \u2194 f x = g x\n[PROOFSTEP]\nsimp only [le_antisymm_iff, h.iterate_pos_le_iff_map_le hf hg hn, h.symm.iterate_pos_le_iff_map_le' hg hf hn]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx : \u03b1\nhf : Monotone f\nhx : x \u2264 f x\nn : \u2115\n\u22a2 f^[n] x \u2264 f^[n + 1] x\n[PROOFSTEP]\nrw [iterate_succ_apply]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx : \u03b1\nhf : Monotone f\nhx : x \u2264 f x\nn : \u2115\n\u22a2 f^[n] x \u2264 f^[n] (f x)\n[PROOFSTEP]\nexact hf.iterate n hx\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx : \u03b1\nhf : StrictMono f\nhx : x < f x\nn : \u2115\n\u22a2 f^[n] x < f^[n + 1] x\n[PROOFSTEP]\nrw [iterate_succ_apply]\n[GOAL]\n\u03b1 : Type u_1\ninst\u271d : Preorder \u03b1\nf : \u03b1 \u2192 \u03b1\nx : \u03b1\nhf : StrictMono f\nhx : x < f x\nn : \u2115\n\u22a2 f^[n] x < f^[n] (f x)\n[PROOFSTEP]\nexact hf.iterate n hx\n", "meta": {"mathlib_filename": "Mathlib.Order.Iterate", "llama_tokens": 10646, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8596637577007394, "lm_q2_score": 0.7634837581726991, "lm_q1q2_score": 0.6563393164942252}}
{"text": "[GOAL]\nn : \u2115\n\u22a2 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) < \u03c0\n[PROOFSTEP]\nhave : sqrt (2 - sqrtTwoAddSeries 0 n) / (2 : \u211d) * (2 : \u211d) ^ (n + 2) < \u03c0 :=\n  by\n  rw [\u2190 lt_div_iff, \u2190 sin_pi_over_two_pow_succ]; apply sin_lt; apply div_pos pi_pos\n  all_goals apply pow_pos; norm_num\n[GOAL]\nn : \u2115\n\u22a2 sqrt (2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < \u03c0\n[PROOFSTEP]\nrw [\u2190 lt_div_iff, \u2190 sin_pi_over_two_pow_succ]\n[GOAL]\nn : \u2115\n\u22a2 sin (\u03c0 / 2 ^ (n + 2)) < \u03c0 / 2 ^ (n + 2)\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply sin_lt\n[GOAL]\ncase h\nn : \u2115\n\u22a2 0 < \u03c0 / 2 ^ (n + 2)\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply div_pos pi_pos\n[GOAL]\ncase h\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nall_goals apply pow_pos; norm_num\n[GOAL]\ncase h\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase h.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\nthis : sqrt (2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < \u03c0\n\u22a2 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) < \u03c0\n[PROOFSTEP]\napply lt_of_le_of_lt (le_of_eq _) this\n[GOAL]\nn : \u2115\nthis : sqrt (2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < \u03c0\n\u22a2 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)\n[PROOFSTEP]\nrw [pow_succ _ (n + 1), \u2190 mul_assoc, div_mul_cancel, mul_comm]\n[GOAL]\ncase h\nn : \u2115\nthis : sqrt (2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < \u03c0\n\u22a2 2 \u2260 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\n\u22a2 \u03c0 < 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) + 1 / 4 ^ n\n[PROOFSTEP]\nhave : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / (2 : \u211d) + (1 : \u211d) / ((2 : \u211d) ^ n) ^ 3 / 4) * (2 : \u211d) ^ (n + 2) :=\n  by\n  rw [\u2190 div_lt_iff, \u2190 sin_pi_over_two_pow_succ]\n  refine' lt_of_lt_of_le (lt_add_of_sub_right_lt (sin_gt_sub_cube _ _)) _\n  \u00b7 apply div_pos pi_pos; apply pow_pos; norm_num\n  \u00b7 rw [div_le_iff']\n    \u00b7 refine' le_trans pi_le_four _\n      simp only [show (4 : \u211d) = (2 : \u211d) ^ 2 by norm_num, mul_one]\n      apply pow_le_pow; norm_num; apply le_add_of_nonneg_left; apply Nat.zero_le\n    \u00b7 apply pow_pos; norm_num\n  apply add_le_add_left; rw [div_le_div_right]\n  rw [le_div_iff, \u2190 mul_pow]\n  refine' le_trans _ (le_of_eq (one_pow 3)); apply pow_le_pow_of_le_left\n  \u00b7 apply le_of_lt; apply mul_pos; apply div_pos pi_pos; apply pow_pos; norm_num; apply pow_pos\n    norm_num\n  rw [\u2190 le_div_iff]\n  refine' le_trans ((div_le_div_right _).mpr pi_le_four) _; apply pow_pos; norm_num\n  rw [pow_succ, pow_succ, \u2190 mul_assoc, \u2190 div_div]\n    -- Porting note: removed `convert le_rfl`\n  all_goals (repeat' apply pow_pos); norm_num\n[GOAL]\nn : \u2115\n\u22a2 \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n[PROOFSTEP]\nrw [\u2190 div_lt_iff, \u2190 sin_pi_over_two_pow_succ]\n[GOAL]\nn : \u2115\n\u22a2 \u03c0 / 2 ^ (n + 2) < sin (\u03c0 / 2 ^ (n + 2)) + 1 / (2 ^ n) ^ 3 / 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (lt_add_of_sub_right_lt (sin_gt_sub_cube _ _)) _\n[GOAL]\ncase refine'_1\nn : \u2115\n\u22a2 0 < \u03c0 / 2 ^ (n + 2)\n[PROOFSTEP]\napply div_pos pi_pos\n[GOAL]\ncase refine'_1\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_1.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2\nn : \u2115\n\u22a2 \u03c0 / 2 ^ (n + 2) \u2264 1\n[PROOFSTEP]\nrw [div_le_iff']\n[GOAL]\ncase refine'_2\nn : \u2115\n\u22a2 \u03c0 \u2264 2 ^ (n + 2) * 1\n[PROOFSTEP]\nrefine' le_trans pi_le_four _\n[GOAL]\ncase refine'_2\nn : \u2115\n\u22a2 4 \u2264 2 ^ (n + 2) * 1\n[PROOFSTEP]\nsimp only [show (4 : \u211d) = (2 : \u211d) ^ 2 by norm_num, mul_one]\n[GOAL]\nn : \u2115\n\u22a2 4 = 2 ^ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2\nn : \u2115\n\u22a2 2 ^ 2 \u2264 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_le_pow\n[GOAL]\ncase refine'_2.ha\nn : \u2115\n\u22a2 1 \u2264 2\ncase refine'_2.h n : \u2115 \u22a2 2 \u2264 n + 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2.h\nn : \u2115\n\u22a2 2 \u2264 n + 2\n[PROOFSTEP]\napply le_add_of_nonneg_left\n[GOAL]\ncase refine'_2.h.h\nn : \u2115\n\u22a2 0 \u2264 n\n[PROOFSTEP]\napply Nat.zero_le\n[GOAL]\ncase refine'_2\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_2.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3\nn : \u2115\n\u22a2 sin (\u03c0 / 2 ^ (n + 2)) + (\u03c0 / 2 ^ (n + 2)) ^ 3 / 4 \u2264 sin (\u03c0 / 2 ^ (n + 2)) + 1 / (2 ^ n) ^ 3 / 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply add_le_add_left\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 (\u03c0 / 2 ^ (n + 2)) ^ 3 / 4 \u2264 1 / (2 ^ n) ^ 3 / 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrw [div_le_div_right]\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 (\u03c0 / 2 ^ (n + 2)) ^ 3 \u2264 1 / (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrw [le_div_iff, \u2190 mul_pow]\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 (\u03c0 / 2 ^ (n + 2) * 2 ^ n) ^ 3 \u2264 1\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrefine' le_trans _ (le_of_eq (one_pow 3))\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 (\u03c0 / 2 ^ (n + 2) * 2 ^ n) ^ 3 \u2264 1 ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_le_pow_of_le_left\n[GOAL]\ncase refine'_3.bc.ha\nn : \u2115\n\u22a2 0 \u2264 \u03c0 / 2 ^ (n + 2) * 2 ^ n\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase refine'_3.bc.ha.a\nn : \u2115\n\u22a2 0 < \u03c0 / 2 ^ (n + 2) * 2 ^ n\n[PROOFSTEP]\napply mul_pos\n[GOAL]\ncase refine'_3.bc.ha.a.ha\nn : \u2115\n\u22a2 0 < \u03c0 / 2 ^ (n + 2)\ncase refine'_3.bc.ha.a.hb n : \u2115 \u22a2 0 < 2 ^ n\n[PROOFSTEP]\napply div_pos pi_pos\n[GOAL]\ncase refine'_3.bc.ha.a.ha\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\ncase refine'_3.bc.ha.a.hb n : \u2115 \u22a2 0 < 2 ^ n\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.ha.a.ha.H\nn : \u2115\n\u22a2 0 < 2\ncase refine'_3.bc.ha.a.hb n : \u2115 \u22a2 0 < 2 ^ n\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3.bc.ha.a.hb\nn : \u2115\n\u22a2 0 < 2 ^ n\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.ha.a.hb.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 \u03c0 / 2 ^ (n + 2) * 2 ^ n \u2264 1\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrw [\u2190 le_div_iff]\n[GOAL]\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 \u03c0 / 2 ^ (n + 2) \u2264 1 / 2 ^ n\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 0 < 2 ^ n\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrefine' le_trans ((div_le_div_right _).mpr pi_le_four) _\n[GOAL]\ncase refine'_3.bc.hab.refine'_1\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\ncase refine'_3.bc.hab.refine'_2\nn : \u2115\n\u22a2 4 / 2 ^ (n + 2) \u2264 1 / 2 ^ n\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 0 < 2 ^ n\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.hab.refine'_1.H\nn : \u2115\n\u22a2 0 < 2\ncase refine'_3.bc.hab.refine'_2\nn : \u2115\n\u22a2 4 / 2 ^ (n + 2) \u2264 1 / 2 ^ n\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 0 < 2 ^ n\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3.bc.hab.refine'_2\nn : \u2115\n\u22a2 4 / 2 ^ (n + 2) \u2264 1 / 2 ^ n\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 0 < 2 ^ n\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrw [pow_succ, pow_succ, \u2190 mul_assoc, \u2190 div_div]\n  -- Porting note: removed `convert le_rfl`\n[GOAL]\ncase refine'_3.bc.hab.refine'_2\nn : \u2115\n\u22a2 4 / (2 * 2) / 2 ^ n \u2264 1 / 2 ^ n\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 0 < 2 ^ n\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\nn : \u2115 \u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nall_goals (repeat' apply pow_pos); norm_num\n[GOAL]\ncase refine'_3.bc.hab.refine'_2\nn : \u2115\n\u22a2 4 / (2 * 2) / 2 ^ n \u2264 1 / 2 ^ n\n[PROOFSTEP]\nrepeat' apply pow_pos\n[GOAL]\ncase refine'_3.bc.hab.refine'_2\nn : \u2115\n\u22a2 4 / (2 * 2) / 2 ^ n \u2264 1 / 2 ^ n\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.hab.refine'_2\nn : \u2115\n\u22a2 4 / (2 * 2) / 2 ^ n \u2264 1 / 2 ^ n\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 0 < 2 ^ n\n[PROOFSTEP]\nrepeat' apply pow_pos\n[GOAL]\ncase refine'_3.bc.hab\nn : \u2115\n\u22a2 0 < 2 ^ n\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.hab.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.hab.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\n[PROOFSTEP]\nrepeat' apply pow_pos\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < (2 ^ n) ^ 3\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.H\nn : \u2115\n\u22a2 0 < 2 ^ n\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.H.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc.H.H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\n[PROOFSTEP]\nrepeat' apply pow_pos\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase refine'_3.bc\nn : \u2115\n\u22a2 0 < 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\nrepeat' apply pow_pos\n[GOAL]\nn : \u2115\n\u22a2 0 < 2 ^ (n + 2)\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\napply pow_pos\n[GOAL]\ncase H\nn : \u2115\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 \u03c0 < 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) + 1 / 4 ^ n\n[PROOFSTEP]\napply lt_of_lt_of_le this (le_of_eq _)\n[GOAL]\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2) =\n    2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) + 1 / 4 ^ n\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 sqrt (2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) + 1 / (2 ^ n) ^ 3 / 4 * 2 ^ (n + 2) =\n    2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) + 1 / 4 ^ n\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 sqrt (2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) = 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n)\n[PROOFSTEP]\nrw [pow_succ _ (n + 1), \u2190 mul_assoc, div_mul_cancel, mul_comm]\n[GOAL]\ncase e_a.h\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 2 \u2260 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase e_a\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 1 / (2 ^ n) ^ 3 / 4 * 2 ^ (n + 2) = 1 / 4 ^ n\n[PROOFSTEP]\nrw [pow_succ, \u2190 pow_mul, mul_comm n 2, pow_mul, show (2 : \u211d) ^ 2 = 4 by norm_num, pow_succ, pow_succ, \u2190\n  mul_assoc (2 : \u211d), show (2 : \u211d) * 2 = 4 by norm_num, \u2190 mul_assoc, div_mul_cancel, mul_comm ((2 : \u211d) ^ n), \u2190 div_div,\n  div_mul_cancel]\n[GOAL]\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 2 ^ 2 = 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 2 * 2 = 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase e_a.h\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 2 ^ n \u2260 0\ncase e_a.h n : \u2115 this : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2) \u22a2 4 \u2260 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase e_a.h.h\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 2 \u2260 0\ncase e_a.h n : \u2115 this : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2) \u22a2 4 \u2260 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase e_a.h\nn : \u2115\nthis : \u03c0 < (sqrt (2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)\n\u22a2 4 \u2260 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\na : \u211d\nh : sqrtTwoAddSeries (\u21910 / \u21911) n \u2264 2 - (a / 2 ^ (n + 1)) ^ 2\n\u22a2 a < \u03c0\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ (pi_gt_sqrtTwoAddSeries n)\n[GOAL]\nn : \u2115\na : \u211d\nh : sqrtTwoAddSeries (\u21910 / \u21911) n \u2264 2 - (a / 2 ^ (n + 1)) ^ 2\n\u22a2 a \u2264 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nn : \u2115\na : \u211d\nh : sqrtTwoAddSeries (\u21910 / \u21911) n \u2264 2 - (a / 2 ^ (n + 1)) ^ 2\n\u22a2 a \u2264 sqrt (2 - sqrtTwoAddSeries 0 n) * 2 ^ (n + 1)\n[PROOFSTEP]\nrefine' (div_le_iff (pow_pos (by norm_num) _ : (0 : \u211d) < _)).mp (le_sqrt_of_sq_le _)\n[GOAL]\nn : \u2115\na : \u211d\nh : sqrtTwoAddSeries (\u21910 / \u21911) n \u2264 2 - (a / 2 ^ (n + 1)) ^ 2\n\u22a2 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : \u2115\na : \u211d\nh : sqrtTwoAddSeries (\u21910 / \u21911) n \u2264 2 - (a / 2 ^ (n + 1)) ^ 2\n\u22a2 (a / 2 ^ (n + 1)) ^ 2 \u2264 2 - sqrtTwoAddSeries 0 n\n[PROOFSTEP]\nrwa [le_sub_comm, show (0 : \u211d) = (0 : \u2115) / (1 : \u2115) by rw [Nat.cast_zero, zero_div]]\n[GOAL]\nn : \u2115\na : \u211d\nh : sqrtTwoAddSeries (\u21910 / \u21911) n \u2264 2 - (a / 2 ^ (n + 1)) ^ 2\n\u22a2 0 = \u21910 / \u21911\n[PROOFSTEP]\nrw [Nat.cast_zero, zero_div]\n[GOAL]\nc d a b n : \u2115\nz : \u211d\nhz : sqrtTwoAddSeries (\u2191c / \u2191d) n \u2264 z\nhb : 0 < b\nhd : 0 < d\nh : (2 * b + a) * d ^ 2 \u2264 c ^ 2 * b\n\u22a2 sqrtTwoAddSeries (\u2191a / \u2191b) (n + 1) \u2264 z\n[PROOFSTEP]\nrefine' le_trans _ hz\n[GOAL]\nc d a b n : \u2115\nz : \u211d\nhz : sqrtTwoAddSeries (\u2191c / \u2191d) n \u2264 z\nhb : 0 < b\nhd : 0 < d\nh : (2 * b + a) * d ^ 2 \u2264 c ^ 2 * b\n\u22a2 sqrtTwoAddSeries (\u2191a / \u2191b) (n + 1) \u2264 sqrtTwoAddSeries (\u2191c / \u2191d) n\n[PROOFSTEP]\nrw [sqrtTwoAddSeries_succ]\n[GOAL]\nc d a b n : \u2115\nz : \u211d\nhz : sqrtTwoAddSeries (\u2191c / \u2191d) n \u2264 z\nhb : 0 < b\nhd : 0 < d\nh : (2 * b + a) * d ^ 2 \u2264 c ^ 2 * b\n\u22a2 sqrtTwoAddSeries (sqrt (2 + \u2191a / \u2191b)) n \u2264 sqrtTwoAddSeries (\u2191c / \u2191d) n\n[PROOFSTEP]\napply sqrtTwoAddSeries_monotone_left\n[GOAL]\ncase h\nc d a b n : \u2115\nz : \u211d\nhz : sqrtTwoAddSeries (\u2191c / \u2191d) n \u2264 z\nhb : 0 < b\nhd : 0 < d\nh : (2 * b + a) * d ^ 2 \u2264 c ^ 2 * b\n\u22a2 sqrt (2 + \u2191a / \u2191b) \u2264 \u2191c / \u2191d\n[PROOFSTEP]\nhave hb' : 0 < (b : \u211d) := Nat.cast_pos.2 hb\n[GOAL]\ncase h\nc d a b n : \u2115\nz : \u211d\nhz : sqrtTwoAddSeries (\u2191c / \u2191d) n \u2264 z\nhb : 0 < b\nhd : 0 < d\nh : (2 * b + a) * d ^ 2 \u2264 c ^ 2 * b\nhb' : 0 < \u2191b\n\u22a2 sqrt (2 + \u2191a / \u2191b) \u2264 \u2191c / \u2191d\n[PROOFSTEP]\nhave hd' : 0 < (d : \u211d) := Nat.cast_pos.2 hd\n[GOAL]\ncase h\nc d a b n : \u2115\nz : \u211d\nhz : sqrtTwoAddSeries (\u2191c / \u2191d) n \u2264 z\nhb : 0 < b\nhd : 0 < d\nh : (2 * b + a) * d ^ 2 \u2264 c ^ 2 * b\nhb' : 0 < \u2191b\nhd' : 0 < \u2191d\n\u22a2 sqrt (2 + \u2191a / \u2191b) \u2264 \u2191c / \u2191d\n[PROOFSTEP]\nrw [sqrt_le_left (div_nonneg c.cast_nonneg d.cast_nonneg), div_pow, add_div_eq_mul_add_div _ _ (ne_of_gt hb'),\n  div_le_div_iff hb' (pow_pos hd' _)]\n[GOAL]\ncase h\nc d a b n : \u2115\nz : \u211d\nhz : sqrtTwoAddSeries (\u2191c / \u2191d) n \u2264 z\nhb : 0 < b\nhd : 0 < d\nh : (2 * b + a) * d ^ 2 \u2264 c ^ 2 * b\nhb' : 0 < \u2191b\nhd' : 0 < \u2191d\n\u22a2 (2 * \u2191b + \u2191a) * \u2191d ^ 2 \u2264 \u2191c ^ 2 * \u2191b\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nn : \u2115\na : \u211d\nh : 2 - ((a - 1 / 4 ^ n) / 2 ^ (n + 1)) ^ 2 \u2264 sqrtTwoAddSeries (\u21910 / \u21911) n\nh\u2082 : 1 / 4 ^ n \u2264 a\n\u22a2 \u03c0 < a\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (pi_lt_sqrtTwoAddSeries n) _\n[GOAL]\nn : \u2115\na : \u211d\nh : 2 - ((a - 1 / 4 ^ n) / 2 ^ (n + 1)) ^ 2 \u2264 sqrtTwoAddSeries (\u21910 / \u21911) n\nh\u2082 : 1 / 4 ^ n \u2264 a\n\u22a2 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n) + 1 / 4 ^ n \u2264 a\n[PROOFSTEP]\nrw [\u2190 le_sub_iff_add_le, \u2190 le_div_iff', sqrt_le_left, sub_le_comm]\n[GOAL]\nn : \u2115\na : \u211d\nh : 2 - ((a - 1 / 4 ^ n) / 2 ^ (n + 1)) ^ 2 \u2264 sqrtTwoAddSeries (\u21910 / \u21911) n\nh\u2082 : 1 / 4 ^ n \u2264 a\n\u22a2 2 - ((a - 1 / 4 ^ n) / 2 ^ (n + 1)) ^ 2 \u2264 sqrtTwoAddSeries 0 n\n[PROOFSTEP]\nrwa [Nat.cast_zero, zero_div] at h \n[GOAL]\nn : \u2115\na : \u211d\nh : 2 - ((a - 1 / 4 ^ n) / 2 ^ (n + 1)) ^ 2 \u2264 sqrtTwoAddSeries (\u21910 / \u21911) n\nh\u2082 : 1 / 4 ^ n \u2264 a\n\u22a2 0 \u2264 (a - 1 / 4 ^ n) / 2 ^ (n + 1)\n[PROOFSTEP]\nexact div_nonneg (sub_nonneg.2 h\u2082) (pow_nonneg (le_of_lt zero_lt_two) _)\n[GOAL]\nn : \u2115\na : \u211d\nh : 2 - ((a - 1 / 4 ^ n) / 2 ^ (n + 1)) ^ 2 \u2264 sqrtTwoAddSeries (\u21910 / \u21911) n\nh\u2082 : 1 / 4 ^ n \u2264 a\n\u22a2 0 < 2 ^ (n + 1)\n[PROOFSTEP]\nexact pow_pos zero_lt_two _\n[GOAL]\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\n\u22a2 z \u2264 sqrtTwoAddSeries (\u2191c / \u2191d) (n + 1)\n[PROOFSTEP]\napply le_trans hz\n[GOAL]\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\n\u22a2 sqrtTwoAddSeries (\u2191a / \u2191b) n \u2264 sqrtTwoAddSeries (\u2191c / \u2191d) (n + 1)\n[PROOFSTEP]\nrw [sqrtTwoAddSeries_succ]\n[GOAL]\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\n\u22a2 sqrtTwoAddSeries (\u2191a / \u2191b) n \u2264 sqrtTwoAddSeries (sqrt (2 + \u2191c / \u2191d)) n\n[PROOFSTEP]\napply sqrtTwoAddSeries_monotone_left\n[GOAL]\ncase h\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\n\u22a2 \u2191a / \u2191b \u2264 sqrt (2 + \u2191c / \u2191d)\n[PROOFSTEP]\napply le_sqrt_of_sq_le\n[GOAL]\ncase h.h\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\n\u22a2 (\u2191a / \u2191b) ^ 2 \u2264 2 + \u2191c / \u2191d\n[PROOFSTEP]\nhave hb' : 0 < (b : \u211d) := Nat.cast_pos.2 hb\n[GOAL]\ncase h.h\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\nhb' : 0 < \u2191b\n\u22a2 (\u2191a / \u2191b) ^ 2 \u2264 2 + \u2191c / \u2191d\n[PROOFSTEP]\nhave hd' : 0 < (d : \u211d) := Nat.cast_pos.2 hd\n[GOAL]\ncase h.h\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\nhb' : 0 < \u2191b\nhd' : 0 < \u2191d\n\u22a2 (\u2191a / \u2191b) ^ 2 \u2264 2 + \u2191c / \u2191d\n[PROOFSTEP]\nrw [div_pow, add_div_eq_mul_add_div _ _ (ne_of_gt hd'), div_le_div_iff (pow_pos hb' _) hd']\n[GOAL]\ncase h.h\na b c d n : \u2115\nz : \u211d\nhz : z \u2264 sqrtTwoAddSeries (\u2191a / \u2191b) n\nhb : 0 < b\nhd : 0 < d\nh : a ^ 2 * d \u2264 (2 * d + c) * b ^ 2\nhb' : 0 < \u2191b\nhd' : 0 < \u2191d\n\u22a2 \u2191a ^ 2 * \u2191d \u2264 (2 * \u2191d + \u2191c) * \u2191b ^ 2\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\n\u22a2 3 < \u03c0\n[PROOFSTEP]\npi_lower_bound [23 / 16]\n[GOAL]\n\u22a2 3.14 < \u03c0\n[PROOFSTEP]\npi_lower_bound [99 / 70, 874 / 473, 1940 / 989, 1447 / 727]\n[GOAL]\n\u22a2 \u03c0 < 3.15\n[PROOFSTEP]\npi_upper_bound [140 / 99, 279 / 151, 51 / 26, 412 / 207]\n[GOAL]\n\u22a2 3.1415 < \u03c0\n[PROOFSTEP]\npi_lower_bound [11482 / 8119, 5401 / 2923, 2348 / 1197, 11367 / 5711, 25705 / 12868, 23235 / 11621]\n[GOAL]\n\u22a2 \u03c0 < 3.1416\n[PROOFSTEP]\npi_upper_bound [4756 / 3363, 101211 / 54775, 505534 / 257719, 83289 / 41846, 411278 / 205887, 438142 / 219137,\n  451504 / 225769, 265603 / 132804, 849938 / 424971]\n[GOAL]\n\u22a2 3.141592 < \u03c0\n[PROOFSTEP]\npi_lower_bound [11482 / 8119, 7792 / 4217, 54055 / 27557, 949247 / 476920, 3310126 / 1657059, 2635492 / 1318143,\n  1580265 / 790192, 1221775 / 610899, 3612247 / 1806132, 849943 / 424972]\n[GOAL]\n\u22a2 \u03c0 < 3.141593\n[PROOFSTEP]\npi_upper_bound [27720 / 19601, 56935 / 30813, 49359 / 25163, 258754 / 130003, 113599 / 56868, 1101994 / 551163,\n  8671537 / 4336095, 3877807 / 1938940, 52483813 / 26242030, 56946167 / 28473117, 23798415 / 11899211]\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.Pi.Bounds", "llama_tokens": 10773, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8757869916479466, "lm_q2_score": 0.7490872131147275, "lm_q1q2_score": 0.6560408368556915}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : AddCommGroup N\ninst\u271d\u00b9 : Module R N\ninst\u271d : IsReflexive R M\ne : N \u2243\u2097[R] Dual R M\n\u22a2 \u2191(trans e (dualMap (symm (flip e)))) = Dual.eval R N\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : AddCommGroup N\ninst\u271d\u00b9 : Module R N\ninst\u271d : IsReflexive R M\ne : N \u2243\u2097[R] Dual R M\nx\u271d\u00b9 : N\nx\u271d : Dual R N\n\u22a2 \u2191(\u2191\u2191(trans e (dualMap (symm (flip e)))) x\u271d\u00b9) x\u271d = \u2191(\u2191(Dual.eval R N) x\u271d\u00b9) x\u271d\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : AddCommGroup N\ninst\u271d\u00b9 : Module R N\ninst\u271d : IsReflexive R M\ne : N \u2243\u2097[R] Dual R M\n\u22a2 IsReflexive R N\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase bijective_dual_eval'\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : AddCommGroup N\ninst\u271d\u00b9 : Module R N\ninst\u271d : IsReflexive R M\ne : N \u2243\u2097[R] Dual R M\n\u22a2 Function.Bijective \u2191(Dual.eval R N)\n[PROOFSTEP]\nrw [\u2190 trans_dualMap_symm_flip e]\n[GOAL]\ncase bijective_dual_eval'\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : AddCommGroup N\ninst\u271d\u00b9 : Module R N\ninst\u271d : IsReflexive R M\ne : N \u2243\u2097[R] Dual R M\n\u22a2 Function.Bijective \u2191\u2191(trans e (dualMap (symm (flip e))))\n[PROOFSTEP]\nexact LinearEquiv.bijective _\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : AddCommGroup N\ninst\u271d\u00b9 : Module R N\ninst\u271d : IsReflexive R M\ne : N \u2243\u2097[R] Dual R M\nh : optParam (IsReflexive R N) (_ : IsReflexive R N)\n\u22a2 flip (flip e) = e\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst\u271d\u2075 : CommRing R\ninst\u271d\u2074 : AddCommGroup M\ninst\u271d\u00b3 : Module R M\ninst\u271d\u00b2 : AddCommGroup N\ninst\u271d\u00b9 : Module R N\ninst\u271d : IsReflexive R M\ne : N \u2243\u2097[R] Dual R M\nh : optParam (IsReflexive R N) (_ : IsReflexive R N)\nx\u271d\u00b9 : N\nx\u271d : M\n\u22a2 \u2191(\u2191(flip (flip e)) x\u271d\u00b9) x\u271d = \u2191(\u2191e x\u271d\u00b9) x\u271d\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.PerfectPairing", "llama_tokens": 1109, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424373085146, "lm_q2_score": 0.7745833737577158, "lm_q1q2_score": 0.6552529470952543}}
{"text": "[GOAL]\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 HEq (evenOddRec h0 h_even h_odd (bit false n)) (h_even n (evenOddRec h0 h_even h_odd n))\n[PROOFSTEP]\nrw [evenOddRec, binaryRec_eq]\n[GOAL]\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 HEq\n    (match false, n,\n      binaryRec h0\n        (fun x x_1 x_2 =>\n          match x, x_1, x_2 with\n          | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n          | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi)\n        n with\n    | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n    | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi)\n    (h_even n (evenOddRec h0 h_even h_odd n))\ncase h\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 (match false, 0, h0 with\n    | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n    | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi) =\n    h0\n[PROOFSTEP]\napply eq_rec_heq\n[GOAL]\ncase h\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 (match false, 0, h0 with\n    | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n    | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi) =\n    h0\n[PROOFSTEP]\nexact H\n[GOAL]\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 HEq (evenOddRec h0 h_even h_odd (bit true n)) (h_odd n (evenOddRec h0 h_even h_odd n))\n[PROOFSTEP]\nrw [evenOddRec, binaryRec_eq]\n[GOAL]\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 HEq\n    (match true, n,\n      binaryRec h0\n        (fun x x_1 x_2 =>\n          match x, x_1, x_2 with\n          | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n          | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi)\n        n with\n    | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n    | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi)\n    (h_odd n (evenOddRec h0 h_even h_odd n))\ncase h\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 (match false, 0, h0 with\n    | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n    | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi) =\n    h0\n[PROOFSTEP]\napply eq_rec_heq\n[GOAL]\ncase h\nn : \u2115\nP : \u2115 \u2192 Sort u_1\nh0 : P 0\nh_even : (i : \u2115) \u2192 P i \u2192 P (2 * i)\nh_odd : (i : \u2115) \u2192 P i \u2192 P (2 * i + 1)\nH : h_even 0 h0 = h0\n\u22a2 (match false, 0, h0 with\n    | false, i, hi => (_ : 2 * i = bit0 i) \u25b8 h_even i hi\n    | true, i, hi => (_ : 2 * i + 1 = bit1 i) \u25b8 h_odd i hi) =\n    h0\n[PROOFSTEP]\nexact H\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.EvenOddRec", "llama_tokens": 1528, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8887587934924569, "lm_q2_score": 0.7371581684030623, "lm_q1q2_score": 0.655155804363015}}
{"text": "[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\n\u22a2 (x + y) ^ n = \u2211 m in range (n + 1), x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\n[PROOFSTEP]\nlet t : \u2115 \u2192 \u2115 \u2192 R := fun n m \u21a6 x ^ m * y ^ (n - m) * choose n m\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\n\u22a2 (x + y) ^ n = \u2211 m in range (n + 1), x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\n[PROOFSTEP]\nchange (x + y) ^ n = \u2211 m in range (n + 1), t n m\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\n\u22a2 (x + y) ^ n = \u2211 m in range (n + 1), t n m\n[PROOFSTEP]\nhave h_first : \u2200 n, t n 0 = y ^ n := fun n \u21a6 by\n  simp only [choose_zero_right, _root_.pow_zero, Nat.cast_one, mul_one, one_mul, tsub_zero]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nn : \u2115\n\u22a2 t n 0 = y ^ n\n[PROOFSTEP]\nsimp only [choose_zero_right, _root_.pow_zero, Nat.cast_one, mul_one, one_mul, tsub_zero]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\n\u22a2 (x + y) ^ n = \u2211 m in range (n + 1), t n m\n[PROOFSTEP]\nhave h_last : \u2200 n, t n n.succ = 0 := fun n \u21a6 by simp only [ge_iff_le, choose_succ_self, cast_zero, mul_zero]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nn : \u2115\n\u22a2 t n (succ n) = 0\n[PROOFSTEP]\nsimp only [ge_iff_le, choose_succ_self, cast_zero, mul_zero]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\n\u22a2 (x + y) ^ n = \u2211 m in range (n + 1), t n m\n[PROOFSTEP]\nhave h_middle : \u2200 n i : \u2115, i \u2208 range n.succ \u2192 (t n.succ \u2218 Nat.succ) i = x * t n i + y * t n i.succ :=\n  by\n  intro n i h_mem\n  have h_le : i \u2264 n := Nat.le_of_lt_succ (mem_range.mp h_mem)\n  dsimp only\n  rw [Function.comp_apply, choose_succ_succ, Nat.cast_add, mul_add]\n  congr 1\n  \u00b7 rw [pow_succ x, succ_sub_succ, mul_assoc, mul_assoc, mul_assoc]\n  \u00b7 rw [\u2190 mul_assoc y, \u2190 mul_assoc y, (h.symm.pow_right i.succ).eq]\n    by_cases h_eq : i = n\n    \u00b7 rw [h_eq, choose_succ_self, Nat.cast_zero, mul_zero, mul_zero]\n    \u00b7 rw [succ_sub (lt_of_le_of_ne h_le h_eq)]\n      rw [pow_succ y, mul_assoc, mul_assoc, mul_assoc, mul_assoc]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\n\u22a2 \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\n[PROOFSTEP]\nintro n i h_mem\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\n\u22a2 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\n[PROOFSTEP]\nhave h_le : i \u2264 n := Nat.le_of_lt_succ (mem_range.mp h_mem)\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\n\u22a2 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\n\u22a2 ((fun m => x ^ m * y ^ (succ n - m) * \u2191(Nat.choose (succ n) m)) \u2218 succ) i =\n    x * (x ^ i * y ^ (n - i) * \u2191(Nat.choose n i)) + y * (x ^ succ i * y ^ (n - succ i) * \u2191(Nat.choose n (succ i)))\n[PROOFSTEP]\nrw [Function.comp_apply, choose_succ_succ, Nat.cast_add, mul_add]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\n\u22a2 x ^ succ i * y ^ (succ n - succ i) * \u2191(Nat.choose n i) +\n      x ^ succ i * y ^ (succ n - succ i) * \u2191(Nat.choose n (succ i)) =\n    x * (x ^ i * y ^ (n - i) * \u2191(Nat.choose n i)) + y * (x ^ succ i * y ^ (n - succ i) * \u2191(Nat.choose n (succ i)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\n\u22a2 x ^ succ i * y ^ (succ n - succ i) * \u2191(Nat.choose n i) = x * (x ^ i * y ^ (n - i) * \u2191(Nat.choose n i))\n[PROOFSTEP]\nrw [pow_succ x, succ_sub_succ, mul_assoc, mul_assoc, mul_assoc]\n[GOAL]\ncase e_a\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\n\u22a2 x ^ succ i * y ^ (succ n - succ i) * \u2191(Nat.choose n (succ i)) =\n    y * (x ^ succ i * y ^ (n - succ i) * \u2191(Nat.choose n (succ i)))\n[PROOFSTEP]\nrw [\u2190 mul_assoc y, \u2190 mul_assoc y, (h.symm.pow_right i.succ).eq]\n[GOAL]\ncase e_a\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\n\u22a2 x ^ succ i * y ^ (succ n - succ i) * \u2191(Nat.choose n (succ i)) =\n    x ^ succ i * y * y ^ (n - succ i) * \u2191(Nat.choose n (succ i))\n[PROOFSTEP]\nby_cases h_eq : i = n\n[GOAL]\ncase pos\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\nh_eq : i = n\n\u22a2 x ^ succ i * y ^ (succ n - succ i) * \u2191(Nat.choose n (succ i)) =\n    x ^ succ i * y * y ^ (n - succ i) * \u2191(Nat.choose n (succ i))\n[PROOFSTEP]\nrw [h_eq, choose_succ_self, Nat.cast_zero, mul_zero, mul_zero]\n[GOAL]\ncase neg\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\nh_eq : \u00aci = n\n\u22a2 x ^ succ i * y ^ (succ n - succ i) * \u2191(Nat.choose n (succ i)) =\n    x ^ succ i * y * y ^ (n - succ i) * \u2191(Nat.choose n (succ i))\n[PROOFSTEP]\nrw [succ_sub (lt_of_le_of_ne h_le h_eq)]\n[GOAL]\ncase neg\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn\u271d : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nn i : \u2115\nh_mem : i \u2208 range (succ n)\nh_le : i \u2264 n\nh_eq : \u00aci = n\n\u22a2 x ^ succ i * y ^ succ (n - succ i) * \u2191(Nat.choose n (succ i)) =\n    x ^ succ i * y * y ^ (n - succ i) * \u2191(Nat.choose n (succ i))\n[PROOFSTEP]\nrw [pow_succ y, mul_assoc, mul_assoc, mul_assoc, mul_assoc]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\n\u22a2 (x + y) ^ n = \u2211 m in range (n + 1), t n m\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\n\u22a2 (x + y) ^ zero = \u2211 m in range (zero + 1), t zero m\n[PROOFSTEP]\nrw [_root_.pow_zero, sum_range_succ, range_zero, sum_empty, zero_add]\n[GOAL]\ncase zero\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\n\u22a2 1 = t zero zero\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase zero\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\n\u22a2 1 = x ^ zero * y ^ (zero - zero) * \u2191(Nat.choose zero zero)\n[PROOFSTEP]\nrw [_root_.pow_zero, _root_.pow_zero, choose_self, Nat.cast_one, mul_one, mul_one]\n[GOAL]\ncase succ\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\nn : \u2115\nih : (x + y) ^ n = \u2211 m in range (n + 1), t n m\n\u22a2 (x + y) ^ succ n = \u2211 m in range (succ n + 1), t (succ n) m\n[PROOFSTEP]\nrw [sum_range_succ', h_first]\n[GOAL]\ncase succ\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\nn : \u2115\nih : (x + y) ^ n = \u2211 m in range (n + 1), t n m\n\u22a2 (x + y) ^ succ n = \u2211 k in range (n + 1), t (succ n) (k + 1) + y ^ succ n\n[PROOFSTEP]\nerw [sum_congr rfl (h_middle n), sum_add_distrib, add_assoc]\n[GOAL]\ncase succ\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\nn : \u2115\nih : (x + y) ^ n = \u2211 m in range (n + 1), t n m\n\u22a2 (x + y) ^ succ n = \u2211 x_1 in range (succ n), x * t n x_1 + (\u2211 x in range (succ n), y * t n (succ x) + y ^ succ n)\n[PROOFSTEP]\nrw [pow_succ (x + y), ih, add_mul, mul_sum, mul_sum]\n[GOAL]\ncase succ\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\nn : \u2115\nih : (x + y) ^ n = \u2211 m in range (n + 1), t n m\n\u22a2 \u2211 x_1 in range (n + 1), x * t n x_1 + \u2211 x in range (n + 1), y * t n x =\n    \u2211 x_1 in range (succ n), x * t n x_1 + (\u2211 x in range (succ n), y * t n (succ x) + y ^ succ n)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase succ.e_a\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nt : \u2115 \u2192 \u2115 \u2192 R := fun n m => x ^ m * y ^ (n - m) * \u2191(Nat.choose n m)\nh_first : \u2200 (n : \u2115), t n 0 = y ^ n\nh_last : \u2200 (n : \u2115), t n (succ n) = 0\nh_middle : \u2200 (n i : \u2115), i \u2208 range (succ n) \u2192 (t (succ n) \u2218 succ) i = x * t n i + y * t n (succ i)\nn : \u2115\nih : (x + y) ^ n = \u2211 m in range (n + 1), t n m\n\u22a2 \u2211 x in range (n + 1), y * t n x = \u2211 x in range (succ n), y * t n (succ x) + y ^ succ n\n[PROOFSTEP]\nrw [sum_range_succ', sum_range_succ, h_first, h_last, mul_zero, add_zero, _root_.pow_succ]\n[GOAL]\nR : Type u_1\ninst\u271d : Semiring R\nx y : R\nh : Commute x y\nn : \u2115\n\u22a2 (x + y) ^ n = \u2211 m in Nat.antidiagonal n, Nat.choose n m.fst \u2022 (x ^ m.fst * y ^ m.snd)\n[PROOFSTEP]\nsimp_rw [Finset.Nat.sum_antidiagonal_eq_sum_range_succ fun m p \u21a6 choose n m \u2022 (x ^ m * y ^ p), _root_.nsmul_eq_mul,\n  cast_comm, h.add_pow]\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 \u2211 m in range (n + 1), choose n m = 2 ^ n\n[PROOFSTEP]\nhave := (add_pow 1 1 n).symm\n[GOAL]\nR : Type u_1\nn : \u2115\nthis : \u2211 m in range (n + 1), 1 ^ m * 1 ^ (n - m) * \u2191(choose n m) = (1 + 1) ^ n\n\u22a2 \u2211 m in range (n + 1), choose n m = 2 ^ n\n[PROOFSTEP]\nsimpa [one_add_one_eq_two] using this\n[GOAL]\nR : Type u_1\nm i : \u2115\nhi : i \u2208 range (m + 1)\n\u22a2 i \u2264 2 * m + 1\n[PROOFSTEP]\nlinarith [mem_range.1 hi]\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 2 * \u2211 i in range (m + 1), choose (2 * m + 1) i =\n    \u2211 i in range (m + 1), choose (2 * m + 1) i + \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i)\n[PROOFSTEP]\nrw [two_mul, this]\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 \u2211 i in range (m + 1), choose (2 * m + 1) i + \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) =\n    \u2211 i in range (m + 1), choose (2 * m + 1) i + \u2211 i in Ico (m + 1) (2 * m + 2), choose (2 * m + 1) i\n[PROOFSTEP]\n{ rw [range_eq_Ico, sum_Ico_reflect]\n  \u00b7 congr\n    have A : m + 1 \u2264 2 * m + 1 := by linarith\n    rw [add_comm, add_tsub_assoc_of_le A, \u2190 add_comm]\n    congr\n    rw [tsub_eq_iff_eq_add_of_le A]\n    ring\n  \u00b7 linarith\n}\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 \u2211 i in range (m + 1), choose (2 * m + 1) i + \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) =\n    \u2211 i in range (m + 1), choose (2 * m + 1) i + \u2211 i in Ico (m + 1) (2 * m + 2), choose (2 * m + 1) i\n[PROOFSTEP]\nrw [range_eq_Ico, sum_Ico_reflect]\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 \u2211 i in Ico 0 (m + 1), choose (2 * m + 1) i +\n      \u2211 j in Ico (2 * m + 1 + 1 - (m + 1)) (2 * m + 1 + 1 - 0), choose (2 * m + 1) j =\n    \u2211 i in Ico 0 (m + 1), choose (2 * m + 1) i + \u2211 i in Ico (m + 1) (2 * m + 2), choose (2 * m + 1) i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_s.e_a\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 2 * m + 1 + 1 - (m + 1) = m + 1\n[PROOFSTEP]\nhave A : m + 1 \u2264 2 * m + 1 := by linarith\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 m + 1 \u2264 2 * m + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase e_a.e_s.e_a\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\nA : m + 1 \u2264 2 * m + 1\n\u22a2 2 * m + 1 + 1 - (m + 1) = m + 1\n[PROOFSTEP]\nrw [add_comm, add_tsub_assoc_of_le A, \u2190 add_comm]\n[GOAL]\ncase e_a.e_s.e_a\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\nA : m + 1 \u2264 2 * m + 1\n\u22a2 2 * m + 1 - (m + 1) + 1 = m + 1\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_s.e_a.e_a\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\nA : m + 1 \u2264 2 * m + 1\n\u22a2 2 * m + 1 - (m + 1) = m\n[PROOFSTEP]\nrw [tsub_eq_iff_eq_add_of_le A]\n[GOAL]\ncase e_a.e_s.e_a.e_a\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\nA : m + 1 \u2264 2 * m + 1\n\u22a2 2 * m + 1 = m + (m + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase h\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 m + 1 \u2264 2 * m + 1 + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 m + 1 \u2264 2 * m + 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 2 ^ (2 * m + 1) = 2 * 4 ^ m\n[PROOFSTEP]\nrw [pow_succ, pow_mul, mul_comm]\n[GOAL]\nR : Type u_1\nm : \u2115\nthis : \u2211 i in range (m + 1), choose (2 * m + 1) (2 * m + 1 - i) = \u2211 i in range (m + 1), choose (2 * m + 1) i\n\u22a2 2 * (2 ^ 2) ^ m = 2 * 4 ^ m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 choose (2 * n + 1) n \u2264 4 ^ n\n[PROOFSTEP]\nhave t : choose (2 * n + 1) n \u2264 \u2211 i in range (n + 1), choose (2 * n + 1) i :=\n  single_le_sum (fun x _ \u21a6 by linarith) (self_mem_range_succ n)\n[GOAL]\nR : Type u_1\nn x : \u2115\nx\u271d : x \u2208 range (n + 1)\n\u22a2 0 \u2264 choose (2 * n + 1) x\n[PROOFSTEP]\nlinarith\n[GOAL]\nR : Type u_1\nn : \u2115\nt : choose (2 * n + 1) n \u2264 \u2211 i in range (n + 1), choose (2 * n + 1) i\n\u22a2 choose (2 * n + 1) n \u2264 4 ^ n\n[PROOFSTEP]\nsimpa [sum_range_choose_halfway n] using t\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 4 ^ n = (1 + 1) ^ (2 * n)\n[PROOFSTEP]\nsimp only [pow_mul, one_add_one_eq_two]\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 4 ^ n = (2 ^ 2) ^ n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 (1 + 1) ^ (2 * n) = \u2211 m in range (2 * n + 1), choose (2 * n) m\n[PROOFSTEP]\nsimp [add_pow]\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 \u2211 m in range (2 * n + 1), choose (2 * n) m \u2264 \u2211 m in range (2 * n + 1), choose (2 * n) (2 * n / 2)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nR : Type u_1\nn i\u271d : \u2115\na\u271d : i\u271d \u2208 range (2 * n + 1)\n\u22a2 choose (2 * n) i\u271d \u2264 choose (2 * n) (2 * n / 2)\n[PROOFSTEP]\napply choose_le_middle\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 \u2211 m in range (2 * n + 1), choose (2 * n) (2 * n / 2) = (2 * n + 1) * choose (2 * n) n\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 \u2211 m in range (n + 1), (-1) ^ m * \u2191(Nat.choose n m) = if n = 0 then 1 else 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nR : Type u_1\n\u22a2 \u2211 m in range (zero + 1), (-1) ^ m * \u2191(Nat.choose zero m) = if zero = 0 then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u_1\nn\u271d : \u2115\n\u22a2 \u2211 m in range (Nat.succ n\u271d + 1), (-1) ^ m * \u2191(Nat.choose (Nat.succ n\u271d) m) = if Nat.succ n\u271d = 0 then 1 else 0\n[PROOFSTEP]\ncase succ n =>\n  have h := add_pow (-1 : \u2124) 1 n.succ\n  simp only [one_pow, mul_one, add_left_neg] at h \n  rw [\u2190 h, zero_pow (Nat.succ_pos n), if_neg (Nat.succ_ne_zero n)]\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 \u2211 m in range (Nat.succ n + 1), (-1) ^ m * \u2191(Nat.choose (Nat.succ n) m) = if Nat.succ n = 0 then 1 else 0\n[PROOFSTEP]\ncase succ n =>\n  have h := add_pow (-1 : \u2124) 1 n.succ\n  simp only [one_pow, mul_one, add_left_neg] at h \n  rw [\u2190 h, zero_pow (Nat.succ_pos n), if_neg (Nat.succ_ne_zero n)]\n[GOAL]\nR : Type u_1\nn : \u2115\n\u22a2 \u2211 m in range (Nat.succ n + 1), (-1) ^ m * \u2191(Nat.choose (Nat.succ n) m) = if Nat.succ n = 0 then 1 else 0\n[PROOFSTEP]\nhave h := add_pow (-1 : \u2124) 1 n.succ\n[GOAL]\nR : Type u_1\nn : \u2115\nh :\n  (-1 + 1) ^ Nat.succ n = \u2211 m in range (Nat.succ n + 1), (-1) ^ m * 1 ^ (Nat.succ n - m) * \u2191(Nat.choose (Nat.succ n) m)\n\u22a2 \u2211 m in range (Nat.succ n + 1), (-1) ^ m * \u2191(Nat.choose (Nat.succ n) m) = if Nat.succ n = 0 then 1 else 0\n[PROOFSTEP]\nsimp only [one_pow, mul_one, add_left_neg] at h \n[GOAL]\nR : Type u_1\nn : \u2115\nh : 0 ^ Nat.succ n = \u2211 x in range (Nat.succ n + 1), (-1) ^ x * \u2191(Nat.choose (Nat.succ n) x)\n\u22a2 \u2211 m in range (Nat.succ n + 1), (-1) ^ m * \u2191(Nat.choose (Nat.succ n) m) = if Nat.succ n = 0 then 1 else 0\n[PROOFSTEP]\nrw [\u2190 h, zero_pow (Nat.succ_pos n), if_neg (Nat.succ_ne_zero n)]\n[GOAL]\nR : Type u_1\nn : \u2115\nh0 : n \u2260 0\n\u22a2 \u2211 m in range (n + 1), (-1) ^ m * \u2191(Nat.choose n m) = 0\n[PROOFSTEP]\nrw [Int.alternating_sum_range_choose, if_neg h0]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx : Finset \u03b2\n\u22a2 \u2211 m in powerset x, f (card m) = \u2211 m in range (card x + 1), Nat.choose (card x) m \u2022 f m\n[PROOFSTEP]\ntrans \u2211 m in range (x.card + 1), \u2211 j in x.powerset.filter fun z \u21a6 z.card = m, f j.card\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx : Finset \u03b2\n\u22a2 \u2211 m in powerset x, f (card m) =\n    \u2211 m in range (card x + 1), \u2211 j in filter (fun z => card z = m) (powerset x), f (card j)\n[PROOFSTEP]\nrefine' (sum_fiberwise_of_maps_to _ _).symm\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx : Finset \u03b2\n\u22a2 \u2200 (x_1 : Finset \u03b2), x_1 \u2208 powerset x \u2192 card x_1 \u2208 range (card x + 1)\n[PROOFSTEP]\nintro y hy\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx y : Finset \u03b2\nhy : y \u2208 powerset x\n\u22a2 card y \u2208 range (card x + 1)\n[PROOFSTEP]\nrw [mem_range, Nat.lt_succ_iff]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx y : Finset \u03b2\nhy : y \u2208 powerset x\n\u22a2 card y \u2264 card x\n[PROOFSTEP]\nrw [mem_powerset] at hy \n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx y : Finset \u03b2\nhy : y \u2286 x\n\u22a2 card y \u2264 card x\n[PROOFSTEP]\nexact card_le_of_subset hy\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx : Finset \u03b2\n\u22a2 \u2211 m in range (card x + 1), \u2211 j in filter (fun z => card z = m) (powerset x), f (card j) =\n    \u2211 m in range (card x + 1), Nat.choose (card x) m \u2022 f m\n[PROOFSTEP]\nrefine' sum_congr rfl fun y _ \u21a6 _\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx : Finset \u03b2\ny : \u2115\nx\u271d : y \u2208 range (card x + 1)\n\u22a2 \u2211 j in filter (fun z => card z = y) (powerset x), f (card j) = Nat.choose (card x) y \u2022 f y\n[PROOFSTEP]\nrw [\u2190 card_powersetLen, \u2190 sum_const]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx : Finset \u03b2\ny : \u2115\nx\u271d : y \u2208 range (card x + 1)\n\u22a2 \u2211 j in filter (fun z => card z = y) (powerset x), f (card j) = \u2211 _x in powersetLen y x, f y\n[PROOFSTEP]\nrefine' sum_congr powersetLen_eq_filter.symm fun z hz \u21a6 _\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\n\u03b2 : Type u_3\ninst\u271d : AddCommMonoid \u03b1\nf : \u2115 \u2192 \u03b1\nx : Finset \u03b2\ny : \u2115\nx\u271d : y \u2208 range (card x + 1)\nz : Finset \u03b2\nhz : z \u2208 powersetLen y x\n\u22a2 f (card z) = f y\n[PROOFSTEP]\nrw [(mem_powersetLen.1 hz).2]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\ninst\u271d : DecidableEq \u03b1\nx : Finset \u03b1\n\u22a2 \u2211 m in powerset x, (-1) ^ card m = if x = \u2205 then 1 else 0\n[PROOFSTEP]\nrw [sum_powerset_apply_card]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\ninst\u271d : DecidableEq \u03b1\nx : Finset \u03b1\n\u22a2 \u2211 m in range (card x + 1), Nat.choose (card x) m \u2022 (-1) ^ m = if x = \u2205 then 1 else 0\n[PROOFSTEP]\nsimp only [nsmul_eq_mul', \u2190 card_eq_zero, Int.alternating_sum_range_choose]\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\nx : Finset \u03b1\nh0 : Finset.Nonempty x\n\u22a2 \u2211 m in powerset x, (-1) ^ card m = 0\n[PROOFSTEP]\nclassical\nrw [sum_powerset_neg_one_pow_card, if_neg]\nrw [\u2190 Ne.def, \u2190 nonempty_iff_ne_empty]\napply h0\n[GOAL]\nR : Type u_1\n\u03b1 : Type u_2\nx : Finset \u03b1\nh0 : Finset.Nonempty x\n\u22a2 \u2211 m in powerset x, (-1) ^ card m = 0\n[PROOFSTEP]\nrw [sum_powerset_neg_one_pow_card, if_neg]\n[GOAL]\ncase hnc\nR : Type u_1\n\u03b1 : Type u_2\nx : Finset \u03b1\nh0 : Finset.Nonempty x\n\u22a2 \u00acx = \u2205\n[PROOFSTEP]\nrw [\u2190 Ne.def, \u2190 nonempty_iff_ne_empty]\n[GOAL]\ncase hnc\nR : Type u_1\n\u03b1 : Type u_2\nx : Finset \u03b1\nh0 : Finset.Nonempty x\n\u22a2 Finset.Nonempty x\n[PROOFSTEP]\napply h0\n[GOAL]\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\n\u22a2 \u220f i in range (n + 2), f i (n + 1 - i) ^ Nat.choose (n + 1) i =\n    (\u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i) * \u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i\n[PROOFSTEP]\nhave A :\n  (\u220f i in range (n + 1), f (i + 1) (n - i) ^ (n.choose (i + 1))) * f 0 (n + 1) =\n    \u220f i in range (n + 1), f i (n + 1 - i) ^ (n.choose i)\n[GOAL]\ncase A\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\n\u22a2 (\u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n (i + 1)) * f 0 (n + 1) =\n    \u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i\n[PROOFSTEP]\nrw [prod_range_succ, prod_range_succ']\n[GOAL]\ncase A\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\n\u22a2 (\u220f x in range n, f (x + 1) (n - x) ^ Nat.choose n (x + 1)) * f (n + 1) (n - n) ^ Nat.choose n (n + 1) * f 0 (n + 1) =\n    (\u220f k in range n, f (k + 1) (n + 1 - (k + 1)) ^ Nat.choose n (k + 1)) * f 0 (n + 1 - 0) ^ Nat.choose n 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\nA :\n  (\u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n (i + 1)) * f 0 (n + 1) =\n    \u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i\n\u22a2 \u220f i in range (n + 2), f i (n + 1 - i) ^ Nat.choose (n + 1) i =\n    (\u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i) * \u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i\n[PROOFSTEP]\nrw [prod_range_succ']\n[GOAL]\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\nA :\n  (\u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n (i + 1)) * f 0 (n + 1) =\n    \u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i\n\u22a2 (\u220f k in range (n + 1), f (k + 1) (n + 1 - (k + 1)) ^ Nat.choose (n + 1) (k + 1)) *\n      f 0 (n + 1 - 0) ^ Nat.choose (n + 1) 0 =\n    (\u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i) * \u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i\n[PROOFSTEP]\nsimpa [Nat.choose_succ_succ, pow_add, prod_mul_distrib, A, mul_assoc] using\n  mul_comm _\n    _\n      -- porting note: new lemma\n[GOAL]\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\n\u22a2 \u220f ij in Nat.antidiagonal (n + 1), f ij.fst ij.snd ^ Nat.choose (n + 1) ij.fst =\n    (\u220f ij in Nat.antidiagonal n, f ij.fst (ij.snd + 1) ^ Nat.choose n ij.fst) *\n      \u220f ij in Nat.antidiagonal n, f (ij.fst + 1) ij.snd ^ Nat.choose n ij.snd\n[PROOFSTEP]\nsimp only [Nat.prod_antidiagonal_eq_prod_range_succ_mk, prod_pow_choose_succ]\n[GOAL]\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\n\u22a2 (\u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i) * \u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i =\n    (\u220f x in range (succ n), f x (n - x + 1) ^ Nat.choose n x) *\n      \u220f x in range (succ n), f (x + 1) (n - x) ^ Nat.choose n (n - x)\n[PROOFSTEP]\nhave : \u2200 i \u2208 range (n + 1), i \u2264 n := fun i hi \u21a6 by simpa [Nat.lt_succ_iff] using hi\n[GOAL]\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn i : \u2115\nhi : i \u2208 range (n + 1)\n\u22a2 i \u2264 n\n[PROOFSTEP]\nsimpa [Nat.lt_succ_iff] using hi\n[GOAL]\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\nthis : \u2200 (i : \u2115), i \u2208 range (n + 1) \u2192 i \u2264 n\n\u22a2 (\u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i) * \u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i =\n    (\u220f x in range (succ n), f x (n - x + 1) ^ Nat.choose n x) *\n      \u220f x in range (succ n), f (x + 1) (n - x) ^ Nat.choose n (n - x)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\nthis : \u2200 (i : \u2115), i \u2208 range (n + 1) \u2192 i \u2264 n\n\u22a2 \u220f i in range (n + 1), f i (n + 1 - i) ^ Nat.choose n i = \u220f x in range (succ n), f x (n - x + 1) ^ Nat.choose n x\n[PROOFSTEP]\nrefine prod_congr rfl fun i hi \u21a6 ?_\n[GOAL]\ncase e_a\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\nthis : \u2200 (i : \u2115), i \u2208 range (n + 1) \u2192 i \u2264 n\ni : \u2115\nhi : i \u2208 range (succ n)\n\u22a2 f i (n + 1 - i) ^ Nat.choose n i = f i (n - i + 1) ^ Nat.choose n i\n[PROOFSTEP]\nrw [tsub_add_eq_add_tsub (this _ hi)]\n[GOAL]\ncase e_a\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\nthis : \u2200 (i : \u2115), i \u2208 range (n + 1) \u2192 i \u2264 n\n\u22a2 \u220f i in range (n + 1), f (i + 1) (n - i) ^ Nat.choose n i =\n    \u220f x in range (succ n), f (x + 1) (n - x) ^ Nat.choose n (n - x)\n[PROOFSTEP]\nrefine prod_congr rfl fun i hi \u21a6 ?_\n[GOAL]\ncase e_a\nR\u271d : Type u_1\nM\u271d : Type u_2\nR : Type u_3\ninst\u271d\u00b2 : CommMonoid M\u271d\ninst\u271d\u00b9 : NonAssocSemiring R\nM : Type u_4\ninst\u271d : CommMonoid M\nf : \u2115 \u2192 \u2115 \u2192 M\nn : \u2115\nthis : \u2200 (i : \u2115), i \u2208 range (n + 1) \u2192 i \u2264 n\ni : \u2115\nhi : i \u2208 range (succ n)\n\u22a2 f (i + 1) (n - i) ^ Nat.choose n i = f (i + 1) (n - i) ^ Nat.choose n (n - i)\n[PROOFSTEP]\nrw [Nat.choose_symm (this _ hi)]\n  -- porting note: moved from `Mathlib.Analysis.Calculus.ContDiff`\n[GOAL]\nR\u271d : Type u_1\nM : Type u_2\nR : Type u_3\ninst\u271d\u00b9 : CommMonoid M\ninst\u271d : NonAssocSemiring R\nf : \u2115 \u2192 \u2115 \u2192 R\nn : \u2115\n\u22a2 \u2211 i in range (n + 2), \u2191(Nat.choose (n + 1) i) * f i (n + 1 - i) =\n    \u2211 i in range (n + 1), \u2191(Nat.choose n i) * f i (n + 1 - i) +\n      \u2211 i in range (n + 1), \u2191(Nat.choose n i) * f (i + 1) (n - i)\n[PROOFSTEP]\nsimpa only [nsmul_eq_mul] using sum_choose_succ_nsmul f n\n[GOAL]\nR\u271d : Type u_1\nM : Type u_2\nR : Type u_3\ninst\u271d\u00b9 : CommMonoid M\ninst\u271d : NonAssocSemiring R\nf : \u2115 \u2192 \u2115 \u2192 R\nn : \u2115\n\u22a2 \u2211 ij in Nat.antidiagonal (n + 1), \u2191(Nat.choose (n + 1) ij.fst) * f ij.fst ij.snd =\n    \u2211 ij in Nat.antidiagonal n, \u2191(Nat.choose n ij.fst) * f ij.fst (ij.snd + 1) +\n      \u2211 ij in Nat.antidiagonal n, \u2191(Nat.choose n ij.snd) * f (ij.fst + 1) ij.snd\n[PROOFSTEP]\nsimpa only [nsmul_eq_mul] using sum_antidiagonal_choose_succ_nsmul f n\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Choose.Sum", "llama_tokens": 15790, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8774767906859264, "lm_q2_score": 0.746138993030751, "lm_q1q2_score": 0.6547196490102523}}
{"text": "[GOAL]\nx y r : \u2115\nhr : y * y + r = x\nhle : Nat.ble r (2 * y) = true\n\u22a2 Nat.sqrt x = y\n[PROOFSTEP]\nrw [\u2190 hr, \u2190 pow_two]\n[GOAL]\nx y r : \u2115\nhr : y * y + r = x\nhle : Nat.ble r (2 * y) = true\n\u22a2 Nat.sqrt (y ^ 2 + r) = y\n[PROOFSTEP]\nrw [two_mul] at hle \n[GOAL]\nx y r : \u2115\nhr : y * y + r = x\nhle : Nat.ble r (y + y) = true\n\u22a2 Nat.sqrt (y ^ 2 + r) = y\n[PROOFSTEP]\nexact Nat.sqrt_add_eq' _ (Nat.le_of_ble_eq_true hle)\n", "meta": {"mathlib_filename": "Mathlib.Tactic.NormNum.NatSqrt", "llama_tokens": 221, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8872045817875223, "lm_q2_score": 0.7371581684030623, "lm_q1q2_score": 0.6540101045092948}}
{"text": "[GOAL]\nn : \u2115\n\u22a2 IsReduced (ZMod n) \u2194 Squarefree n \u2228 n = 0\n[PROOFSTEP]\nrw [\u2190 RingHom.ker_isRadical_iff_reduced_of_surjective (ZMod.ringHom_surjective <| Int.castRingHom <| ZMod n),\n  ZMod.ker_int_castRingHom, \u2190 isRadical_iff_span_singleton, isRadical_iff_squarefree_or_zero, Int.squarefree_coe_nat,\n  Nat.cast_eq_zero]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.ZMod", "llama_tokens": 144, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9032942119105695, "lm_q2_score": 0.7217432122827968, "lm_q1q2_score": 0.6519464661407918}}
{"text": "[GOAL]\nx y : \u2124\n\u22a2 |x| < |y| \u2194 natAbs x < natAbs y\n[PROOFSTEP]\nrw [abs_eq_natAbs, abs_eq_natAbs, ofNat_lt]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.EuclideanAbsoluteValue", "llama_tokens": 63, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9136765163620469, "lm_q2_score": 0.7122321842389469, "lm_q1q2_score": 0.6507498209363726}}
{"text": "[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 c \u2208 perpBisector p\u2081 p\u2082 \u2194 inner (\u2191(Equiv.pointReflection c) p\u2081 -\u1d65 p\u2082) (p\u2082 -\u1d65 p\u2081) = 0\n[PROOFSTEP]\nrw [mem_perpBisector_iff_inner_eq_zero, Equiv.pointReflection_apply, vsub_midpoint, invOf_eq_inv, \u2190 smul_add,\n  real_inner_smul_left, vadd_vsub_assoc]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 2\u207b\u00b9 * inner (c -\u1d65 p\u2081 + (c -\u1d65 p\u2082)) (p\u2082 -\u1d65 p\u2081) = 0 \u2194 inner (c -\u1d65 p\u2081 + (c -\u1d65 p\u2082)) (p\u2082 -\u1d65 p\u2081) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 c \u2208 perpBisector p\u2081 (\u2191(Equiv.pointReflection p\u2082) p\u2081) \u2194 inner (c -\u1d65 p\u2082) (p\u2081 -\u1d65 p\u2082) = 0\n[PROOFSTEP]\nrw [mem_perpBisector_iff_inner_eq_zero, midpoint_pointReflection_right, Equiv.pointReflection_apply, vadd_vsub_assoc,\n  inner_add_right, add_self_eq_zero, \u2190 neg_eq_zero, \u2190 inner_neg_right, neg_vsub_eq_vsub_rev]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081\u271d p\u2082\u271d p\u2081 p\u2082 : P\n\u22a2 midpoint \u211d p\u2081 p\u2082 \u2208 perpBisector p\u2081 p\u2082\n[PROOFSTEP]\nsimp [mem_perpBisector_iff_inner_eq_zero]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081\u271d p\u2082\u271d p\u2081 p\u2082 : P\n\u22a2 direction (perpBisector p\u2081 p\u2082) = (Submodule.span \u211d {p\u2082 -\u1d65 p\u2081})\u15ee\n[PROOFSTEP]\nerw [perpBisector, comap_symm, map_direction, Submodule.map_id, Submodule.toAffineSubspace_direction]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081\u271d p\u2082\u271d p\u2081 p\u2082 : P\n\u22a2 LinearMap.ker (\u2191(inner\u209b\u2097 \u211d) (p\u2082 -\u1d65 p\u2081)) = (Submodule.span \u211d {p\u2082 -\u1d65 p\u2081})\u15ee\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_1\nP : Type u_2\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081\u271d p\u2082\u271d p\u2081 p\u2082 : P\nx : V\n\u22a2 x \u2208 LinearMap.ker (\u2191(inner\u209b\u2097 \u211d) (p\u2082 -\u1d65 p\u2081)) \u2194 x \u2208 (Submodule.span \u211d {p\u2082 -\u1d65 p\u2081})\u15ee\n[PROOFSTEP]\nexact Submodule.mem_orthogonal_singleton_iff_inner_right.symm\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 c \u2208 perpBisector p\u2081 p\u2082 \u2194 inner (c -\u1d65 p\u2081) (p\u2082 -\u1d65 p\u2081) = inner (c -\u1d65 p\u2082) (p\u2081 -\u1d65 p\u2082)\n[PROOFSTEP]\nrw [Iff.comm, mem_perpBisector_iff_inner_eq_zero, \u2190 add_neg_eq_zero, \u2190 inner_neg_right, neg_vsub_eq_vsub_rev, \u2190\n  inner_add_left, vsub_midpoint, invOf_eq_inv, \u2190 smul_add, real_inner_smul_left]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 inner (c -\u1d65 p\u2081 + (c -\u1d65 p\u2082)) (p\u2082 -\u1d65 p\u2081) = 0 \u2194 2\u207b\u00b9 * inner (c -\u1d65 p\u2081 + (c -\u1d65 p\u2082)) (p\u2082 -\u1d65 p\u2081) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 c \u2208 perpBisector p\u2081 p\u2082 \u2194 inner (c -\u1d65 p\u2081) (p\u2082 -\u1d65 p\u2081) = dist p\u2081 p\u2082 ^ 2 / 2\n[PROOFSTEP]\nrw [mem_perpBisector_iff_inner_eq_zero, \u2190 vsub_sub_vsub_cancel_right _ _ p\u2081, inner_sub_left, sub_eq_zero,\n  midpoint_vsub_left, invOf_eq_inv, real_inner_smul_left, real_inner_self_eq_norm_sq, dist_eq_norm_vsub' V,\n  div_eq_inv_mul]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 c \u2208 perpBisector p\u2081 p\u2082 \u2194 dist c p\u2081 = dist c p\u2082\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, \u2190 real_inner_add_sub_eq_zero_iff, vsub_sub_vsub_cancel_left,\n  inner_add_left, add_eq_zero_iff_eq_neg, \u2190 inner_neg_right, neg_vsub_eq_vsub_rev, mem_perpBisector_iff_inner_eq_inner]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 c \u2208 perpBisector p\u2081 p\u2082 \u2194 dist p\u2081 c = dist p\u2082 c\n[PROOFSTEP]\nsimp only [mem_perpBisector_iff_dist_eq, dist_comm]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081\u271d p\u2082\u271d p\u2081 p\u2082 : P\n\u22a2 perpBisector p\u2081 p\u2082 = perpBisector p\u2082 p\u2081\n[PROOFSTEP]\next c\n[GOAL]\ncase h\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc\u271d c\u2081 c\u2082 p\u2081\u271d p\u2082\u271d p\u2081 p\u2082 c : P\n\u22a2 c \u2208 perpBisector p\u2081 p\u2082 \u2194 c \u2208 perpBisector p\u2082 p\u2081\n[PROOFSTEP]\nsimp only [mem_perpBisector_iff_dist_eq, eq_comm]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 p\u2082 \u2208 perpBisector p\u2081 p\u2082 \u2194 p\u2081 = p\u2082\n[PROOFSTEP]\nsimpa [mem_perpBisector_iff_inner_eq_inner] using eq_comm\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 p\u2081 \u2208 perpBisector p\u2081 p\u2082 \u2194 p\u2081 = p\u2082\n[PROOFSTEP]\nrw [perpBisector_comm, right_mem_perpBisector, eq_comm]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 p x\u271d : P\n\u22a2 x\u271d \u2208 \u2191\u22a4 \u2192 x\u271d \u2208 \u2191(perpBisector p p)\n[PROOFSTEP]\nsimp [mem_perpBisector_iff_inner_eq_inner]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 perpBisector p\u2081 p\u2082 = \u22a4 \u2194 p\u2081 = p\u2082\n[PROOFSTEP]\nrefine \u27e8fun h \u21a6 ?_, fun h \u21a6 h \u25b8 perpBisector_self _\u27e9\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\nh : perpBisector p\u2081 p\u2082 = \u22a4\n\u22a2 p\u2081 = p\u2082\n[PROOFSTEP]\nrw [\u2190 left_mem_perpBisector, h]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\nh : perpBisector p\u2081 p\u2082 = \u22a4\n\u22a2 p\u2081 \u2208 \u22a4\n[PROOFSTEP]\ntrivial\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 perpBisector p\u2081 p\u2082 \u2260 \u22a5\n[PROOFSTEP]\nrw [\u2190 nonempty_iff_ne_bot]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc c\u2081 c\u2082 p\u2081 p\u2082 : P\n\u22a2 Set.Nonempty \u2191(perpBisector p\u2081 p\u2082)\n[PROOFSTEP]\nexact perpBisector_nonempty\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc\u2081 c\u2082 p\u2081 p\u2082 : P\nhc\u2081 : dist p\u2081 c\u2081 = dist p\u2082 c\u2081\nhc\u2082 : dist p\u2081 c\u2082 = dist p\u2082 c\u2082\n\u22a2 inner (c\u2082 -\u1d65 c\u2081) (p\u2082 -\u1d65 p\u2081) = 0\n[PROOFSTEP]\nrw [\u2190 Submodule.mem_orthogonal_singleton_iff_inner_left, \u2190 direction_perpBisector]\n[GOAL]\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc\u2081 c\u2082 p\u2081 p\u2082 : P\nhc\u2081 : dist p\u2081 c\u2081 = dist p\u2082 c\u2081\nhc\u2082 : dist p\u2081 c\u2082 = dist p\u2082 c\u2082\n\u22a2 c\u2082 -\u1d65 c\u2081 \u2208 direction (perpBisector p\u2081 p\u2082)\n[PROOFSTEP]\napply vsub_mem_direction\n[GOAL]\ncase hp1\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc\u2081 c\u2082 p\u2081 p\u2082 : P\nhc\u2081 : dist p\u2081 c\u2081 = dist p\u2082 c\u2081\nhc\u2082 : dist p\u2081 c\u2082 = dist p\u2082 c\u2082\n\u22a2 c\u2082 \u2208 perpBisector p\u2081 p\u2082\n[PROOFSTEP]\nrwa [mem_perpBisector_iff_dist_eq']\n[GOAL]\ncase hp2\nV : Type u_2\nP : Type u_1\ninst\u271d\u00b3 : NormedAddCommGroup V\ninst\u271d\u00b2 : InnerProductSpace \u211d V\ninst\u271d\u00b9 : MetricSpace P\ninst\u271d : NormedAddTorsor V P\nc\u2081 c\u2082 p\u2081 p\u2082 : P\nhc\u2081 : dist p\u2081 c\u2081 = dist p\u2082 c\u2081\nhc\u2082 : dist p\u2081 c\u2082 = dist p\u2082 c\u2082\n\u22a2 c\u2081 \u2208 perpBisector p\u2081 p\u2082\n[PROOFSTEP]\nrwa [mem_perpBisector_iff_dist_eq']\n[GOAL]\nV : Type u_4\nP : Type u_1\nV' : Type u_3\nP' : Type u_2\ninst\u271d\u2077 : NormedAddCommGroup V\ninst\u271d\u2076 : InnerProductSpace \u211d V\ninst\u271d\u2075 : MetricSpace P\ninst\u271d\u2074 : NormedAddTorsor V P\ninst\u271d\u00b3 : NormedAddCommGroup V'\ninst\u271d\u00b2 : InnerProductSpace \u211d V'\ninst\u271d\u00b9 : MetricSpace P'\ninst\u271d : NormedAddTorsor V' P'\nf : P \u2192 P'\nh : Isometry f\np\u2081 p\u2082 : P\n\u22a2 f \u207b\u00b9' \u2191(perpBisector (f p\u2081) (f p\u2082)) = \u2191(perpBisector p\u2081 p\u2082)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_4\nP : Type u_1\nV' : Type u_3\nP' : Type u_2\ninst\u271d\u2077 : NormedAddCommGroup V\ninst\u271d\u2076 : InnerProductSpace \u211d V\ninst\u271d\u2075 : MetricSpace P\ninst\u271d\u2074 : NormedAddTorsor V P\ninst\u271d\u00b3 : NormedAddCommGroup V'\ninst\u271d\u00b2 : InnerProductSpace \u211d V'\ninst\u271d\u00b9 : MetricSpace P'\ninst\u271d : NormedAddTorsor V' P'\nf : P \u2192 P'\nh : Isometry f\np\u2081 p\u2082 x : P\n\u22a2 x \u2208 f \u207b\u00b9' \u2191(perpBisector (f p\u2081) (f p\u2082)) \u2194 x \u2208 \u2191(perpBisector p\u2081 p\u2082)\n[PROOFSTEP]\nsimp [mem_perpBisector_iff_dist_eq, h.dist_eq]\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.PerpBisector", "llama_tokens": 4634, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430353105598, "lm_q2_score": 0.7826624789529375, "lm_q1q2_score": 0.6505044683806316}}
{"text": "[GOAL]\nX : Type u_1\ninst\u271d : TopologicalSpace X\n\u22a2 SimplyConnectedSpace X \u2194 Nonempty X \u2227 \u2200 (x y : X), Nonempty (Unique (Path.Homotopic.Quotient x y))\n[PROOFSTEP]\nrw [simply_connected_def, equiv_punit_iff_unique]\n[GOAL]\nX : Type u_1\ninst\u271d : TopologicalSpace X\n\u22a2 (Nonempty (FundamentalGroupoid X) \u2227 \u2200 (x y : FundamentalGroupoid X), Nonempty (Unique (x \u27f6 y))) \u2194\n    Nonempty X \u2227 \u2200 (x y : X), Nonempty (Unique (Path.Homotopic.Quotient x y))\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : SimplyConnectedSpace X\nx y : X\n\u22a2 Nonempty (Unique (Path.Homotopic.Quotient x y))\n[PROOFSTEP]\nrw [simply_connected_iff_unique_homotopic] at *\n[GOAL]\nX : Type u_1\ninst\u271d\u00b9 : TopologicalSpace X\ninst\u271d : Nonempty X \u2227 \u2200 (x y : X), Nonempty (Unique (Path.Homotopic.Quotient x y))\nx y : X\n\u22a2 Nonempty (Unique (Path.Homotopic.Quotient x y))\n[PROOFSTEP]\ntauto\n[GOAL]\nY : Type u_1\ninst\u271d : TopologicalSpace Y\n\u22a2 SimplyConnectedSpace Y \u2192 PathConnectedSpace Y \u2227 \u2200 (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)\n[PROOFSTEP]\nintro\n[GOAL]\nY : Type u_1\ninst\u271d : TopologicalSpace Y\na\u271d : SimplyConnectedSpace Y\n\u22a2 PathConnectedSpace Y \u2227 \u2200 (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nY : Type u_1\ninst\u271d : TopologicalSpace Y\na\u271d : SimplyConnectedSpace Y\n\u22a2 PathConnectedSpace Y\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase right\nY : Type u_1\ninst\u271d : TopologicalSpace Y\na\u271d : SimplyConnectedSpace Y\n\u22a2 \u2200 (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nY : Type u_1\ninst\u271d : TopologicalSpace Y\nh : PathConnectedSpace Y \u2227 \u2200 (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)\n\u22a2 SimplyConnectedSpace Y\n[PROOFSTEP]\ncases h\n[GOAL]\ncase intro\nY : Type u_1\ninst\u271d : TopologicalSpace Y\nleft\u271d : PathConnectedSpace Y\nright\u271d : \u2200 (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)\n\u22a2 SimplyConnectedSpace Y\n[PROOFSTEP]\nrw [simply_connected_iff_unique_homotopic]\n[GOAL]\ncase intro\nY : Type u_1\ninst\u271d : TopologicalSpace Y\nleft\u271d : PathConnectedSpace Y\nright\u271d : \u2200 (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)\n\u22a2 Nonempty Y \u2227 \u2200 (x y : Y), Nonempty (Unique (Path.Homotopic.Quotient x y))\n[PROOFSTEP]\nexact \u27e8inferInstance, fun x y => \u27e8uniqueOfSubsingleton \u27e6PathConnectedSpace.somePath x y\u27e7\u27e9\u27e9\n[GOAL]\nY : Type u_1\ninst\u271d : TopologicalSpace Y\n\u22a2 SimplyConnectedSpace Y \u2194 PathConnectedSpace Y \u2227 \u2200 {x y : Y} (p\u2081 p\u2082 : Path x y), Path.Homotopic p\u2081 p\u2082\n[PROOFSTEP]\nconvert simply_connected_iff_paths_homotopic (Y := Y)\n[GOAL]\ncase h.e'_2.h.e'_2.h.h.a\nY : Type u_1\ninst\u271d : TopologicalSpace Y\na\u271d\u00b9 a\u271d : Y\n\u22a2 (\u2200 (p\u2081 p\u2082 : Path a\u271d\u00b9 a\u271d), Path.Homotopic p\u2081 p\u2082) \u2194 Subsingleton (Path.Homotopic.Quotient a\u271d\u00b9 a\u271d)\n[PROOFSTEP]\nsimp [Path.Homotopic.Quotient, Setoid.eq_top_iff]\n[GOAL]\ncase h.e'_2.h.e'_2.h.h.a\nY : Type u_1\ninst\u271d : TopologicalSpace Y\na\u271d\u00b9 a\u271d : Y\n\u22a2 (\u2200 (p\u2081 p\u2082 : Path a\u271d\u00b9 a\u271d), Path.Homotopic p\u2081 p\u2082) \u2194 \u2200 (x y : Path a\u271d\u00b9 a\u271d), Setoid.Rel (Path.Homotopic.setoid a\u271d\u00b9 a\u271d) x y\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected", "llama_tokens": 1360, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8933094117351309, "lm_q2_score": 0.7279754607093178, "lm_q1q2_score": 0.6503073305638516}}
